From 18a0830c3307b149dba4fef11f8af240978e2dbb Mon Sep 17 00:00:00 2001 From: ansgarz Date: Sun, 18 Jun 2023 16:34:54 +0200 Subject: [PATCH] correct pipeline --- .gitlab-ci.yml | 45 +++---------------------------- build.gradle | 2 +- release/create-release-in-repo.sh | 3 --- 3 files changed, 5 insertions(+), 45 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dcb6788..2fba596 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/build.gradle b/build.gradle index 2fabedd..2d33283 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ apply plugin: "maven-publish" group = "org.domaindrivenarchitecture.provs" -version = "release-0.22.9" +version = "release-0.22.10" repositories { mavenCentral() diff --git a/release/create-release-in-repo.sh b/release/create-release-in-repo.sh index f75c729..d5cc9b0 100755 --- a/release/create-release-in-repo.sh +++ b/release/create-release-in-repo.sh @@ -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'