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
}
}
stage('Download dataset') {
stage('Prepare dataset') {
agent {
dockerfile {
filename 'Dockerfile'
reuseNode true
}
}
steps {
withEnv(["USERNAME=${params.USERNAME}", "API_KEY=${params.API_KEY}", "DATA_TRAIN_RATIO=${params.DATA_TRAIN_RATIO}", "CUTOFF=${params.CUTOFF}"]) {
sh "chmod +x download_dataset.sh"
sh "./download_dataset.sh $DATA_TRAIN_RATIO $CUTOFF"
archiveArtifacts artifacts: 'data.csv,train.csv,test.csv', onlyIfSuccessful: true
}
sh "chmod +x ./get_dataset.py"
sh "python3 ./get_dataset.py ${params.KAGGLE_USERNAME} ${params.KAGGLE_KEY}"
archiveArtifacts artifacts: 'dataset.csv,df_train.csv,df_test.csv', onlyIfSuccessful: true
}
}
}
}

10
stats/Jenkinsfile vendored
View File

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