Sha256: 785b3f5ae5dc483fda4823193fdf1e699e2de75e70d2c1336b57401b3bc74c05

Contents?: true

Size: 847 Bytes

Versions: 10

Compression:

Stored size: 847 Bytes

Contents

#!/usr/bin/env groovy

repoName = JOB_NAME.split('/')[0]

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

  try {
    stage("Checkout") {
      govuk.checkoutFromGitHubWithSSH(repoName)
    }

    stage("Clean up workspace") {
      govuk.cleanupGit()
    }

    stage("bundle install") {
      govuk.setEnvar("RBENV_VERSION", "2.2.2")
      govuk.bundleGem()
    }

    stage("Run tests") {
      govuk.runTests()
    }

    if (env.BRANCH_NAME == "master") {
      stage("Publish gem") {
        govuk.publishGem(repoName, 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 & 6 rubygems

Version Path
vcloud-core-2.2.0 Jenkinsfile
vcloud-tools-tester-2.2.0 Jenkinsfile
vcloud-edge_gateway-2.1.1 Jenkinsfile
vcloud-core-2.1.1 Jenkinsfile
vcloud-net_launcher-2.1.0 Jenkinsfile
vcloud-walker-5.1.0 Jenkinsfile
vcloud-edge_gateway-2.1.0 Jenkinsfile
vcloud-launcher-2.1.0 Jenkinsfile
vcloud-core-2.1.0 Jenkinsfile
vcloud-tools-tester-2.1.0 Jenkinsfile