diff --git a/Jenkinsfile-train b/Jenkinsfile-train index c4348e3..88c7e8a 100644 --- a/Jenkinsfile-train +++ b/Jenkinsfile-train @@ -20,31 +20,33 @@ pipeline { ) } stages { - stage('copy artifacts') - { - steps + stage('copy artifacts') { - copyArtifacts(fingerprintArtifacts: true, projectName: 's434760-create-dataset', selector: buildParameter('WHICH_BUILD')) + steps + { + copyArtifacts(fingerprintArtifacts: true, projectName: 's434760-create-dataset', selector: buildParameter('WHICH_BUILD')) + } } - } - stage('train') - { - steps + stage('train') { - sh 'python3.8 train.py ${params.BATCH_SIZE} ${params.EPOCHS}' + steps + { + catchError { + sh 'python3.8 train.py ${BATCH_SIZE} ${EPOCHS}' + } + } } - } - stage('archive artifacts') { - steps { - archiveArtifacts 'model.h5' + stage('archive artifacts') { + steps { + archiveArtifacts 'model.h5' + } } - } - stage('send email') { - steps { - emailext body: 'build status: ${currentBuild.result}', - subject: 's434760 - train', - to: 'annnow19@st.amu.edu.pl' + stage('send email') { + steps { + emailext body: currentBuild.result, + subject: 's434760 - train', + to: 'annnow19@st.amu.edu.pl' + } } - } } } \ No newline at end of file