diff options
author | Marcel Amirault <mamirault@gitlab.com> | 2023-11-22 05:08:22 +0300 |
---|---|---|
committer | Marcel Amirault <mamirault@gitlab.com> | 2023-11-22 05:08:22 +0300 |
commit | 024396d33368dd89047c9a3807a6d0476cb197ec (patch) | |
tree | f72003e3e98e0868586dd95e9be1b068dd6539ae /.gitlab | |
parent | 3312bb04b8e9e4383a442a5374004f77952ca27c (diff) | |
parent | ad2e53a6a3a9fe48b0663757a2976568ba6696d5 (diff) |
Merge branch 'axil-dockerfile-check-template' into 'main'
Check if single.Dockerfile is the same as the X.Y.Dockerfile
See merge request https://gitlab.com/gitlab-org/gitlab-docs/-/merge_requests/4408
Merged-by: Marcel Amirault <mamirault@gitlab.com>
Co-authored-by: Achilleas Pipinellis <axil@gitlab.com>
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: |