Skip to content

Commit

Permalink
Set PACT_TARGET_BRANCH correctly.
Browse files Browse the repository at this point in the history
When the job runs on master, we need to publish the Pact as "master"
rather than "branch-master", so that the broker orders it correctly and
the publishing-api tests run against the correct branch.
  • Loading branch information
Daniel Roseman committed Feb 6, 2017
1 parent 18cb4f4 commit d12aeb5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ node {
govuk.initializeParameters([
'PUBLISHING_API_BRANCH': 'master',
])
govuk.setEnvar("PACT_TARGET_BRANCH", "branch-${env.BRANCH_NAME}")
def pact_branch = (env.BRANCH_NAME == 'master' ? 'master' : "branch-${env.BRANCH_NAME}")
govuk.setEnvar("PACT_TARGET_BRANCH", pact_branch)
govuk.setEnvar("PACT_BROKER_BASE_URL", "https://pact-broker.dev.publishing.service.gov.uk")

stage("Checkout gds-api-adapters") {
Expand Down

0 comments on commit d12aeb5

Please sign in to comment.