IUM_04 - update Jenkinsfile to use docker environment

This commit is contained in:
Paweł Łączkowski 2024-03-29 15:40:28 +01:00
parent 468d38508a
commit 1a6fa3863d
2 changed files with 13 additions and 7 deletions

10
Jenkinsfile vendored
View File

@ -1,5 +1,7 @@
pipeline {
agent any
agent {
dockerfile true
}
parameters {
password (
@ -29,9 +31,9 @@ pipeline {
stage('Download dataset') {
steps {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}", "CUTOFF=${params.CUTOFF}"]) {
sh "chmod +x download_dataset.sh"
sh "./download_dataset.sh $CUTOFF"
archiveArtifacts artifacts: 'data.csv,train.csv,dev.csv,test.csv', onlyIfSuccessful: true
sh "chmod +x ./download_dataset.py"
sh "python3 ./download_dataset.py $CUTOFF"
archiveArtifacts artifacts: './datasets/data.csv,./datasets/train.csv,./datasets/dev.csv,./datasets/test.csv', onlyIfSuccessful: true
}
}
}

View File

@ -1,5 +1,9 @@
pipeline {
agent any
agent {
docker {
image 'dzikafoczka/ium:latest'
}
}
parameters {
buildSelector(
@ -24,8 +28,8 @@ pipeline {
stage('Get statistics') {
steps {
sh "chmod +x get_stats.sh"
sh "./get_stats.sh"
sh "chmod +x get_stats.py"
sh "python3 get_stats.py"
archiveArtifacts artifacts: 'stats.txt', onlyIfSuccessful: true
}
}