[gjs: 1/2] CI: fix for Docker images tag
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 1/2] CI: fix for Docker images tag
- Date: Mon, 9 Jul 2018 10:26:57 +0000 (UTC)
commit 244fb93d911d45dba6d5ec1d442664833b4ae032
Author: Claudio André <claudioandre br gmail com>
Date: Sun Jul 8 19:59:45 2018 -0300
CI: fix for Docker images tag
We should use CI_REGISTRY_IMAGE as the registry. Well, this CI variable
is not available if the user does not have a registry inside GitLab.
That said, the job can't be run if not on a fist class GitLab account.
[skip images][fedora.static-analysis] see restrictions above.
.gitlab-ci.yml | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4cc1e4be..c5cc0407 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -690,18 +690,18 @@ ppc64le:
# Build using the Dockerfile
- |
if [[ -n "${DOCKERFILE}" ]]; then
- docker build -f "$DOCKERFILE" -t "$REPO:$NAME" .
+ docker build -f "$DOCKERFILE" -t "$CI_REGISTRY_IMAGE:$NAME" .
fi
# Prepare to publish
- - docker tag "$REPO:$NAME" "$REPO:job-"$CI_JOB_ID"_$NAME"
+ - docker tag "$CI_REGISTRY_IMAGE:$NAME" "$CI_REGISTRY_IMAGE:job-"$CI_JOB_ID"_$NAME"
- docker images
- docker login ${CI_REGISTRY} -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD}
# Do not push (if requested)
- |
if [[ "${CI_PIPELINE_SOURCE}" == "schedule" || -n "${CI_COMMIT_MESSAGE##*[dont push]*}" ]]; then
- docker push $REPO
+ docker push $CI_REGISTRY_IMAGE
fi
# Done
@@ -714,5 +714,4 @@ fedora.static-analysis:
DOCKER_DRIVER: overlay
DOCKERFILE: "test/extra/Dockerfile.fedora.static-analysis"
NAME: "fedora.static-analysis"
- REPO: "${CI_REGISTRY}/${CI_PROJECT_PATH}"
CRON_TASK: "BUILD_CI_IMAGES"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]