Skip to content
Snippets Groups Projects
Verified Commit 566dd563 authored by Marek Pikuła's avatar Marek Pikuła
Browse files

ci: Separate out base registry name

parent 707d7e34
No related branches found
No related tags found
No related merge requests found
Checking pipeline status
......@@ -10,7 +10,8 @@ stages:
variables:
# Docker image global configuration.
DOCKER_TAG: latest
DOCKER_IMAGE_NAME: registry.freedesktop.org/pixman/pixman/pixman:${DOCKER_TAG}
DOCKER_REGISTRY_IMAGE: registry.freedesktop.org/pixman/pixman
DOCKER_NAME_FULL: ${DOCKER_REGISTRY_IMAGE}/pixman:${DOCKER_TAG}-${TARGET}
# Execute to load a target-specific environment.
LOAD_TARGET_ENV: source .gitlab-ci.d/01-docker/target-env/${TARGET}.env
......@@ -29,7 +30,7 @@ workflow:
- .gitlab-ci.d/01-docker/**/*
variables:
DOCKER_TAG: $CI_COMMIT_REF_SLUG
DOCKER_IMAGE_NAME: ${CI_REGISTRY_IMAGE}/pixman:${DOCKER_TAG}
DOCKER_REGISTRY_IMAGE: $CI_REGISTRY_IMAGE
# A standard set of GitLab CI triggers (i.e., MR, schedule, default branch,
# and tag).
......
......@@ -33,7 +33,7 @@ spec:
- .gitlab-ci.d/01-docker/**/*
variables:
DOCKER_TAG: $CI_COMMIT_REF_SLUG
DOCKER_IMAGE_NAME: ${CI_REGISTRY_IMAGE}/pixman:${DOCKER_TAG}
DOCKER_REGISTRY_IMAGE: $CI_REGISTRY_IMAGE
- if: "$CI_PIPELINE_SOURCE == 'schedule' && $TARGET =~ $ACTIVE_TARGET_PATTERN"
- if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $TARGET =~ $ACTIVE_TARGET_PATTERN"
- if: "$CI_COMMIT_TAG && $TARGET =~ $ACTIVE_TARGET_PATTERN"
......@@ -69,11 +69,10 @@ spec:
script:
# Prepare environment.
- ${LOAD_TARGET_ENV}
- FULL_IMAGE_NAME=${DOCKER_IMAGE_NAME}-${TARGET}
# Build and push the image.
- buildah bud
--tag ${FULL_IMAGE_NAME}
--tag ${DOCKER_NAME_FULL}
--layers ${CACHE_ARGS}
--target ${TARGET}
--platform=${DOCKER_PLATFORM}
......@@ -82,4 +81,4 @@ spec:
--build-arg LLVM_VERSION=${LLVM_VERSION}
-f Dockerfile .gitlab-ci.d/01-docker/
- buildah images
- buildah push ${FULL_IMAGE_NAME}
- buildah push ${DOCKER_NAME_FULL}
......@@ -2,7 +2,7 @@
.target:all:
image:
name: $DOCKER_IMAGE_NAME-$TARGET
name: $DOCKER_NAME_FULL
rules:
- if: "$TARGET =~ $ACTIVE_TARGET_PATTERN"
before_script:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment