ium_434804/Jenkisfile_train
Dawid 28ff6a037c
All checks were successful
s434804-training/pipeline/head This commit looks good
change training for mlflow
2021-05-28 22:02:33 +02:00

44 lines
1.2 KiB
Plaintext

pipeline {
agent {
docker {
image 's434804/ium:0.5'
args '-v /tmp/mlruns:/tmp/mlruns -v /mlruns:/mlruns '
}
}
parameters {
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
}
stages {
stage('copyArtifacts') {
steps {
copyArtifacts fingerprintArtifacts: true, projectName: 's434804-create-dataset', selector: buildParameter('BUILD_SELECTOR')
}
}
stage('training') {
steps {
sh 'chmod +x tensor.py'
sh 'python3 tensor.py'
sh 'rm -rf country_vaccination'
sh 'chmod +x mlflow_model.py'
sh "export MLFLOW_TRACKING_URI=http://172.17.0.1:5000"
sh 'python3 mlflow_model.py'
}
}
stage('archiveArtifacts') {
steps{
archiveArtifacts 'vaccines_model/saved_model.pb'
}
}
stage('sendMail') {
steps{
emailext body: currentBuild.result ?: 'TRAINING SUCCESS',
subject: 's434804',
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
}
}
}