From 3f55f5e88c64322565cd6fc6a062f642d9208424 Mon Sep 17 00:00:00 2001 From: James Rawlings Date: Thu, 5 Oct 2017 16:59:36 +0100 Subject: [PATCH] fix(release): make sure we are not on a detached branch else semantic release has issues (#159) --- Jenkinsfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b2ab01d..604f4fd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,9 +5,8 @@ def org = 'fabric8-ui' def repo = 'ngx-fabric8-wit' fabric8UINode{ ws { - git "https://github.com/${org}/${repo}.git" + checkout scm readTrusted 'release.groovy' - sh "git remote set-url origin git@github.com:${org}/${repo}.git" def pipeline = load 'release.groovy' if (utils.isCI()){ @@ -15,6 +14,9 @@ fabric8UINode{ pipeline.ci() } } else if (utils.isCD()){ + sh "git checkout master" + sh "git pull" + sh "git remote set-url origin git@github.com:${org}/${repo}.git" def branch container('ui'){ branch = utils.getBranch()