File tree 3 files changed +24
-10
lines changed
3 files changed +24
-10
lines changed Original file line number Diff line number Diff line change 43
43
draft : false
44
44
prerelease : true
45
45
files : |
46
- **/target/*.war
46
+ **/target/*.jar
47
47
install/*
Original file line number Diff line number Diff line change 1
- name : Publish Development Build
2
-
3
- permissions :
4
- contents : write
5
-
6
- name : Publish Development Build
1
+ name : Publish Release Build
7
2
8
3
permissions :
9
4
contents : write
41
36
draft : false
42
37
prerelease : false
43
38
files : |
44
- **/target/*.war
39
+ **/target/*.jar
45
40
install/*
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ pipeline {
21
21
sh ' git reset --hard HEAD && git clean -fdx'
22
22
}
23
23
}
24
-
25
24
stage(' build-snapshot' ) {
26
25
when {
27
26
not {
@@ -72,7 +71,6 @@ pipeline {
72
71
}
73
72
}
74
73
}
75
-
76
74
stage(' deploy-libs' ) {
77
75
when {
78
76
anyOf {
@@ -89,6 +87,27 @@ pipeline {
89
87
}
90
88
}
91
89
}
90
+ stage(' tag release' ) {
91
+ when { branch ' master' }
92
+ steps {
93
+ withCredentials([gitUsernamePassword(credentialsId : ' 93f7e7d3-8f74-4744-a785-518fc4d55314' ,
94
+ gitToolName : ' git-tool' )]) {
95
+ sh ''' #!/bin/bash -xe
96
+ projectversion=$(mvn org.apache.maven.plugins:maven-help-plugin:3.4.0:evaluate -Dexpression=project.version -q -DforceStdout)
97
+ if [ $? != 0 ]
98
+ then
99
+ exit 1
100
+ elif [[ "${projectversion}" =~ "SNAPSHOT" ]]
101
+ then
102
+ echo "This is a SNAPSHOT version"
103
+ exit 1
104
+ fi
105
+ echo "${projectversion}"
106
+ git tag -a "v${projectversion}" -m "releasing v${projectversion}" && git push origin v"${projectversion}"
107
+ '''
108
+ }
109
+ }
110
+ }
92
111
}
93
112
94
113
post {
You can’t perform that action at this time.
0 commit comments