Skip to content

Commit

Permalink
Merge pull request #897 from alphagov/enable-schema-change-builds
Browse files Browse the repository at this point in the history
Modify Jenkinsfile to allow for schema change builds
  • Loading branch information
36degrees committed Feb 9, 2017
2 parents dc1398a + b7a62f7 commit 080c0af
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ node {
throttleOption: 'category'],
[$class: 'ParametersDefinitionProperty',
parameterDefinitions: [
[$class: 'BooleanParameterDefinition',
name: 'IS_SCHEMA_TEST',
defaultValue: false,
description: 'Identifies whether this build is being triggered to test a change to the content schemas'],
[$class: 'StringParameterDefinition',
name: 'SCHEMA_BRANCH',
defaultValue: 'deployed-to-production',
Expand All @@ -31,9 +35,14 @@ node {
try {
govuk.setEnvar('GOVUK_APP_DOMAIN', 'dev.gov.uk')
govuk.initializeParameters([
'IS_SCHEMA_TEST': 'false',
'SCHEMA_BRANCH': 'deployed-to-production',
])

if (!govuk.isAllowedBranchBuild(env.BRANCH_NAME)) {
return
}

stage('Build') {
checkout scm

Expand Down

0 comments on commit 080c0af

Please sign in to comment.