Sha256: b10a432a51c7af197d5fd1f0b058226f2d6e9f26e4d32dc884d866bd020178b8
Contents?: true
Size: 1.01 KB
Versions: 6
Compression:
Stored size: 1.01 KB
Contents
#!/usr/bin/env groovy REPOSITORY = 'govuk_schemas' node { def govuk = load '/var/lib/jenkins/groovy_scripts/govuk_jenkinslib.groovy' try { stage('Checkout') { checkout scm } stage('Clean') { govuk.cleanupGit() govuk.mergeMasterBranch() } stage("Set up content schema dependency") { govuk.contentSchemaDependency() } stage('Bundle') { echo 'Bundling' sh("bundle install --path ${JENKINS_HOME}/bundles/${JOB_NAME}") } stage('Linter') { govuk.rubyLinter() } stage('Tests') { govuk.setEnvar('RAILS_ENV', 'test') govuk.runTests('spec') } if(env.BRANCH_NAME == "master") { stage('Publish Gem') { govuk.publishGem(REPOSITORY, env.BRANCH_NAME) } } } catch (e) { currentBuild.result = 'FAILED' step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'govuk-ci-notifications@digital.cabinet-office.gov.uk', sendToIndividuals: true]) throw e } }
Version data entries
6 entries across 6 versions & 1 rubygems