ium_444517/Jenkinsfile_eval

48 lines
1.5 KiB
Plaintext

pipeline {
agent {
dockerfile true
}
parameters {
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH'
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
}
stages {
stage('Stage 1') {
steps {
echo 'Hello world!'
}
}
stage('Copy from different Pipeline') {
steps {
copyArtifacts fingerprintArtifacts: true, projectName: 's444517-create-dataset', selector: lastSuccessful()
copyArtifacts fingerprintArtifacts: true, projectName: 's444517-training/${BRANCH}', selector: buildParameter('BUILD_SELECTOR')
copyArtifacts fingerprintArtifacts: true, projectName: 's444517-evaluation/master', selector: lastSuccessful(), optional: true
}
}
stage('Get data save artifacts') {
steps {
sh 'python3 ./nn_train_eval.py'
script {
metrics = readFile(file: 'current_results.txt')
}
archiveArtifacts artifacts: 'my_model/saved_model.pb, metrics.txt, output.jpg'
}
}
}
post {
always {
emailext body: "${currentBuild.currentResult} ${metrics}", subject: 's444517_build_status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
}
}