Update 'Jenkinsfile'

This commit is contained in:
Wojciech Mikołajski 2023-04-17 21:17:37 +02:00
parent 62d422a29b
commit 8c1ed09de1

10
Jenkinsfile vendored
View File

@ -31,16 +31,6 @@ node {
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'kaggle datasets download -d mssmartypants/water-quality > output.txt'
sh 'unzip -o water-quality.zip >> output.txt'
def csvFile = new File('waterQuality1.csv')
def lines = csvFile.readLines()
def cut = ${params.CUT}.toInteger()
def randomLines = new Random().with { random ->
(0..lines.size() - 1).sort { random.nextInt() }[0..(cut - 1)].collect { lines[it] }
}
def tempFile = new File('temp.csv')
tempFile.write(randomLines.join('\n'))
csvFile.text = tempFile.text
tempFile.delete()
sh 'python3 create_dataset.py >> output.txt'
archiveArtifacts artifacts: 'waterQuality.csv, output.txt'
}