Module: check_mk
Branch: master
Commit: 2f2411f3094904e59cb5b5d8b15432c7bff8ba55
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2f2411f3094904…
Author: Alex Zurhake <az(a)mathias-kettner.de>
Date: Fri Apr 12 08:07:37 2019 +0200
Use scm.branches[0].name in all jenkins files
Change-Id: Ie9947f21926dc3cd4e95f60b64cc81d6f4caf762
---
buildscripts/scripts/incremental-build.jenkins | 2 +-
buildscripts/scripts/integration-daily-master.jenkins | 2 +-
buildscripts/scripts/nightly-build.jenkins | 4 ++--
buildscripts/scripts/nightly-cmk-container.jenkins | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/buildscripts/scripts/incremental-build.jenkins
b/buildscripts/scripts/incremental-build.jenkins
index adfaee3..f0adbfd 100644
--- a/buildscripts/scripts/incremental-build.jenkins
+++ b/buildscripts/scripts/incremental-build.jenkins
@@ -16,7 +16,7 @@ DISTRO_LIST.each { DISTRO ->
stage(DISTRO + 'Build something') {
dir('dest'){
sh 'git fetch'
- sh "git checkout ${BRANCH_NAME}"
+ sh "git checkout ${scm.branches[0].name}"
sh 'make -C omd jmx4perl'
}
}
diff --git a/buildscripts/scripts/integration-daily-master.jenkins
b/buildscripts/scripts/integration-daily-master.jenkins
index 3b0eca0..2d7c46c 100644
--- a/buildscripts/scripts/integration-daily-master.jenkins
+++ b/buildscripts/scripts/integration-daily-master.jenkins
@@ -25,7 +25,7 @@ def DOCKER_BUILDS = [:]
def dateFormat = new SimpleDateFormat("yyyy.MM.dd")
def date = new Date()
def CMK_VERSION = dateFormat.format(date)
-def TEST_DATA = '/var/jenkins_home/test-data/' +
BRANCH_NAME.replaceAll("/","-") + '/' + CMK_VERSION
+def TEST_DATA = '/var/jenkins_home/test-data/' +
scm.branches[0].name.replaceAll("/","-") + '/' + CMK_VERSION
node {
docker.withRegistry(DOCKER_REGISTRY, 'nexus') {
diff --git a/buildscripts/scripts/nightly-build.jenkins
b/buildscripts/scripts/nightly-build.jenkins
index d24562d..2b2ea2c 100644
--- a/buildscripts/scripts/nightly-build.jenkins
+++ b/buildscripts/scripts/nightly-build.jenkins
@@ -24,7 +24,7 @@ def DOCKER_BUILDS = [:]
def dateFormat = new SimpleDateFormat("yyyy.MM.dd")
def date = new Date()
def CMK_VERS = dateFormat.format(date)
-def DAILY_DATA = '/var/jenkins_home/daily-data/' +
env.BRANCH_NAME.replaceAll("/","-") + '/' + CMK_VERS
+def DAILY_DATA = '/var/jenkins_home/daily-data/' +
env.scm.branches[0].name.replaceAll("/","-") + '/' + CMK_VERS
def PACKAGE_DIR = '/bauwelt/download'
def GPG_KEY_DIR = '/bauwelt/etc/.gnupg'
@@ -234,7 +234,7 @@ node {
docker.image(IMAGE).inside("-u 0:0 -v ${DAILY_DATA}:${DAILY_DATA} -v
${PACKAGE_DIR}:${PACKAGE_DIR} -v ${GPG_KEY_DIR}:${GPG_KEY_DIR}:ro -v
${RELEASE_KEY_DIR}:${RELEASE_KEY_DIR}:ro --network ci_local-infra") {
stage('Archive artifacts') {
// Only master builds should end up on the Website
- if (BRANCH_NAME == 'master') {
+ if (scm.branches[0].name == 'master') {
sh """
mkdir -p /bauwelt/download/${CMK_VERS}
cd /bauwelt/download/${CMK_VERS}
diff --git a/buildscripts/scripts/nightly-cmk-container.jenkins
b/buildscripts/scripts/nightly-cmk-container.jenkins
index 141409e..7e9b719 100644
--- a/buildscripts/scripts/nightly-cmk-container.jenkins
+++ b/buildscripts/scripts/nightly-cmk-container.jenkins
@@ -11,7 +11,7 @@ currentBuild.description = '\nBuilding the CMK docker
container\n'
def dateFormat = new SimpleDateFormat("yyyy.MM.dd")
def date = new Date()
def CMK_VERS = dateFormat.format(date)
-def DAILY_DATA = '/var/jenkins_home/daily-data/' +
BRANCH_NAME.replaceAll("/","-") + '/' + CMK_VERS
+def DAILY_DATA = '/var/jenkins_home/daily-data/' +
scm.branches[0].name.replaceAll("/","-") + '/' + CMK_VERS
def PACKAGE_DIR = '/bauwelt/download'
def GPG_KEY_DIR = '/bauwelt/etc/.gnupg'