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 { agent {
dockerfile true dockerfile true
} }
parameters{
string( parameters{
defaultValue: 'master', gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH'
description: 'training branch name', buildSelector(
name: 'TRAINING_BRANCH' defaultSelector: lastSuccessful(),
) description: 'Which build to use for copying artifacts',
password( name: 'BUILD_SELECTOR'
defaultValue: '', )
description: 'JENKINS password',
name: 'JENKINS_KEY'
)
} }
stages { stages {
stage('Copy prev build artifact') { stage('Copy prev build artifact') {
steps { steps {
@ -35,7 +33,7 @@ pipeline {
stage('Copy') { stage('Copy') {
steps { steps {
copyArtifacts projectName: 's444354-create-dataset' 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' sh 'python3 ./evaluation.py'
archiveArtifacts 'eval.csv, metrics.png' archiveArtifacts 'eval.csv, metrics.png'