ium_434742/Jenkinsfile-training
patrycjalazna b5daa4256d
Some checks failed
s434742-training/pipeline/head There was a failure building this commit
Jenkinsfile-training changed, automatic mail sending
2021-05-07 17:43:06 +02:00

52 lines
1.2 KiB
Plaintext

pipeline {
agent {
docker {
image 'patlaz/ium:1.0'
}
}
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('training') {
steps {
sh 'chmod +x avocado-preprocessing.py'
sh 'python3 avocado-preprocessing.py ${EPOCHS} ${BATCH_SIZE}'
}
}
stage('archiveArtifacts') {
steps{
archiveArtifacts 'avocado-model.h5'
}
}
stage('sendMail') {
steps{
emailext body: currentBuild.result ?: 'SUCCESS',
subject: 's434742',
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
}
}
}