pipeline { agent { dockerfile {additionalBuildArgs "--build-arg KAGGLE_USERNAME=${params.KAGGLE_USERNAME} --build-arg KAGGLE_KEY=${params.KAGGLE_KEY} -t zadanie"} } parameters { string( defaultValue: 'shuhrer', description: 'Kaggle username', name: 'KAGGLE_USERNAME', trim: false ) password( defaultValue: '', description: 'Kaggle token', name: 'KAGGLE_KEY' ) string( defaultValue: '2', description: 'Cutoff lines', name: 'CUTOFF' ) } stages { stage('Check out from version control') { steps { checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444501', url: 'https://git.wmi.amu.edu.pl/s444501/ium_444501.git']]]) } } stage('Shell Script') { steps { sh 'chmod u+x download.sh' withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}","KAGGLE_KEY=${params.KAGGLE_KEY}", "CUTOFF=${params.CUTOFF}"]) { sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME' //sh './download.sh' sh "python ium-data.py" } archiveArtifacts artifacts: 'd_test.csv, d_dev.csv, d_train.csv' } } stage ('Model - training') { steps { build job: 's444501-training/master', wait: false } } } }