From 5a4b4749082db4683c28e0efdec992ef83f28651 Mon Sep 17 00:00:00 2001 From: Tijmen Brommet Date: Thu, 16 Mar 2017 09:56:00 +0000 Subject: [PATCH] Use shared Jenkins build feature This uses alphagov/govuk-puppet#5611 to build this project. https://trello.com/c/iDWjE1Vz --- Jenkinsfile | 76 +---------------------------------------------------- 1 file changed, 1 insertion(+), 75 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5aab2b8a2..e60b35aba 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,79 +4,5 @@ REPOSITORY = 'government-frontend' node { def govuk = load '/var/lib/jenkins/groovy_scripts/govuk_jenkinslib.groovy' - - properties([ - buildDiscarder( - logRotator( - numToKeepStr: '50') - ), - [$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false], - [$class: 'ThrottleJobProperty', - categories: [], - limitOneJobWithMatchingParams: true, - maxConcurrentPerNode: 1, - maxConcurrentTotal: 0, - paramsToUseForLimit: 'government-frontend', - throttleEnabled: true, - throttleOption: 'category'], - ]) - - try { - stage("Checkout") { - checkout scm - } - - stage("Clean up workspace") { - govuk.cleanupGit() - } - - stage("git merge") { - govuk.mergeMasterBranch() - } - - stage("Configure Rails environment") { - govuk.setEnvar("RAILS_ENV", "test") - } - - stage("Set up content schema dependency") { - govuk.contentSchemaDependency() - govuk.setEnvar("GOVUK_CONTENT_SCHEMAS_PATH", "tmp/govuk-content-schemas") - } - - stage("bundle install") { - govuk.bundleApp() - } - - stage("rubylinter") { - govuk.rubyLinter() - } - - stage("sasslinter") { - govuk.sassLinter() - } - - stage("Precompile assets") { - govuk.precompileAssets() - } - - stage("Run tests") { - govuk.runRakeTask("default") - } - - if (env.BRANCH_NAME == 'master') { - stage("Push release tag") { - govuk.pushTag(REPOSITORY, env.BRANCH_NAME, 'release_' + env.BUILD_NUMBER) - } - } - - govuk.deployIntegration(REPOSITORY, 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 - } + govuk.buildProject() }