correct pipeline

This commit is contained in:
ansgarz 2023-06-18 16:34:54 +02:00
parent 54ff18600e
commit 18a0830c33
3 changed files with 5 additions and 45 deletions

View file

@ -11,9 +11,10 @@ before_script:
- echo "---------- Start CI ----------"
- export GRADLE_USER_HOME=`pwd`/.gradle
- chmod +x gradlew
- echo "------ commit tag ---------------"
- echo "------ commit info ---------------"
- echo $CI_COMMIT_TAG
- echo $CI_COMMIT_REF_NAME
- echo "----------------------------------"
cache:
paths:
@ -55,33 +56,6 @@ test:
reports:
junit: build/test-results/test/TEST-*.xml
.fatjars:
stage: package
rules:
# Do no allow manually triggered pipelines to prevent duplicates!
# Instead rerun the pipeline created with the last push
- if: $CI_PIPELINE_SOURCE != "push"
when: never
# Only execute when a valid version tag like v1.0, 2.3 or similar is given
# Required is always one point like 1.0
- if: $CI_COMMIT_TAG =~ /^v[0-9]+[.][0-9]+([.][0-9]+)?$/
before_script:
- echo $CI_JOB_ID
# Writing FATJAR_JOB_ID variable to environment file, as variable is needed in the release stage.
- echo FATJAR_JOB_ID=$CI_JOB_ID >> generate_executables.env
script:
- echo "---------- create fatjar ----------"
- ./gradlew fatJarLatest
- ./gradlew fatJarK3s
artifacts:
paths:
- 'build/libs/provs.jar'
- 'build/libs/provs-server.jar'
reports:
# To ensure we've access to this file in the next stage
dotenv: generate_executables.env
expire_in: 6 months
uberjar:
stage: package
rules:
@ -104,7 +78,8 @@ uberjar:
- 'build/libs/sha512sum.lst'
expire_in: never
publish-snapshot-lib:
publish-maven-package:
stage: publish
rules:
- if: $CI_PIPELINE_SOURCE != "push"
@ -117,18 +92,6 @@ publish-snapshot-lib:
paths:
- build/libs/*.jar
.publish-released-lib:
stage: publish
rules:
- if: $CI_PIPELINE_SOURCE != "push"
when: never
- if: $CI_COMMIT_TAG =~ /^release-[0-9]+[.][0-9]+([.][0-9]+)?$/
script:
- ./gradlew -x assemble -x test jar
- ./gradlew -x assemble -x test publishLibraryPublicationToMeissaRepository
artifacts:
paths:
- build/libs/*.jar
release:
image: registry.gitlab.com/gitlab-org/release-cli:latest

View file

@ -18,7 +18,7 @@ apply plugin: "maven-publish"
group = "org.domaindrivenarchitecture.provs"
version = "release-0.22.9"
version = "release-0.22.10"
repositories {
mavenCentral()

View file

@ -26,9 +26,6 @@ fi
cd build/libs/ || { echo "Error: cd not possible"; exit 7; }
find . -type f -exec sha256sum {} \; | sort > sha256sum.lst
find . -type f -exec sha512sum {} \; | sort > sha512sum.lst
curl -X 'POST' "${release_url}/${release_id}/assets" -H 'accept: application/json' -H "Authorization: token ${token}" -H 'Content-Type: multipart/form-data' -F 'attachment=@provs-desktop.jar;type=application/x-java-archive'
curl -X 'POST' "${release_url}/${release_id}/assets" -H 'accept: application/json' -H "Authorization: token ${token}" -H 'Content-Type: multipart/form-data' -F 'attachment=@provs-server.jar;type=application/x-java-archive'
curl -X 'POST' "${release_url}/${release_id}/assets" -H 'accept: application/json' -H "Authorization: token ${token}" -H 'Content-Type: multipart/form-data' -F 'attachment=@provs-syspec.jar;type=application/x-java-archive'