ium_444507/Jenkinsfile

45 lines
1.3 KiB
Plaintext
Raw Normal View History

2022-03-25 08:14:39 +01:00
pipeline {
agent any
2022-03-26 12:25:06 +01:00
parameters {
string(
2022-03-26 12:15:30 +01:00
defaultValue: 'heatedboss2',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
2022-03-25 08:14:39 +01:00
trim: false
2022-03-26 12:25:06 +01:00
)
password(
2022-03-26 12:15:30 +01:00
defaultValue: '',
description: 'Kaggle token',
name: 'KAGGLE_KEY'
2022-03-26 12:25:06 +01:00
)
2022-03-27 14:03:36 +02:00
string(
defaultValue: '1',
description: 'Cutoff',
name: 'CUTOFF',
trim: false
)
2022-03-26 12:25:06 +01:00
}
2022-03-25 08:14:39 +01:00
stages {
2022-03-26 10:37:01 +01:00
stage('Checkout') {
2022-03-25 08:14:39 +01:00
steps {
2022-03-26 12:25:06 +01:00
checkout([$class: 'GitSCM', branches: [
[name: '*/master']
], extensions: [], userRemoteConfigs: [
[credentialsId: '8b8d54ee-f03c-4980-90b1-959faa97082b', url: 'https://git.wmi.amu.edu.pl/s444507/ium_444507.git']
]])
2022-03-25 08:14:39 +01:00
}
}
2022-03-26 10:53:51 +01:00
stage('Script') {
2022-03-25 08:14:39 +01:00
steps {
2022-03-26 10:53:51 +01:00
script {
2022-03-27 14:03:36 +02:00
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}", "CUTOFF=${params.CUTOFF}"]) {
2022-03-26 14:59:22 +01:00
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
2022-03-27 14:03:36 +02:00
sh './download.sh $CUTOFF > ./script_logs.txt'
2022-03-27 14:08:07 +02:00
archiveArtifacts artifacts: 'car_prices.csv.dev, car_prices.csv.test, car_prices.csv.train, script_logs.txt', followSymlinks: false
2022-03-26 12:15:30 +01:00
}
2022-03-26 10:53:51 +01:00
}
2022-03-25 08:14:39 +01:00
}
}
}
2022-03-26 15:07:01 +01:00
}