ium_430705/Jenkinsfile_training

60 lines
1.7 KiB
Plaintext
Raw Normal View History

2021-05-07 22:36:28 +02:00
pipeline {
agent {dockerfile true}
environment {
img = docker.build('s430705/ium:4')
}
2021-05-07 22:36:28 +02:00
parameters {
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR')
string(
defaultValue: '300',
description: 'Number of epochs.',
name: 'epochs',
2021-05-13 09:50:45 +02:00
trim: false)
2021-05-07 22:36:28 +02:00
}
2021-05-07 22:36:28 +02:00
stages {
stage('MLFLOW mounted'){
img.inside('-v /tmp/mlruns:/tmp/mlruns -v /mlruns:/mlruns ') {
sh "export MLFLOW_TRACKING_URI=http://172.17.0.1:5000"
sh "python3 lab08_mfl.py"
}
}
2021-05-07 22:36:28 +02:00
stage('copyArtifacts') {
steps {
copyArtifacts fingerprintArtifacts: true, projectName: 's430705-create-dataset', selector: buildParameter('BUILD_SELECTOR')
sh "rm -rf movies_imdb"
2021-05-23 15:01:32 +02:00
sh "python3 lab08_mfl.py"
sh "python3 lab06_training.py ${epochs}"
2021-05-07 22:36:28 +02:00
}
}
stage('Archive artifacts') {
steps{
2021-05-26 10:00:43 +02:00
archiveArtifacts 'movies_imdb/**'
2021-05-07 22:36:28 +02:00
}
}
}
post {
success {
2021-05-13 12:41:14 +02:00
build job: 's430705-evaluation/master'
2021-05-13 09:54:00 +02:00
mail body: 'SUCCESS',
subject: 's430705',
2021-05-07 23:03:14 +02:00
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
unstable {
2021-05-13 09:54:00 +02:00
mail body: 'UNSTABLE', subject: 's430705', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
failure {
2021-05-13 09:54:00 +02:00
mail body: 'FAILURE', subject: 's430705', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
changed {
2021-05-13 09:54:00 +02:00
mail body: 'CHANGED', subject: 's430705', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
2021-05-07 23:03:14 +02:00
}
2021-05-07 22:36:28 +02:00
}
}