mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-08 17:42:56 +01:00
Set registry conditionally based on instance
This commit is contained in:
parent
3cf1a421f6
commit
519212f0a8
2 changed files with 10 additions and 3 deletions
|
|
@ -4,7 +4,7 @@ include:
|
|||
- local: '.gitlab/ci/*.yml'
|
||||
|
||||
default:
|
||||
image: registry.gitlab.com/gitlab-org/gitlab-build-images/debian-bullseye-slim:docker-20.10.14-buildx-0.8
|
||||
image: ${BASE_BUILD_REGISTRY_IMAGE}/debian-bullseye-slim:docker-20.10.14-buildx-0.8
|
||||
services:
|
||||
- docker:20.10.14-dind
|
||||
before_script:
|
||||
|
|
|
|||
|
|
@ -4,7 +4,14 @@
|
|||
script:
|
||||
- ./scripts/lib/custom-docker-build
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_SERVER_HOST == "gitlab.com"'
|
||||
variables:
|
||||
BASE_BUILD_REGISTRY_IMAGE: registry.gitlab.com/gitlab-org/gitlab-build-images
|
||||
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_SERVER_HOST == "gitlab.com"'
|
||||
variables:
|
||||
PUSH_CUSTOM_IMAGE: "true"
|
||||
BASE_BUILD_REGISTRY_IMAGE: registry.gitlab.com/gitlab-org/gitlab-build-images
|
||||
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && ($CI_SERVER_HOST == "ops.gitlab.net" || $CI_SERVER_HOST == "dev.gitlab.org")'
|
||||
variables:
|
||||
PUSH_CUSTOM_IMAGE: "true"
|
||||
BASE_BUILD_REGISTRY_IMAGE: $CI_REGISTRY_IMAGE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue