File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
1
pipeline {
2
+
2
3
agent any
4
+
3
5
options {
4
6
disableConcurrentBuilds()
5
7
}
8
+
9
+ environment {
10
+ SPRING_DATASOURCE_USERNAME = credentials(' SPRING_DATASOURCE_USERNAME' )
11
+ SPRING_DATASOURCE_PASSWORD = credentials(' SPRING_DATASOURCE_PASSWORD' )
12
+ }
13
+
6
14
stages {
7
15
8
16
stage(' Build' ) {
13
21
}
14
22
steps {
15
23
echo ' Build'
16
- sh ' (cd ./jamais404/; mvn clean package)'
24
+ sh ' (cd ./jamais404/; mvn clean package -Dspring.profiles.active=prod )'
17
25
stash name : " app" , includes : " **"
18
26
}
19
27
}
20
28
21
29
stage(' SonarCloud' ) {
22
30
steps {
23
31
unstash " app"
24
- sh ' (cd ./jamais404/; mvn sonar:sonar'
32
+ sh ' (cd ./jamais404/; mvn sonar:sonar -Dspring.profiles.active=prod '
25
33
}
26
34
}
27
35
34
42
steps {
35
43
echo ' Test'
36
44
unstash " app"
37
- sh ' (cd ./jamais404/; mvn test)'
45
+ sh ' (cd ./jamais404/; mvn test -Dspring.profiles.active=prod )'
38
46
}
39
47
}
40
48
}
You can’t perform that action at this time.
0 commit comments