2023-04-14 03:37:08 +02:00
|
|
|
node {
|
|
|
|
stage('Preparation') {
|
|
|
|
properties([
|
|
|
|
parameters([
|
|
|
|
string(
|
2023-04-21 15:35:39 +02:00
|
|
|
defaultValue: 'wojtekmikoajski',
|
2023-04-14 03:37:08 +02:00
|
|
|
description: 'Kaggle username',
|
|
|
|
name: 'KAGGLE_USERNAME',
|
|
|
|
trim: false
|
|
|
|
),
|
|
|
|
password(
|
|
|
|
defaultValue: '',
|
|
|
|
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
|
|
|
name: 'KAGGLE_KEY'
|
2023-04-17 21:08:40 +02:00
|
|
|
),
|
|
|
|
string(
|
|
|
|
defaultValue: '7999',
|
|
|
|
description: 'Cut off value',
|
|
|
|
name: 'CUT',
|
|
|
|
trim: false
|
2023-04-14 03:37:08 +02:00
|
|
|
)
|
|
|
|
])
|
|
|
|
])
|
|
|
|
}
|
2023-04-14 03:45:19 +02:00
|
|
|
stage('checkout: Check out from version control') {
|
2023-04-15 05:10:08 +02:00
|
|
|
checkout scm
|
2023-04-14 03:45:19 +02:00
|
|
|
}
|
|
|
|
stage('sh: Shell Script') {
|
2023-04-14 03:37:08 +02:00
|
|
|
// Run the maven build
|
|
|
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
2023-04-17 21:34:08 +02:00
|
|
|
"KAGGLE_KEY=${params.KAGGLE_KEY}",
|
|
|
|
"CUT = ${params.CUT}" ]) {
|
2023-04-15 05:08:36 +02:00
|
|
|
sh 'kaggle datasets download -d mssmartypants/water-quality > output.txt'
|
|
|
|
sh 'unzip -o water-quality.zip >> output.txt'
|
2023-04-17 21:40:34 +02:00
|
|
|
sh 'python3 create_dataset.py $CUT >> output.txt'
|
2023-04-15 05:08:36 +02:00
|
|
|
archiveArtifacts artifacts: 'waterQuality.csv, output.txt'
|
2023-04-14 03:37:08 +02:00
|
|
|
}
|
|
|
|
}
|
2023-03-25 13:38:51 +01:00
|
|
|
}
|