IUM_04 - update Jenkinsfile

This commit is contained in:
Paweł Łączkowski 2024-03-29 16:59:06 +01:00
parent 87dec5919f
commit 659ddac84e
1 changed files with 17 additions and 11 deletions

26
Jenkinsfile vendored
View File

@ -1,10 +1,5 @@
pipeline {
agent {
dockerfile {
filename 'Dockerfile'
args '-u root'
}
}
agent any
parameters {
password (
@ -33,16 +28,27 @@ pipeline {
stage('Download dataset') {
steps {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}", "CUTOFF=${params.CUTOFF}"]) {
sh "KAGGLE_USERNAME=${params.KAGGLE_USERNAME} KAGGLE_KEY=${params.KAGGLE_KEY} kaggle datasets download -d uciml/breast-cancer-wisconsin-data"
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
sh "kaggle datasets download -d uciml/breast-cancer-wisconsin-data"
sh "unzip -o breast-cancer-wisconsin-data.zip"
sh "mkdir datasets"
sh "mv data.csv datasets/data.csv"
}
}
}
stage('Preprocess data') {
agent {
dockerfile {
filename 'Dockerfile'
}
}
steps {
sh "sudo chmod +x ./download_dataset.py"
sh "python3 ./download_dataset.py $CUTOFF"
sh "python3 ./download_dataset.py ${params.CUTOFF}"
archiveArtifacts artifacts: './datasets/data.csv,./datasets/train.csv,./datasets/dev.csv,./datasets/test.csv', onlyIfSuccessful: true
}
}
}
}
}