From b66605b19433bd11b9940c0ad48c57eab7473ccd Mon Sep 17 00:00:00 2001 From: rawlingsj Date: Fri, 24 Mar 2017 10:19:09 +0000 Subject: [PATCH] fix(release): tidy up pipeline code and avoid semantic-release assuming a CD pipeline is debug --- Jenkinsfile | 52 +++++++++++++++++++++++++--------------------------- package.json | 1 + 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a718c40..f67690f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,36 +4,34 @@ def utils = new io.fabric8.Utils() def org = 'fabric8-ui' def repo = 'ngx-fabric8-wit' fabric8UITemplate{ - clientsNode{ - ws { - git "https://github.com/${org}/${repo}.git" - readTrusted 'release.groovy' - sh "git remote set-url origin git@github.com:${org}/${repo}.git" - def pipeline = load 'release.groovy' + ws { + git "https://github.com/${org}/${repo}.git" + readTrusted 'release.groovy' + sh "git remote set-url origin git@github.com:${org}/${repo}.git" + def pipeline = load 'release.groovy' - if (utils.isCI()){ - container('ui'){ - pipeline.ci() - } - } else if (utils.isCD()){ - def branch - container('clients'){ - branch = utils.getBranch() - } - - def published - container('ui'){ - published = pipeline.cd(branch) - } + if (utils.isCI()){ + container('ui'){ + pipeline.ci() + } + } else if (utils.isCD()){ + def branch + container('ui'){ + branch = utils.getBranch() + } + + def published + container('ui'){ + published = pipeline.cd(branch) + } - def releaseVersion - container('clients'){ - releaseVersion = utils.getLatestVersionFromTag() - } + def releaseVersion + container('ui'){ + releaseVersion = utils.getLatestVersionFromTag() + } - if (published){ - pipeline.updateDownstreamProjects(releaseVersion) - } + if (published){ + pipeline.updateDownstreamProjects(releaseVersion) } } } diff --git a/package.json b/package.json index 755ed34..3919434 100644 --- a/package.json +++ b/package.json @@ -190,6 +190,7 @@ }, "release": { "branch": "master", + "debug": false, "verifyConditions": { "path": "./node_modules/@krux/condition-jenkins" }