Sha256: e99640ecb327654da47c132b0b73a0c16f21918562c5d741b2f46a1880c16061

Contents?: true

Size: 989 Bytes

Versions: 3

Compression:

Stored size: 989 Bytes

Contents

#!/usr/bin/env groovy

library("govuk")

REPOSITORY = 'govuk_navigation_helpers'

node {

  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

3 entries across 3 versions & 1 rubygems

Version Path
govuk_navigation_helpers-9.2.1 Jenkinsfile
govuk_navigation_helpers-9.2.0 Jenkinsfile
govuk_navigation_helpers-9.1.0 Jenkinsfile