Add git build selector
This commit is contained in:
parent
5b2b990ccb
commit
a0ccb6e3bd
@ -5,6 +5,15 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
parameters {
|
||||||
|
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'main', name: 'BRANCH', type: 'PT_BRANCH'
|
||||||
|
buildSelector(
|
||||||
|
defaultSelector: lastSuccessful(),
|
||||||
|
description: 'Which build to use for copying artifacts',
|
||||||
|
name: 'BUILD_SELECTOR'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
NOTIFICATION_ADDRESS = 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
|
NOTIFICATION_ADDRESS = 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
|
||||||
}
|
}
|
||||||
@ -17,12 +26,12 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage('Get model trend') {
|
stage('Get model trend') {
|
||||||
steps {
|
steps {
|
||||||
copyArtifacts projectName: 's444409-training/main/', selector: lastSuccessful(), optional: true
|
copyArtifacts projectName: "s444409-training/${params.BRANCH}/", selector: buildParameter('BUILD_SELECTOR'), optional: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Get previous trend') {
|
stage('Get previous trend') {
|
||||||
steps {
|
steps {
|
||||||
copyArtifacts projectName: 's444409-evaluation/main/', selector: lastSuccessful(), optional: true
|
copyArtifacts projectName: "s444409-evaluation/${params.BRANCH}/", selector: buildParameter('BUILD_SELECTOR'), optional: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Evaluate model and write results to file') {
|
stage('Evaluate model and write results to file') {
|
||||||
|
@ -12,6 +12,12 @@ pipeline {
|
|||||||
name: 'EPOCHS',
|
name: 'EPOCHS',
|
||||||
trim: true
|
trim: true
|
||||||
)
|
)
|
||||||
|
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'main', name: 'BRANCH', type: 'PT_BRANCH'
|
||||||
|
buildSelector(
|
||||||
|
defaultSelector: lastSuccessful(),
|
||||||
|
description: 'Which build to use for copying artifacts',
|
||||||
|
name: 'BUILD_SELECTOR'
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
agent {
|
agent {
|
||||||
@ -29,7 +35,7 @@ pipeline {
|
|||||||
stage('Archive model and evaluate it') {
|
stage('Archive model and evaluate it') {
|
||||||
steps {
|
steps {
|
||||||
archiveArtifacts artifacts: 'model_out', onlyIfSuccessful: true
|
archiveArtifacts artifacts: 'model_out', onlyIfSuccessful: true
|
||||||
build job: 's444409-evaluation/main/'
|
build job: "s444409-evaluation/${params.BRANCH}/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user