2024-03-20 14:37:27 +01:00
|
|
|
pipeline {
|
2024-04-01 13:47:56 +02:00
|
|
|
agent {
|
2024-04-01 15:01:02 +02:00
|
|
|
dockerfile {
|
|
|
|
filename 'Dockerfile'
|
2024-04-01 15:34:56 +02:00
|
|
|
args '-u root -v $HOME:/app'
|
2024-04-01 15:01:02 +02:00
|
|
|
}
|
2024-04-01 13:47:56 +02:00
|
|
|
}
|
2024-03-24 11:31:18 +01:00
|
|
|
|
|
|
|
parameters {
|
|
|
|
string (
|
|
|
|
defaultValue: 'vskyper',
|
|
|
|
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',
|
|
|
|
)
|
|
|
|
}
|
2024-03-24 12:13:05 +01:00
|
|
|
|
2024-03-24 11:31:18 +01:00
|
|
|
stages {
|
2024-04-01 13:47:56 +02:00
|
|
|
stage('Run create-dataset script') {
|
2024-03-24 11:31:18 +01:00
|
|
|
steps {
|
2024-04-01 14:35:28 +02:00
|
|
|
withEnv (["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
|
2024-04-01 15:33:41 +02:00
|
|
|
dir ('/app') {
|
|
|
|
sh 'chmod +x create-dataset.py'
|
|
|
|
sh 'python3 ./create-dataset.py'
|
|
|
|
}
|
2024-03-20 15:12:48 +01:00
|
|
|
}
|
2024-03-24 11:31:18 +01:00
|
|
|
}
|
|
|
|
}
|
2024-03-24 12:13:05 +01:00
|
|
|
stage('Archive Artifacts') {
|
2024-03-24 11:31:18 +01:00
|
|
|
steps {
|
2024-04-01 15:33:41 +02:00
|
|
|
archiveArtifacts artifacts: '/app/data/*', onlyIfSuccessful: true
|
2024-03-24 11:31:18 +01:00
|
|
|
}
|
2024-03-20 14:24:07 +01:00
|
|
|
}
|
2024-03-24 11:31:18 +01:00
|
|
|
}
|
2024-03-20 14:21:31 +01:00
|
|
|
}
|