ium_444517/Jenkinsfile_eval
Kamila 4f6b9471c2
All checks were successful
s444517-training/pipeline/head This commit looks good
s444517-evaluation/pipeline/head This commit looks good
Task 2 Part 2
2022-05-03 18:58:44 +02:00

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'
}
}
}