Skip to content
Snippets Groups Projects
Commit cec67039 authored by Daniel P. Berrangé's avatar Daniel P. Berrangé :speech_balloon:
Browse files

gitlab: fix republishing containers after forced pipeline


Currently containers are only published in response to a 'push' event
which touched the container sources.

If we need to recover from pristine state with no containers, then we
must publish containers if a pipeline is forced with 'RUN_PIPELINE=1'
on the default branch too.

Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
parent e25d813a
No related branches found
No related tags found
1 merge request!472gitlab: fix republishing containers after forced pipeline
......@@ -43,8 +43,8 @@ stages:
- docker login registry.gitlab.com -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD}
script:
- docker build --tag ${CI_REGISTRY_IMAGE}/${NAME}:latest containers/${NAME}
- if test "${CI_PIPELINE_SOURCE}" = "push" &&
test "${CI_COMMIT_REF_NAME}" = "${CI_DEFAULT_BRANCH}";
- if test "${CI_COMMIT_REF_NAME}" = "${CI_DEFAULT_BRANCH}" &&
( test "${CI_PIPELINE_SOURCE}" = "push" || test "${RUN_PIPELINE}" = "1" )
then
docker push ${CI_REGISTRY_IMAGE}/${NAME}:latest;
fi
......
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