add new jenkinsfiles

This commit is contained in:
Sheaza 2024-04-02 20:02:32 +02:00
parent eb1e24560e
commit 4b93fab438
2 changed files with 19 additions and 9 deletions

18
Jenkinsfile vendored
View File

@ -28,13 +28,19 @@ pipeline {
checkout scm checkout scm
} }
} }
stage('Download dataset') { stage('Prepare dataset') {
agent {
dockerfile {
filename 'Dockerfile'
reuseNode true
}
}
steps { steps {
withEnv(["USERNAME=${params.USERNAME}", "API_KEY=${params.API_KEY}", "DATA_TRAIN_RATIO=${params.DATA_TRAIN_RATIO}", "CUTOFF=${params.CUTOFF}"]) { sh "chmod +x ./get_dataset.py"
sh "chmod +x download_dataset.sh" sh "python3 ./get_dataset.py ${params.KAGGLE_USERNAME} ${params.KAGGLE_KEY}"
sh "./download_dataset.sh $DATA_TRAIN_RATIO $CUTOFF" archiveArtifacts artifacts: 'dataset.csv,df_train.csv,df_test.csv', onlyIfSuccessful: true
archiveArtifacts artifacts: 'data.csv,train.csv,test.csv', onlyIfSuccessful: true }
}
} }
} }
} }

10
stats/Jenkinsfile vendored
View File

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