-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
50 lines (44 loc) · 1.5 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
42
43
44
45
46
47
48
49
50
@Library('shared-library') _
pipeline {
agent any
parameters {
choice(choices: Constants.ORGANIZATION_TYPE_NAMES, description: 'Organization type', name: 'org_type')
choice(choices: Constants.TIMEZONES, description: 'Time Zone', name: 'timezone')
string(name: 'saas_id', description: 'SaaS ID')
booleanParam(defaultValue: true, name: 'continueOnError', description: 'Should the entire job fail when a single stage fails?')
extendedChoice(defaultValue: 'United States', multiSelectDelimiter: ',', name: 'country', propertyFile: '/var/jenkins_home/countries.txt', propertyKey: 'Countries', quoteValue: false, saveJSONParameterToFile: false, type: 'PT_SINGLE_SELECT', visibleItemCount: 5)
stashedFile(name: 'image')
}
stages {
stage('setup') {
steps {
script {
env.CHECK = 1 != 1
PHYSICAL = false
}
}
}
stage('will run') {
steps {
script {
echo env.CHECK
if (PHYSICAL) {
echo "1 == 1"
}
}
// unstash('image')
// sh 'mv image $image_FILENAME'
}
}
stage('last') {
when {
expression {
!PHYSICAL
}
}
steps {
echo "Hello World!"
}
}
}
}