ium_464863/Jenkinsfile

38 lines
967 B
Plaintext
Raw Normal View History

2024-03-20 14:23:42 +01:00
pipeline {
agent any
parameters {
password (
name: 'KAGGLE_USERNAME',
defaultValue: '',
description: 'Kaggle username'
),
password (
name: 'KAGGLE_KEY',
defaultValue: '',
description: 'Kaggle API key'
),
number (
name: 'CUTOFF',
defaultValue: '10',
description: 'Get only the first CUTOFF rows of the dataset'
)
}
2024-03-20 14:23:42 +01:00
stages {
stage('Clone repository') {
steps {
checkout scm
}
}
stage('Download dataset') {
2024-03-20 14:23:42 +01:00
steps {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
sh './download_dataset.sh ${params.CUTOFF}'
archiveArtifacts artifacts: 'data.csv', onlyIfSuccessful: true
}
2024-03-20 14:23:42 +01:00
}
}
}
}