diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2024-03-29 21:57:49 +0000 |
---|---|---|
committer | Daniel P. Berrangé <berrange@redhat.com> | 2024-03-29 21:57:49 +0000 |
commit | cec67039719becbfbab866f9c23574f389cf9559 (patch) | |
tree | 8912ffb6293ff9cc86adfb111b6b28ef6730b124 | |
parent | e25d813a62fb8fa0ee7aa0748cf720b59a187e71 (diff) | |
download | libvirt-ci-cec67039719becbfbab866f9c23574f389cf9559.zip libvirt-ci-cec67039719becbfbab866f9c23574f389cf9559.tar.gz libvirt-ci-cec67039719becbfbab866f9c23574f389cf9559.tar.bz2 |
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: Daniel P. Berrangé <berrange@redhat.com>
-rw-r--r-- | .gitlab-ci.yml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0d03c8b..4640525 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 |