2021-05-14 19:29:48 +02:00
|
|
|
pipeline {
|
|
|
|
agent any;
|
|
|
|
|
|
|
|
options {
|
|
|
|
copyArtifactPermission('s434742-evaluation_master');
|
|
|
|
}
|
|
|
|
|
|
|
|
parameters {
|
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: 'Which build to use for copying artifacts',
|
|
|
|
name: 'BUILD_SELECTOR'
|
|
|
|
)
|
|
|
|
string(
|
|
|
|
defaultValue: '16',
|
|
|
|
description: 'batch size',
|
|
|
|
name: 'BATCH_SIZE'
|
|
|
|
)
|
|
|
|
string(
|
|
|
|
defaultValue: '10',
|
|
|
|
description: 'epochs',
|
|
|
|
name: 'EPOCHS'
|
|
|
|
)
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('copyArtifacts') {
|
|
|
|
steps {
|
|
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 's434742-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('docker-training') {
|
|
|
|
steps {
|
|
|
|
script {
|
|
|
|
def img = docker.build('patlaz/ium:1.0')
|
|
|
|
img.inside {
|
|
|
|
sh 'chmod +x avocado-training.py'
|
2021-05-14 21:06:49 +02:00
|
|
|
sh "echo ${EPOCHS} ${BATCH_SIZE}"
|
|
|
|
sh "python3 avocado-training.py ${EPOCHS} ${BATCH_SIZE}"
|
2021-05-23 14:51:42 +02:00
|
|
|
sh "python3 avocado-mlflow.py ${EPOCHS} ${BATCH_SIZE}"
|
2021-05-14 19:29:48 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
stage('archiveArtifacts') {
|
|
|
|
steps{
|
|
|
|
archiveArtifacts 'avocado_model.h5'
|
2021-05-23 14:51:42 +02:00
|
|
|
archiveArtifacts 'mlruns/**'
|
|
|
|
archiveArtifacts 'avocado_model/**'
|
2021-05-14 19:29:48 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('sendMail') {
|
|
|
|
steps{
|
|
|
|
emailext body: currentBuild.result ?: 'SUCCESS',
|
|
|
|
subject: 's434742 training',
|
|
|
|
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|