mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 19:41:16 +00:00
Two notable changes: * the macOS platform has switched from x86_64 to aarch64 * if a new pipeline starts before a previous one finishes, jobs marked 'interruptible: true' will be auto-cancelled Reviewed-by: Pavel Hrdina <phrdina@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
# THIS FILE WAS AUTO-GENERATED
|
|
#
|
|
# $ lcitool manifest ci/manifest.yml
|
|
#
|
|
# https://gitlab.com/libvirt/libvirt-ci
|
|
|
|
|
|
# We want to publish containers with tag 'latest':
|
|
#
|
|
# - In upstream, for push to default branch with CI changes.
|
|
# - In upstream, on request, for scheduled/manual pipelines
|
|
# against default branch
|
|
#
|
|
# Note: never publish from merge requests since they have non-committed code
|
|
#
|
|
.container_job:
|
|
image: docker:stable
|
|
stage: containers
|
|
interruptible: false
|
|
needs: []
|
|
services:
|
|
- docker:dind
|
|
before_script:
|
|
- export TAG="$CI_REGISTRY_IMAGE/ci-$NAME:latest"
|
|
- docker info
|
|
- docker login "$CI_REGISTRY" -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
|
|
script:
|
|
- docker build --tag "$TAG" -f "ci/containers/$NAME.Dockerfile" ci/containers ;
|
|
- docker push "$TAG"
|
|
after_script:
|
|
- docker logout
|
|
rules:
|
|
# upstream: publish containers if there were CI changes on the default branch
|
|
- if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
|
when: on_success
|
|
changes:
|
|
- ci/gitlab/container-templates.yml
|
|
- ci/containers/$NAME.Dockerfile
|
|
|
|
# upstream: allow force re-publishing containers on default branch for web/api/scheduled pipelines
|
|
- if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $RUN_CONTAINER_BUILDS == "1"'
|
|
when: on_success
|
|
|
|
# upstream+forks: that's all folks
|
|
- when: never
|