2021-05-07 16:47:38 +02:00
|
|
|
pipeline {
|
|
|
|
agent {
|
|
|
|
docker {
|
|
|
|
image 'patlaz/ium:1.0'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
parameters {
|
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: 'Which build to use for copying artifacts',
|
|
|
|
name: 'BUILD_SELECTOR'
|
2021-05-07 17:43:06 +02:00
|
|
|
)
|
|
|
|
string(
|
2021-05-07 16:47:38 +02:00
|
|
|
defaultValue: '16',
|
|
|
|
description: 'batch size',
|
|
|
|
name: 'BATCH_SIZE'
|
|
|
|
)
|
|
|
|
string(
|
2021-05-07 17:43:06 +02:00
|
|
|
defaultValue: '10',
|
2021-05-07 16:47:38 +02:00
|
|
|
description: 'epochs',
|
|
|
|
name: 'EPOCHS'
|
|
|
|
)
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('copyArtifacts') {
|
|
|
|
steps {
|
|
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 's434742-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
|
|
|
}
|
|
|
|
}
|
2021-05-07 17:43:06 +02:00
|
|
|
stage('training') {
|
2021-05-07 16:47:38 +02:00
|
|
|
steps {
|
2021-05-07 18:35:19 +02:00
|
|
|
sh 'chmod +x avocado-training.py'
|
|
|
|
sh 'python3 avocado-training.py ${EPOCHS} ${BATCH_SIZE}'
|
2021-05-07 16:47:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
2021-05-07 17:43:06 +02:00
|
|
|
stage('archiveArtifacts') {
|
2021-05-07 16:47:38 +02:00
|
|
|
steps{
|
2021-05-07 17:43:06 +02:00
|
|
|
archiveArtifacts 'avocado-model.h5'
|
2021-05-07 16:47:38 +02:00
|
|
|
}
|
|
|
|
}
|
2021-05-07 17:43:06 +02:00
|
|
|
|
|
|
|
stage('sendMail') {
|
|
|
|
steps{
|
|
|
|
emailext body: currentBuild.result ?: 'SUCCESS',
|
|
|
|
subject: 's434742',
|
|
|
|
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
}
|
|
|
|
}
|
2021-05-07 16:47:38 +02:00
|
|
|
}
|
|
|
|
}
|