ium_430705/Jenkinsfile_training
s430705 d5052daaa6
Some checks failed
s430705-evaluation/pipeline/head There was a failure building this commit
s430705-training/pipeline/head There was a failure building this commit
Add plot for evaluation, add parameters to jenkins and fix mail sending
2021-05-13 12:12:43 +02:00

49 lines
1.4 KiB
Plaintext

pipeline {
agent {dockerfile true}
parameters {
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR')
string(
defaultValue: '300',
description: 'Number of epochs.',
name: 'epochs',
trim: false)
}
stages {
stage('copyArtifacts') {
steps {
copyArtifacts fingerprintArtifacts: true, projectName: 's430705-create-dataset', selector: buildParameter('BUILD_SELECTOR')
sh "python3 lab06_training.py ${epochs}"
sh "echo ${env.BUILD_NUMBER}"
}
}
stage('Archive artifacts') {
steps{
archiveArtifacts 'model_movies/**'
}
}
}
post {
success {
build job: 's430705-evaluation/master', parameters: [string(name: 'buildNumber', value: '${env.BUILD_NUMBER}')]
mail body: 'SUCCESS',
subject: 's430705',
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
unstable {
mail body: 'UNSTABLE', subject: 's430705', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
failure {
mail body: 'FAILURE', subject: 's430705', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
changed {
mail body: 'CHANGED', subject: 's430705', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
}
}