From cbadafdb37d20db99368d572469a82cf9a5760d3 Mon Sep 17 00:00:00 2001 From: Maciej Czajka Date: Wed, 11 May 2022 20:57:10 +0200 Subject: [PATCH] update jenkinsfile_registry, add jenkinsfile_train-sacred-old --- Jenkinsfile_registry | 6 +++-- Jenkinsfile_train-sacred-old | 43 ++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 Jenkinsfile_train-sacred-old diff --git a/Jenkinsfile_registry b/Jenkinsfile_registry index 49e71b5..d8cbbf8 100644 --- a/Jenkinsfile_registry +++ b/Jenkinsfile_registry @@ -1,7 +1,9 @@ pipeline { agent { - image 'maciejczajka' - args '-v /mlruns:/mlruns' + docker { + image 'maciejczajka' + args '-v /mlruns:/mlruns' + } } stages { diff --git a/Jenkinsfile_train-sacred-old b/Jenkinsfile_train-sacred-old new file mode 100644 index 0000000..7a87075 --- /dev/null +++ b/Jenkinsfile_train-sacred-old @@ -0,0 +1,43 @@ +pipeline { + agent { + dockerfile { + additionalBuildArgs "--build-arg KAGGLE_USERNAME=${params.KAGGLE_USERNAME} --build-arg KAGGLE_KEY=${params.KAGGLE_KEY} --build-arg CUTOFF=${params.CUTOFF} -t maciejczajka" + } + } + parameters { + string( + defaultValue: '1000', + description: 'Number of epochs', + name: 'EPOCHS', + trim: false + ) + } + stages { + stage('Script'){ + steps { + copyArtifacts filter: '*', projectName: 's444356-create-dataset' + sh 'python Biblioteka_DL/dllib-sacred.py with "epochs=$EPOCHS"' + sh 'ls my_res' + sh 'cp -r my_res res' + archiveArtifacts artifacts: 'games_model.pkl, res/**/*.*' + sh 'rm -r my_res' + sh 'rm -r res' + build job: 's444356-evaluation/master/' + } + } + } + post { + success { + emailext body: 'SUCCESS', subject: 's444356-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms' + } + failure { + emailext body: 'FAILURE', subject: 's444356-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms' + } + unstable { + emailext body: 'UNSTABLE', subject: 's444356-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms' + } + changed { + emailext body: 'CHANGED', subject: 's444356-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms' + } + } +} \ No newline at end of file