forked from kbsri86/First_repo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsFile3_Substages_Parallel
95 lines (75 loc) · 2.65 KB
/
JenkinsFile3_Substages_Parallel
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
pipeline {
agent any
tools {
maven 'Maven'
}
stages {
stage('Build1') {
stages {
stage("Build1.1") {
environment {
SCANNER_HOME = tool 'sonarScanner'
}
steps {
echo "build 1.1"
snDevOpsChange()
//withSonarQubeEnv('Sonar_Cloud') {
//sh '${SCANNER_HOME}/bin/sonar-scanner -Dproject.settings=${SCANNER_HOME}/conf/qa-sonar-scanner-cloud.properties'
//}
//withSonarQubeEnv('sonarQube_local') {
//sh '${SCANNER_HOME}/bin/sonar-scanner -Dproject.settings=${SCANNER_HOME}/conf/qa-sonar-scanner.properties'
//}
}
}
stage("Build1.2") {
stages {
stage("Build1.2.3") {
environment {
SCANNER_HOME = tool 'sonarScanner'
}
steps {
snDevOpsChange()
echo "build 1.2.3"
//withSonarQubeEnv('sonarQube_local') {
//sh '${SCANNER_HOME}/bin/sonar-scanner -Dproject.settings=${SCANNER_HOME}/conf/qa-sonar-scanner.properties'
//}
}
}
stage("Build1.2.4") {
steps {
echo 'Build1.2.4'
snDevOpsChange()
}
}
}
}
}
}
stage('Test1') {
parallel {
stage('Test1.1') {
steps {
echo 'Test1.1'
snDevOpsChange()
}
post {
success {
echo 'Test1.1-success'
}
}
}
stage('Test1.2') {
steps {
snDevOpsChange()
echo 'Test1.2'
}
post {
success {
echo 'Test1.2-success'
}
}
}
}
}
}
}