diff options
-rw-r--r-- | .gitlab-ci.yml | 3 | ||||
-rw-r--r-- | .gitlab/ci/test.gitlab-ci.yml | 18 |
2 files changed, 21 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bf346226..e889a9a2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -68,3 +68,6 @@ workflow: - if: '$CI_COMMIT_BRANCH =~ /^\d{1,2}\.\d{1,2}$/' variables: DOCS_PROJECT_PIPELINE_TYPE: "Stable branch pipeline" + - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^\d{1,2}\.\d{1,2}$/' + variables: + DOCS_PROJECT_PIPELINE_TYPE: "Stable branch pipeline (backport)" 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: |