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 { parameters {
string( string(
defaultValue: '', defaultValue: '',
description: 'Parametry trenowania.', description: 'Umożliwia zdefiniowanie wielkości odcięcia zbioru danych.',
name: 'PARAMETRY', name: 'CUTOFF',
trim: false trim: false
) )
string( string(
@ -34,7 +34,7 @@ pipeline {
def img = docker.build('rokoch/ium:01') def img = docker.build('rokoch/ium:01')
img.inside { img.inside {
sh 'chmod +x create_dataset.py' 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 { pipeline {
agent any agent any
parameters { parameters {
string(
defaultValue: '',
description: 'Parametry trenowania.',
name: 'PARAMETRY',
trim: false
)
buildSelector( buildSelector(
defaultSelector: lastSuccessful(), defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts', description: 'Which build to use for copying artifacts',
@ -23,7 +29,7 @@ pipeline {
def img = docker.build('rokoch/ium:01') def img = docker.build('rokoch/ium:01')
img.inside { img.inside {
sh 'chmod +x dlgssdpytorch.py' sh 'chmod +x dlgssdpytorch.py'
sh 'python3 ./dlgssdpytorch.py' sh 'python3 ./dlgssdpytorch.py $PARAMETRY'
} }
} }
} }
@ -33,11 +39,24 @@ pipeline {
steps { steps {
//Zarchiwizuj wynik //Zarchiwizuj wynik
archiveArtifacts 'model.pt' archiveArtifacts 'model.pt'
}
}
post {
success {
//Wysłanie maila //Wysłanie maila
emailext body: 'test', emailext body: 'SUCCESS',
subject: 's426206', subject: 's426206',
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms' 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'
} }
} }
} }