-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
65 lines (64 loc) · 1.93 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
pipeline {
environment {
FOO2 = "BAR2"
}
parameters {
string(name: 'PERSON', defaultValue: 'Mr Jenkins', description: 'Who should I say hello to?')
choice(name: 'server',choices:'192.168.1.107,9090,*****,*****\n192.168.1.60,9090,*****,*****', description: 'server choice:(IP,JettyPort,Name,Passwd)')
}
agent { label "master" }
stages {
stage("test01") {
steps {
echo "01.FOO is ${FOO2}"
}
}
stage("test02") {
environment {
FOO3 = "BAR3"
}
steps {
echo "02.FOO is ${FOO2}"
echo "02.FOO is ${FOO2}"
echo "02.FOO is ${FOO2}"
echo "02-1.FOO is ${FOO3}"
}
}
stage("test03") {
when {
branch 'master'
}
steps {
echo "03.FOO is ${FOO2}"
echo "Hello ${params.PERSON}"
script {
FOO2 = "be_changed"
def browsers = "test_browsers"
echo "04.FOO is ${browsers}"
echo "05.changed_FOO2 is ${FOO2}"
}
input message: 'Finished output after statements? (Click "Proceed" to continue)'
echo "06.changed_FOO2 is ${FOO2}"
}
}
stage("test04") {
parallel{
stage("branch_01"){
steps {
echo "07.changed_FOO2 is ${FOO2}"
}
}
stage("branch_02"){
steps {
echo "08.changed_FOO2 is ${FOO2}"
}
}
stage("branch_03"){
steps {
echo "09.changed_FOO2 is ${FOO2}"
}
}
}
}
}
}