diff options
author | Marcel Amirault <mamirault@gitlab.com> | 2023-04-18 18:02:41 +0300 |
---|---|---|
committer | Marcel Amirault <mamirault@gitlab.com> | 2023-04-18 18:02:41 +0300 |
commit | 4e768ae40d5c8f04898112a16b25319b3abd70b0 (patch) | |
tree | 5144c1fce36eb3df683c2e328ee44607fdcf0574 | |
parent | 118621631fa13ecebac1d78c95f23020f21523db (diff) |
Fix rules for image builds in stable branch pipelines
-rw-r--r-- | .gitlab/ci/docker-images.gitlab-ci.yml | 13 | ||||
-rw-r--r-- | .gitlab/ci/rules.gitlab-ci.yml | 4 |
2 files changed, 9 insertions, 8 deletions
diff --git a/.gitlab/ci/docker-images.gitlab-ci.yml b/.gitlab/ci/docker-images.gitlab-ci.yml index 2385bf75..1c8c15ce 100644 --- a/.gitlab/ci/docker-images.gitlab-ci.yml +++ b/.gitlab/ci/docker-images.gitlab-ci.yml @@ -149,6 +149,7 @@ test:image:docs-lint-html: image:docs-single: extends: - .docker_prepare + - .rules_docker_single_images stage: pre-deploy needs: ["test:image:docs-single"] artifacts: {} @@ -168,9 +169,6 @@ image:docs-single: --tag $IMAGE_NAME --file $DOCKERFILE . - docker push $IMAGE_NAME - # Only branches with versions like 10.4 - rules: - - if: '$DOCS_PROJECT_PIPELINE_TYPE == "Stable branch pipeline"' # # Test the GitLab docs single version Docker image if changes made to its Dockerfile @@ -178,7 +176,7 @@ image:docs-single: test:image:docs-single: extends: - .docker_prepare - - .rules_docker_image_tests + - .rules_docker_single_images stage: test variables: GITLAB_VERSION: '15.10' @@ -196,6 +194,7 @@ test:image:docs-single: --build-arg SEARCH_BACKEND="algolia" --tag $IMAGE_NAME --file $DOCKERFILE . + # # Final Docker image containing a single version with lunr.js enabled # It is based on single.Dockerfile for each branch @@ -203,6 +202,7 @@ test:image:docs-single: image:docs-single-lunrjs: extends: - .docker_prepare + - .rules_docker_single_images stage: pre-deploy needs: ["test:image:docs-single-lunrjs"] artifacts: {} @@ -222,9 +222,6 @@ image:docs-single-lunrjs: --tag $IMAGE_NAME --file $DOCKERFILE . - docker push $IMAGE_NAME - # Only branches with versions like 10.4 - rules: - - if: '$DOCS_PROJECT_PIPELINE_TYPE == "Stable branch pipeline"' # # Test the GitLab docs single version Docker image with lunr.js enabled @@ -233,7 +230,7 @@ image:docs-single-lunrjs: test:image:docs-single-lunrjs: extends: - .docker_prepare - - .rules_docker_image_tests + - .rules_docker_single_images stage: test variables: GITLAB_VERSION: '15.6' diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index f3e64011..7f6a2189 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -70,6 +70,10 @@ default: when: manual allow_failure: true +.rules_docker_single_images: + rules: + - if: '$DOCS_PROJECT_PIPELINE_TYPE == "Stable branch pipeline"' + .rules_docker_image_tests: rules: - if: '$DOCS_PROJECT_PIPELINE_TYPE == "Build docker images pipeline"' |