Sha256: 350254609b7c9eccc7de2ed5c78e6c0ed445bf6dc9f750cb60f63fcf4b14bf01

Contents?: true

Size: 1000 Bytes

Versions: 10

Compression:

Stored size: 1000 Bytes

Contents

#!/usr/bin/env groovy

REPOSITORY = 'govuk_content_models'

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

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

    stage('Clean') {
      govuk.cleanupGit()
      govuk.mergeMasterBranch()
    }

    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.setEnvar('GOVUK_APP_DOMAIN', 'dev.gov.uk')
      govuk.runTests()
    }

    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

10 entries across 10 versions & 1 rubygems

Version Path
govuk_content_models-44.4.0 Jenkinsfile
govuk_content_models-44.3.0 Jenkinsfile
govuk_content_models-44.2.1 Jenkinsfile
govuk_content_models-44.2.0 Jenkinsfile
govuk_content_models-44.1.0 Jenkinsfile
govuk_content_models-44.0.1 Jenkinsfile
govuk_content_models-44.0.0 Jenkinsfile
govuk_content_models-43.2.0 Jenkinsfile
govuk_content_models-43.1.0 Jenkinsfile
govuk_content_models-43.0.1 Jenkinsfile