38 lines
784 B
Groovy
38 lines
784 B
Groovy
pipeline {
|
|
agent {
|
|
dockerfile {
|
|
filename 'Dockerfile'
|
|
args '-u root'
|
|
}
|
|
}
|
|
|
|
parameters {
|
|
string (
|
|
defaultValue: 'vskyper',
|
|
description: 'Kaggle username',
|
|
name: 'KAGGLE_USERNAME',
|
|
trim: false
|
|
)
|
|
password (
|
|
defaultValue: '',
|
|
description: 'Kaggle API key',
|
|
name: 'KAGGLE_KEY',
|
|
)
|
|
}
|
|
|
|
stages {
|
|
stage('Run create-dataset script') {
|
|
steps {
|
|
withEnv (["KAGGLE_USERNAME=${env.KAGGLE_USERNAME}", "KAGGLE_KEY=${env.KAGGLE_KEY}"]) {
|
|
sh 'chmod +x create-dataset.py'
|
|
sh 'python3 ./create-dataset.py $KAGGLE_KEY'
|
|
}
|
|
}
|
|
}
|
|
stage('Archive Artifacts') {
|
|
steps {
|
|
archiveArtifacts artifacts: '/data/*', onlyIfSuccessful: true
|
|
}
|
|
}
|
|
}
|
|
} |