-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathJenkinsfile_parameterized
30 lines (25 loc) · 1.28 KB
/
Jenkinsfile_parameterized
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
#!groovy
@Library(value="Infrastructure", changelog=false) _
properties([
parameters([
string(name: 'PRODUCT_NAME', defaultValue: 'ethos', description: ''),
string(name: 'APP', defaultValue: 'repl-docmosis-backend', description: ''),
string(name: 'TYPE', defaultValue: 'java', description: ''),
string(name: 'ENVIRONMENT', defaultValue: 'sandbox', description: 'Environment where code should be build and deployed'),
choice(name: 'SUBSCRIPTION', choices: 'sandbox\nnonprod\nprod\nhmctsdemo', description: 'Azure subscriptions available to build in')
]),
[$class: 'GithubProjectProperty', projectUrlStr: 'github.com/hmcts/ethos-repl-docmosis-service'],
pipelineTriggers([[$class: 'GitHubPushTrigger']])
])
withParameterizedPipeline(params.TYPE, params.PRODUCT_NAME, params.APP, params.ENVIRONMENT, params.SUBSCRIPTION) {
enableSlackNotifications('#ethos-repl-service')
afterSuccess('functional:preview') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/site/serenity/**/*'
}
afterSuccess('functional:demo') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/site/serenity/**/*'
}
afterSuccess('functional:aat') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/site/serenity/**/*'
}
}