-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathJenkinsfile_parameterized
More file actions
29 lines (23 loc) · 1015 Bytes
/
Jenkinsfile_parameterized
File metadata and controls
29 lines (23 loc) · 1015 Bytes
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
#!groovy
@Library("Infrastructure") _
def yarnBuilder = new uk.gov.hmcts.contino.YarnBuilder(this)
properties([
parameters([
string(name: 'PRODUCT_NAME', defaultValue: 'ccd', description: ''),
string(name: 'APP', defaultValue: 'admin-web', description: ''),
string(name: 'TYPE', defaultValue: 'nodejs', description: ''),
string(name: 'ENVIRONMENT', defaultValue: 'sandbox', description: 'Environment where code should be build and deployed'),
choice(name: 'SUBSCRIPTION', choices: 'sandbox', description: 'Azure subscriptions available to build in')
]),
[$class: 'GithubProjectProperty', projectUrlStr: 'https://github.com/hmcts/ccd-admin-web'],
pipelineTriggers([[$class: 'GitHubPushTrigger']])
])
withParameterizedPipeline(params.TYPE, params.PRODUCT_NAME, params.APP, params.ENVIRONMENT, params.SUBSCRIPTION) {
enableSlackNotifications('#ccd-param-builds')
afterAlways('checkout') {
sh "yarn cache clean"
}
afterAlways('build') {
yarnBuilder.yarn('setup')
}
}