Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
Jenkinsfile for new CI
Browse files Browse the repository at this point in the history
The tests assume mongodb is available on port 27017
  • Loading branch information
Mat Moore committed Mar 27, 2017
1 parent f186273 commit db4b364
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env groovy

REPOSITORY = 'backdrop'

node ('mongodb-2.4') {

def govuk = load '/var/lib/jenkins/groovy_scripts/govuk_jenkinslib.groovy'

try {
stage("Checkout") {
checkout scm
}

stage("Build") {
sh "${WORKSPACE}/jenkins.sh"
}

stage("Push release tag") {
govuk.pushTag(REPOSITORY, env.BRANCH_NAME, 'release_' + env.BUILD_NUMBER)
}

stage("Deploy on Integration") {
govuk.deployIntegration("write.backdrop", env.BRANCH_NAME, 'release', 'deploy')
govuk.deployIntegration("read.backdrop", env.BRANCH_NAME, 'release', 'deploy')
}

} catch (e) {
currentBuild.result = "FAILED"
step([$class: 'Mailer',
notifyEveryUnstableBuild: true,
recipients: 'govuk-ci-notifications@digital.cabinet-office.gov.uk',
sendToIndividuals: true])
throw e
}
}

0 comments on commit db4b364

Please sign in to comment.