From 10011b782ba1833e2a6962e8218756faa7ae7215 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 6 Apr 2021 14:41:27 +0100 Subject: [PATCH 1/3] CI: enable stable tag for successful builds in the CI --- Jenkinsfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index c40e7cf283..52493c5cd6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -282,6 +282,21 @@ pipeline { githubNotify(context: "${env.GITHUB_CHECK_ITS_NAME}", description: "${env.GITHUB_CHECK_ITS_NAME} ...", status: 'PENDING', targetUrl: "${env.JENKINS_URL}search/?q=${env.ITS_PIPELINE.replaceAll('/','+')}") } } + stage('Stable') { + options { skipDefaultCheckout() } + when { + branch 'master' + } + steps { + deleteDir() + unstash 'source' + dir("${BASE_DIR}"){ + setupAPMGitEmail(global: false) + sh(label: "checkout ${BRANCH_NAME} branch", script: "git checkout -f '${BRANCH_NAME}'") + gitCreateTag(tag: 'stable', tagArgs: '--force', pushArgs: '--force') + } + } + } stage('AfterRelease') { options { skipDefaultCheckout() } when { From afc5b7a9816d7c42f56cd16819b98c44beca118f Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Wed, 7 Apr 2021 10:02:45 +0100 Subject: [PATCH 2/3] chore: for testing purposes let's run earlier and for even the PR itself --- Jenkinsfile | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 52493c5cd6..681d9c04db 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -60,6 +60,18 @@ pipeline { stash allowEmpty: true, name: 'source', useDefaultExcludes: false } } + stage('Stable') { + options { skipDefaultCheckout() } + steps { + deleteDir() + unstash 'source' + dir("${BASE_DIR}"){ + setupAPMGitEmail(global: false) + sh(label: "checkout ${BRANCH_NAME} branch", script: "git checkout -f '${BRANCH_NAME}'") + gitCreateTag(tag: 'stable', tagArgs: '--force', pushArgs: '--force') + } + } + } /** Build on a linux environment. */ @@ -282,21 +294,6 @@ pipeline { githubNotify(context: "${env.GITHUB_CHECK_ITS_NAME}", description: "${env.GITHUB_CHECK_ITS_NAME} ...", status: 'PENDING', targetUrl: "${env.JENKINS_URL}search/?q=${env.ITS_PIPELINE.replaceAll('/','+')}") } } - stage('Stable') { - options { skipDefaultCheckout() } - when { - branch 'master' - } - steps { - deleteDir() - unstash 'source' - dir("${BASE_DIR}"){ - setupAPMGitEmail(global: false) - sh(label: "checkout ${BRANCH_NAME} branch", script: "git checkout -f '${BRANCH_NAME}'") - gitCreateTag(tag: 'stable', tagArgs: '--force', pushArgs: '--force') - } - } - } stage('AfterRelease') { options { skipDefaultCheckout() } when { From 199dc5cba10d46ed8d3fb987d99e20c5e6f0e6ec Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Wed, 7 Apr 2021 10:31:59 +0100 Subject: [PATCH 3/3] Revert "chore: for testing purposes" This reverts commit afc5b7a9816d7c42f56cd16819b98c44beca118f. --- Jenkinsfile | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1367282f0b..72958f5ca2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -67,18 +67,6 @@ pipeline { } } } - stage('Stable') { - options { skipDefaultCheckout() } - steps { - deleteDir() - unstash 'source' - dir("${BASE_DIR}"){ - setupAPMGitEmail(global: false) - sh(label: "checkout ${BRANCH_NAME} branch", script: "git checkout -f '${BRANCH_NAME}'") - gitCreateTag(tag: 'stable', tagArgs: '--force', pushArgs: '--force') - } - } - } /** Build on a linux environment. */ @@ -316,6 +304,21 @@ pipeline { githubNotify(context: "${env.GITHUB_CHECK_ITS_NAME}", description: "${env.GITHUB_CHECK_ITS_NAME} ...", status: 'PENDING', targetUrl: "${env.JENKINS_URL}search/?q=${env.ITS_PIPELINE.replaceAll('/','+')}") } } + stage('Stable') { + options { skipDefaultCheckout() } + when { + branch 'master' + } + steps { + deleteDir() + unstash 'source' + dir("${BASE_DIR}"){ + setupAPMGitEmail(global: false) + sh(label: "checkout ${BRANCH_NAME} branch", script: "git checkout -f '${BRANCH_NAME}'") + gitCreateTag(tag: 'stable', tagArgs: '--force', pushArgs: '--force') + } + } + } stage('AfterRelease') { options { skipDefaultCheckout() } when {