Skip to content

Commit

Permalink
Configure Jenkins to run Pact tests with account-api
Browse files Browse the repository at this point in the history
  • Loading branch information
barrucadu committed Mar 22, 2021
1 parent 7346f7c commit 56581d8
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ node("postgresql-9.6") {
name: 'FRONTEND_BRANCH',
defaultValue: 'master',
description: 'Branch of frontend to run pacts against'
),
stringParam(
name: 'ACCOUNT_API_BRANCH',
defaultValue: 'main',
description: 'Branch of account-api to run pacts against'
)
],
afterTest: {
Expand All @@ -39,6 +44,7 @@ node("postgresql-9.6") {
runPublishingApiPactTests(govuk)
runCollectionsPactTests(govuk)
runFrontendPactTests(govuk)
runAccountApiPactTests(govuk)
}
}
)
Expand Down Expand Up @@ -83,3 +89,14 @@ def runFrontendPactTests(govuk){
}
}
}

def runAccountApiPactTests(govuk){
govuk.checkoutDependent("account-api", [ branch: ACCOUNT_API_BRANCH ]) {
stage("Run account-api pact") {
govuk.bundleApp()
lock("account-api-$NODE_NAME-test") {
govuk.runRakeTask("pact:verify:branch[${env.BRANCH_NAME}]")
}
}
}
}

0 comments on commit 56581d8

Please sign in to comment.