diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2023-11-22 05:08:22 +0300 |
---|---|---|
committer | Marcel Amirault <mamirault@gitlab.com> | 2023-11-22 05:08:22 +0300 |
commit | ad2e53a6a3a9fe48b0663757a2976568ba6696d5 (patch) | |
tree | 3598f75be6f2dd81c35a77b3e0cc6c6ad6665e00 /.gitlab | |
parent | b0571dd4a83eebebd2db760827a907cdcd5c494a (diff) |
Check if single.Dockerfile is the same as the X.Y.Dockerfile
Diffstat (limited to '.gitlab')
-rw-r--r-- | .gitlab/ci/test.gitlab-ci.yml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/.gitlab/ci/test.gitlab-ci.yml b/.gitlab/ci/test.gitlab-ci.yml index 8f7fdf88..5f5edcac 100644 --- a/.gitlab/ci/test.gitlab-ci.yml +++ b/.gitlab/ci/test.gitlab-ci.yml @@ -70,6 +70,24 @@ check_asdf_installation: - .tool-versions # +# Check if single.Dockerfile is the same as the X.Y.Dockerfile. +# Their only difference should be the assignment of the ARG variable, +# so we can remove this from both files and diff the rest. +# Runs only on stable branches. +# +check_single_dockerfile_template: + image: busybox + needs: [] + stage: test + script: + - sed -i '/ARG VER/d' $CI_COMMIT_REF_NAME.Dockerfile dockerfiles/single.Dockerfile + - difference=$(diff $CI_COMMIT_REF_NAME.Dockerfile dockerfiles/single.Dockerfile) + - if [ -z $difference ]; then echo OK; else exit 1; fi + rules: + - if: '$DOCS_PROJECT_PIPELINE_TYPE == "Stable branch pipeline"' + - if: '$DOCS_PROJECT_PIPELINE_TYPE == "MR pipeline (stable backport)"' + +# # Run rspec tests # rspec: |