-
Notifications
You must be signed in to change notification settings - Fork 126
/
Jenkinsfile
41 lines (34 loc) · 1.31 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@Library('va.gov-devops-jenkins-lib') _
import org.kohsuke.github.GitHub
env.CONCURRENCY = 10
node('vetsgov-general-purpose') {
properties([[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', daysToKeepStr: '60']],
parameters([booleanParam(name: "cancelBuild",
defaultValue: true,
description: "Hack to cancel the run triggered by webhook")])]);
// Checkout vets-website code
dir("vets-website") {
checkout scm
ref = sh(returnStdout: true, script: 'git rev-parse HEAD').trim()
}
def commonStages = load "vets-website/jenkins/common.groovy"
// setupStage
dockerContainer = commonStages.setup()
stage('Review instance') {
if (commonStages.shouldBail()) { return }
try {
if (!commonStages.isReviewable()) {
return
}
build job: 'deploys/vets-review-instance-deploy', parameters: [
stringParam(name: 'devops_branch', value: 'master'),
stringParam(name: 'api_branch', value: 'master'),
stringParam(name: 'web_branch', value: env.BRANCH_NAME),
stringParam(name: 'content_branch', value: env.BRANCH_NAME),
stringParam(name: 'source_repo', value: 'vets-website'),
], wait: false
} catch (error) {
throw error
}
}
}