branch select parametrization
All checks were successful
s444354-training/pipeline/head This commit looks good
s444354-evaluation/pipeline/head This commit looks good

This commit is contained in:
Adrian Charkiewicz 2022-05-07 11:28:20 +02:00
parent 272cd623ff
commit 8efece9077

View File

@ -2,18 +2,16 @@ pipeline {
agent {
dockerfile true
}
parameters{
string(
defaultValue: 'master',
description: 'training branch name',
name: 'TRAINING_BRANCH'
)
password(
defaultValue: '',
description: 'JENKINS password',
name: 'JENKINS_KEY'
)
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('Copy prev build artifact') {
steps {
@ -35,7 +33,7 @@ pipeline {
stage('Copy') {
steps {
copyArtifacts projectName: 's444354-create-dataset'
copyArtifacts projectName: 's444354-training/$TRAINING_BRANCH'
copyArtifacts projectName: "s444417-training/${params.BRANCH}/", selector: buildParameter('BUILD_SELECTOR'), optional: true
sh 'python3 ./evaluation.py'
archiveArtifacts 'eval.csv, metrics.png'