Commit 244fb93d authored by Claudio André's avatar Claudio André

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.
parent 59e3d0c5
......@@ -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"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment