feat(standard-make): set MKT_PROJECT_VERSION_BRANCH_NAME value by default

This commit is contained in:
wpetit 2023-11-16 14:00:32 +01:00
parent b98e8ad73b
commit 0ac529eac7
1 changed files with 6 additions and 0 deletions

View File

@ -34,6 +34,12 @@ void call(Map options = [:]) {
buildDiscarder(logRotator(daysToKeepStr: jobHistory, numToKeepStr: jobHistory)), buildDiscarder(logRotator(daysToKeepStr: jobHistory, numToKeepStr: jobHistory)),
]) ])
environment {
// Set MKT_PROJECT_VERSION_BRANCH_NAME to Jenkins current branch name by default
// See https://forge.cadoles.com/Cadoles/mktools project
MKT_PROJECT_VERSION_BRANCH_NAME = env.BRANCH_NAME
}
stage('Cancel older jobs') { stage('Cancel older jobs') {
int buildNumber = env.BUILD_NUMBER as int int buildNumber = env.BUILD_NUMBER as int
if (buildNumber > 1) { if (buildNumber > 1) {