Skip to content

Commit

Permalink
ci: update to latest CI scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominick Leppich committed May 3, 2024
1 parent 7e6ea02 commit 8e44620
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/develop-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ jobs:
draft: false
prerelease: true
files: |
**/target/*.war
**/target/*.jar
install/*
9 changes: 2 additions & 7 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
name: Publish Development Build

permissions:
contents: write

name: Publish Development Build
name: Publish Release Build

permissions:
contents: write
Expand Down Expand Up @@ -41,5 +36,5 @@ jobs:
draft: false
prerelease: false
files: |
**/target/*.war
**/target/*.jar
install/*
23 changes: 21 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ pipeline {
sh 'git reset --hard HEAD && git clean -fdx'
}
}

stage('build-snapshot') {
when {
not {
Expand Down Expand Up @@ -72,7 +71,6 @@ pipeline {
}
}
}

stage('deploy-libs') {
when {
anyOf {
Expand All @@ -89,6 +87,27 @@ pipeline {
}
}
}
stage('tag release') {
when { branch 'master' }
steps {
withCredentials([gitUsernamePassword(credentialsId: '93f7e7d3-8f74-4744-a785-518fc4d55314',
gitToolName: 'git-tool')]) {
sh '''#!/bin/bash -xe
projectversion=$(mvn org.apache.maven.plugins:maven-help-plugin:3.4.0:evaluate -Dexpression=project.version -q -DforceStdout)
if [ $? != 0 ]
then
exit 1
elif [[ "${projectversion}" =~ "SNAPSHOT" ]]
then
echo "This is a SNAPSHOT version"
exit 1
fi
echo "${projectversion}"
git tag -a "v${projectversion}" -m "releasing v${projectversion}" && git push origin v"${projectversion}"
'''
}
}
}
}

post {
Expand Down

0 comments on commit 8e44620

Please sign in to comment.