diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6e252aae0aa34778bbf3ae938969a7d3dd1fe97f..affcc9d323ab51b3ac5eb3c2c79db344d089cc78 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,6 +42,30 @@ stages: - . bootstrap/etc/lofar20rc.sh || true ## Allow docker image script to execute # - chmod u+x $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh +.base_docker_store_images: + extends: .base_docker_images + script: +# Do not remove 'bash' or statement will be ignored by primitive docker shell + - bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh +docker_store_images_master_tag: + extends: .base_docker_store_images + only: + refs: + - tags + - master +docker_store_images_changes: + extends: .base_docker_store_images + rules: +# https://stackoverflow.com/questions/68955071/how-to-disable-detached-pipelines-in-gitlab + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + when: never + - if: '$CI_COMMIT_TAG != null' + when: never + - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' + when: never + - changes: + - docker-compose/.env + when: always docker_build_image_all: extends: .base_docker_images only: