correct pipeline
This commit is contained in:
parent
54ff18600e
commit
18a0830c33
3 changed files with 5 additions and 45 deletions
|
@ -11,9 +11,10 @@ before_script:
|
||||||
- echo "---------- Start CI ----------"
|
- echo "---------- Start CI ----------"
|
||||||
- export GRADLE_USER_HOME=`pwd`/.gradle
|
- export GRADLE_USER_HOME=`pwd`/.gradle
|
||||||
- chmod +x gradlew
|
- chmod +x gradlew
|
||||||
- echo "------ commit tag ---------------"
|
- echo "------ commit info ---------------"
|
||||||
- echo $CI_COMMIT_TAG
|
- echo $CI_COMMIT_TAG
|
||||||
- echo $CI_COMMIT_REF_NAME
|
- echo $CI_COMMIT_REF_NAME
|
||||||
|
- echo "----------------------------------"
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
|
@ -55,33 +56,6 @@ test:
|
||||||
reports:
|
reports:
|
||||||
junit: build/test-results/test/TEST-*.xml
|
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:
|
uberjar:
|
||||||
stage: package
|
stage: package
|
||||||
rules:
|
rules:
|
||||||
|
@ -104,7 +78,8 @@ uberjar:
|
||||||
- 'build/libs/sha512sum.lst'
|
- 'build/libs/sha512sum.lst'
|
||||||
expire_in: never
|
expire_in: never
|
||||||
|
|
||||||
publish-snapshot-lib:
|
|
||||||
|
publish-maven-package:
|
||||||
stage: publish
|
stage: publish
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE != "push"
|
- if: $CI_PIPELINE_SOURCE != "push"
|
||||||
|
@ -117,18 +92,6 @@ publish-snapshot-lib:
|
||||||
paths:
|
paths:
|
||||||
- build/libs/*.jar
|
- 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:
|
release:
|
||||||
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||||
|
|
|
@ -18,7 +18,7 @@ apply plugin: "maven-publish"
|
||||||
|
|
||||||
|
|
||||||
group = "org.domaindrivenarchitecture.provs"
|
group = "org.domaindrivenarchitecture.provs"
|
||||||
version = "release-0.22.9"
|
version = "release-0.22.10"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|
|
@ -26,9 +26,6 @@ fi
|
||||||
|
|
||||||
cd build/libs/ || { echo "Error: cd not possible"; exit 7; }
|
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-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-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'
|
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'
|
||||||
|
|
Loading…
Reference in a new issue