Skip to content
Snippets Groups Projects
Commit e8511d54 authored by Moul's avatar Moul
Browse files

ci: Present docker jobs available only if based on a protected reference

Regarding jobs:
- deploy_docker_test_image
- deploy_docker_release_sha
it doesn’t make sense to have these jobs available since
it will fail with DockerHub password missing since it’s not
running on a protected branch or tag

Brought some difficulty https://forum.duniter.org/t//10164/17

https://stackoverflow.com/questions/54901151/how-do-i-configure-gitlab-ci-jobs-to-run-on-protected-branches-only
parent 633659f4
No related branches found
No related tags found
1 merge request!137Draft: (paused) Publish to GitLab container registry
Pipeline #18955 passed
......@@ -231,6 +231,8 @@ tests_release:
deploy_docker_test_image:
extends: .docker-build-app-image
rules:
- if: $CI_COMMIT_REF_PROTECTED == "false"
when: never
- if: $CI_COMMIT_REF_NAME =~ /^wip*$/
when: manual
- if: '$CI_COMMIT_TAG || $CI_COMMIT_BRANCH == "master"'
......@@ -261,6 +263,8 @@ deploy_docker_debug_sha:
deploy_docker_release_sha:
extends: .docker-build-app-image
rules:
- if: $CI_COMMIT_REF_PROTECTED == "false"
when: never
- if: $CI_COMMIT_TAG
when: never
- when: manual
......@@ -305,4 +309,3 @@ readme_docker_release_tag:
PUSHRM_DEBUG: 1
PUSHRM_FILE: "$CI_PROJECT_DIR/docker/README.md"
script: "/bin/true"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment