Email notyfication.
Some checks failed
s426206-training/pipeline/head There was a failure building this commit

This commit is contained in:
Jan Nowak 2021-05-07 23:03:14 +02:00
parent 4133f24e59
commit 2ea6de0929
2 changed files with 25 additions and 6 deletions

6
Jenkinsfile vendored
View File

@ -3,8 +3,8 @@ pipeline {
parameters {
string(
defaultValue: '',
description: 'Parametry trenowania.',
name: 'PARAMETRY',
description: 'Umożliwia zdefiniowanie wielkości odcięcia zbioru danych.',
name: 'CUTOFF',
trim: false
)
string(
@ -34,7 +34,7 @@ pipeline {
def img = docker.build('rokoch/ium:01')
img.inside {
sh 'chmod +x create_dataset.py'
sh 'python3 ./create_dataset.py $PARAMETRY'
sh 'python3 ./create_dataset.py $CUTOFF'
}
}
}

View File

@ -1,6 +1,12 @@
pipeline {
agent any
parameters {
string(
defaultValue: '',
description: 'Parametry trenowania.',
name: 'PARAMETRY',
trim: false
)
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
@ -23,7 +29,7 @@ pipeline {
def img = docker.build('rokoch/ium:01')
img.inside {
sh 'chmod +x dlgssdpytorch.py'
sh 'python3 ./dlgssdpytorch.py'
sh 'python3 ./dlgssdpytorch.py $PARAMETRY'
}
}
}
@ -33,11 +39,24 @@ pipeline {
steps {
//Zarchiwizuj wynik
archiveArtifacts 'model.pt'
}
}
post {
success {
//Wysłanie maila
emailext body: 'test',
emailext body: 'SUCCESS',
subject: 's426206',
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
unstable {
emailext body: 'UNSTABLE', subject: 's426206', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
failure {
emailext body: 'FAILURE', subject: 's426206', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
changed {
emailext body: 'CHANGED', subject: 's426206', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
}
}