Skip to content

Commit f9652e7

Browse files
randomandersonsarahchen6
authored andcommitted
Create a separate job to skip the verify maven job
1 parent 38f98ef commit f9652e7

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.gitlab-ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,6 +880,24 @@ requirements_json_test:
880880
package-oci:
881881
needs: [ build ]
882882

883+
override_verify_maven_central:
884+
image: registry.ddbuild.io/images/base/gbi-ubuntu_2204:release
885+
stage: publish
886+
needs: [ ]
887+
rules:
888+
- if: '$POPULATE_CACHE'
889+
when: never
890+
- when: manual
891+
allow_failure: true
892+
script:
893+
- touch OVERRIDE_MAVEN_VERIFY
894+
cache: # Cache is used to signal between the override_verify_maven_central and verify_maven_central_deployment jobs
895+
- key: $CI_PIPELINE_ID-OVERRIDE_SIGNAL
896+
paths:
897+
- OVERRIDE_MAVEN_VERIFY
898+
policy: push
899+
unprotect: true
900+
883901
# Verify Maven Central deployment is publicly available before publishing OCI images
884902
verify_maven_central_deployment:
885903
image: registry.ddbuild.io/images/base/gbi-ubuntu_2204:release
@@ -892,7 +910,14 @@ verify_maven_central_deployment:
892910
when: on_success
893911
- when: manual
894912
allow_failure: true
913+
cache: # Cache is used to signal between the override_verify_maven_central and verify_maven_central_deployment jobs
914+
- key: $CI_PIPELINE_ID-OVERRIDE_SIGNAL
915+
paths:
916+
- OVERRIDE_MAVEN_VERIFY
917+
policy: pull
918+
unprotect: true
895919
script:
920+
- if [ -f OVERRIDE_MAVEN_VERIFY ]; then echo "SKIPPING MAVEN VERIFICATION"; exit 0; fi
896921
- |
897922
export VERSION=${CI_COMMIT_TAG##v}
898923
ARTIFACT_URLS=(

0 commit comments

Comments
 (0)