diff options
author | Marcel Amirault <mamirault@gitlab.com> | 2023-04-18 18:02:41 +0300 |
---|---|---|
committer | Evan Read <eread@gitlab.com> | 2023-04-19 02:45:51 +0300 |
commit | c35b45bf60ba95336819d5a1587d97a6ea6e7b19 (patch) | |
tree | 170b118cc627878786b87771d7a11cc607264d7d | |
parent | 2710387ceb7cd15d77dbf8e59a46aa681cf00b12 (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"' |