ium_495716/Jenkinsfile

37 lines
1009 B
Groovy

pipeline {
agent {
dockerfile true
}
parameters {
string(
defaultValue: 'worldwidepaniel',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
)
string(
defaultValue: '6',
description: 'Take only first {CUTOFF} values from dataset',
name: 'CUTOFF',
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'
)
}
stages {
stage('Download data') {
steps {
withEnv(["KAGGLE_USERNAME=${KAGGLE_USERNAME}",
"KAGGLE_KEY=${KAGGLE_KEY}" ]) {
sh 'jupyter nbconvert --to python Data_download.ipynb'
sh 'ipython Data_download.py'
archiveArtifacts artifacts: 'test.csv,train.csv', followSymlinks: false
}
}
}
}
}