Skip to content

Commit bb07a82

Browse files
author
Dominick Leppich
committed
ci: update to latest CI scripts
1 parent 45b5de9 commit bb07a82

File tree

3 files changed

+24
-10
lines changed

3 files changed

+24
-10
lines changed

.github/workflows/develop-build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ jobs:
4343
draft: false
4444
prerelease: true
4545
files: |
46-
**/target/*.war
46+
**/target/*.jar
4747
install/*

.github/workflows/release-build.yml

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
name: Publish Development Build
2-
3-
permissions:
4-
contents: write
5-
6-
name: Publish Development Build
1+
name: Publish Release Build
72

83
permissions:
94
contents: write
@@ -41,5 +36,5 @@ jobs:
4136
draft: false
4237
prerelease: false
4338
files: |
44-
**/target/*.war
39+
**/target/*.jar
4540
install/*

Jenkinsfile

+21-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ pipeline {
2121
sh 'git reset --hard HEAD && git clean -fdx'
2222
}
2323
}
24-
2524
stage('build-snapshot') {
2625
when {
2726
not {
@@ -72,7 +71,6 @@ pipeline {
7271
}
7372
}
7473
}
75-
7674
stage('deploy-libs') {
7775
when {
7876
anyOf {
@@ -89,6 +87,27 @@ pipeline {
8987
}
9088
}
9189
}
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+
}
92111
}
93112

94113
post {

0 commit comments

Comments
 (0)