ium_444380/Jenkinsfile
2022-04-03 18:54:48 +02:00

51 lines
1.7 KiB
Groovy

pipeline {
parameters {
string (
defaultValue: 'kamilguttmann',
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'
)
string(
defaultValue: "260000",
description: 'Use CUTOFF random examples from dataset',
name: 'CUTOFF'
)
}
agent {
dockerfile {
args '-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY} -e CUTOFF=${params.CUTOFF}'
}
}
stages {
stage('Hello') {
steps {
echo 'Hello World'
}
}
stage("Checkout git") {
steps {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444380', url: 'https://git.wmi.amu.edu.pl/s444380/ium_444380.git']]])
}
}
stage("Download data") {
steps {
withEnv(['KAGGLE_USERNAME=${params.KAGGLE_USERNAME}',
'KAGGLE_KEY=${params.KAGGLE_KEY}',
'CUTOFF=${params.CUTOFF}']) {
sh "echo $KAGGLE_USERNAME $CUTOFF $IS_DOCKER"
sh "./download_data.sh"
sh "python3 clean_and_split_data.py"
sh "echo $IS_DOCKER"
archiveArtifacts artifacts: "crime.test, crime.dev, crime.train", onlyIfSuccessful: true
}
}
}
}
}