As of March 2022 this repository is no longer maintained by the GOV.UK Pay team. We no longer use Jenkins.
pay-jenkins-library is a Jenkins library helper, intended to be used with GOV.UK Pay Jenkins.
This library gets automatically loaded and made available via Jenkins global libraries.
If you want to have Jenkinsfile pull in a branch of this repo, add the below to your Jenkinsfile.
libraries {
lib("pay-jenkins-library@master")
}
- Tags the current git repo with the provided tag
- Pushes the tag to the remote repository
- Optional second argument for an annotation
gitTag(tag, annotation)
- Builds a docker container, tags and pushes to a registry Only 'app' is required, the rest default to the below
buildAppWithMetrics {
app = 'foo'
registry = 'docker.io'
docker_repo = 'govukpay'
push = true
}
NOTE: If app is frontend or selfservice, it also builds the test docker container, runs the tests and compiles static assets, prior to the standard behaviour
- Runs specified e2e tests, pulling docker tag of specific app
runAppE2E('app-name', 'card,products')
gitCommit()
- Deploys a microservice to an environment by triggering
the deploy job passing in params.
tag
is optional, defaults to 'latest-master'tagAfterDeployment
is optional, defaults to falserun_tests
, is optional, defaults to truesmoke_tags
, is optional, defaults to empty stringpromoted_env
, is optional, defaults to true
deployEcs('microservice', 'aws_account', tag, 'tagAfterDeployment', 'run_tests', 'smoke_tags', 'promoted_env')
GOV.UK Pay aims to stay secure for everyone. If you are a security researcher and have discovered a security vulnerability in this code, we appreciate your help in disclosing it to us in a responsible manner. Please refer to our vulnerability disclosure policy and our security.txt file for details.