From 666fbf37d3f95f6fb56eaf4a26fdb3b9d0a45543 Mon Sep 17 00:00:00 2001 From: Jonathan Klee Date: Tue, 18 Jun 2024 08:59:44 +0200 Subject: [PATCH 1/3] Do not block MR for publish jobs --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 753b2e3da..52d01e7b7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -132,6 +132,7 @@ publish-authdatalib: script: - ./gradlew :auth-data-lib:build - ./gradlew :auth-data-lib:publish + allow_failure: true pushToPrebuilt: @@ -182,3 +183,4 @@ publish-contracts: script: - ./gradlew :parental-control-data:build - ./gradlew :parental-control-data:publish + allow_failure: true -- GitLab From 7079935240ab217a25863c8304492374a1cb78c7 Mon Sep 17 00:00:00 2001 From: Jonathan Klee Date: Tue, 18 Jun 2024 09:16:05 +0200 Subject: [PATCH 2/3] Simplify CI rule for MR --- .gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 52d01e7b7..24d798767 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,7 +24,7 @@ buildDebug: test: stage: release rules: - - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + - if: $CI_MERGE_REQUEST_ID when: always script: - ./gradlew test -PtestAccountName="$testAccountName" -PtestAccountPwd="$testAccountPwd" -PtestServerUrl="$testServerUrl" @@ -59,7 +59,7 @@ buildRelease: stage: release allow_failure: false rules: - - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + - if: $CI_MERGE_REQUEST_ID when: always - if: '$CI_COMMIT_REF_PROTECTED == "true"' when: always @@ -112,7 +112,7 @@ buildReleaseStable: lintRelease: extends: .lintReleaseDefault rules: - - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + - if: $CI_MERGE_REQUEST_ID when: always script: - ./gradlew lintRelease @@ -127,7 +127,7 @@ publish-authdatalib: stage: publish needs: ["buildRelease"] rules: - - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + - if: $CI_MERGE_REQUEST_ID when: manual script: - ./gradlew :auth-data-lib:build @@ -176,7 +176,7 @@ publish-contracts: stage: publish needs: ["buildRelease"] rules: - - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + - if: $CI_MERGE_REQUEST_ID when: manual - if: '$CI_COMMIT_TAG !~ "/^$/"' when: always -- GitLab From 4edfb216f8cee09ea81e4a8e8351bb04ff8a05c3 Mon Sep 17 00:00:00 2001 From: Jonathan Klee Date: Tue, 18 Jun 2024 09:21:25 +0200 Subject: [PATCH 3/3] Allow authdatalib publish job on default branch --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 24d798767..becd88092 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -129,6 +129,8 @@ publish-authdatalib: rules: - if: $CI_MERGE_REQUEST_ID when: manual + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + when: manual script: - ./gradlew :auth-data-lib:build - ./gradlew :auth-data-lib:publish -- GitLab