2021-09-09 13:49:01 +00:00
|
|
|
# THIS FILE WAS AUTO-GENERATED
|
|
|
|
#
|
|
|
|
# $ lcitool manifest ci/manifest.yml
|
|
|
|
#
|
|
|
|
# https://gitlab.com/libvirt/libvirt-ci
|
|
|
|
|
2022-07-11 11:47:02 +00:00
|
|
|
|
|
|
|
# Variables that can be set to control the behaviour of
|
|
|
|
# pipelines that are run
|
|
|
|
#
|
ci: refresh with latest lcitool manifest
This refresh switches the CI for contributors to be triggered by merge
requests. Pushing to a branch in a fork will no longer run CI pipelines,
in order to avoid consuming CI minutes. To regain the original behaviour
contributors can opt-in to a pipeline on push
git push <remote> -o ci.variable=RUN_PIPELINE=1
This variable can also be set globally on the repository, through the
web UI options Settings -> CI/CD -> Variables, though this is not
recommended. Upstream repo pushes to branches will run CI.
The use of containers has changed in this update, with only the upstream
repo creating containers, in order to avoid consuming contributors'
limited storage quotas. A fork with existing container images may delete
them. Containers will be rebuilt upstream when pushing commits with CI
changes to the default branch. Any other scenario with CI changes will
simply install build pre-requisite packages in a throaway environment,
using the ci/buildenv/ scripts. These scripts may also be used on a
contributor's local machines.
With pipelines triggered by merge requests, it is also now possible to
workaround the inability of contributors to run pipelines if they have
run out of CI quota. A project member can trigger a pipeline from the
merge request, which will run in context of upstream, however, note
this should only be done after reviewing the code for any malicious
CI changes.
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-09-30 08:50:04 +00:00
|
|
|
# - RUN_PIPELINE - force creation of a CI pipeline when
|
|
|
|
# pushing to a branch in a forked repository. Official
|
|
|
|
# CI pipelines are triggered when merge requests are
|
|
|
|
# created/updated. Setting this variable to a non-empty
|
|
|
|
# value allows CI testing prior to opening a merge request.
|
|
|
|
#
|
2023-02-27 11:34:47 +00:00
|
|
|
# - RUN_PIPELINE_UPSTREAM_ENV - same semantics as RUN_PIPELINE,
|
|
|
|
# but uses the CI environment (containers) from the upstream project
|
|
|
|
# rather than creating and updating a throwaway environment
|
|
|
|
# Should not be used if the pushed branch includes CI container
|
|
|
|
# changes.
|
|
|
|
#
|
ci: refresh with latest lcitool manifest
This refresh switches the CI for contributors to be triggered by merge
requests. Pushing to a branch in a fork will no longer run CI pipelines,
in order to avoid consuming CI minutes. To regain the original behaviour
contributors can opt-in to a pipeline on push
git push <remote> -o ci.variable=RUN_PIPELINE=1
This variable can also be set globally on the repository, through the
web UI options Settings -> CI/CD -> Variables, though this is not
recommended. Upstream repo pushes to branches will run CI.
The use of containers has changed in this update, with only the upstream
repo creating containers, in order to avoid consuming contributors'
limited storage quotas. A fork with existing container images may delete
them. Containers will be rebuilt upstream when pushing commits with CI
changes to the default branch. Any other scenario with CI changes will
simply install build pre-requisite packages in a throaway environment,
using the ci/buildenv/ scripts. These scripts may also be used on a
contributor's local machines.
With pipelines triggered by merge requests, it is also now possible to
workaround the inability of contributors to run pipelines if they have
run out of CI quota. A project member can trigger a pipeline from the
merge request, which will run in context of upstream, however, note
this should only be done after reviewing the code for any malicious
CI changes.
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-09-30 08:50:04 +00:00
|
|
|
# - RUN_CONTAINER_BUILDS - CI pipelines in upstream only
|
|
|
|
# publish containers if CI file changes are detected.
|
|
|
|
# Setting this variable to a non-empty value will force
|
|
|
|
# re-publishing, even when no file changes are detected.
|
|
|
|
# Typically to use from a scheduled job once a month.
|
|
|
|
#
|
|
|
|
# - RUN_UPSTREAM_NAMESPACE - the upstream namespace is
|
|
|
|
# configured to default to 'libvirt'. When testing
|
|
|
|
# changes to CI it might be useful to use a different
|
|
|
|
# upstream. Setting this variable will override the
|
|
|
|
# namespace considered to be upstream.
|
2022-07-11 11:47:02 +00:00
|
|
|
#
|
|
|
|
# These can be set as git push options
|
|
|
|
#
|
ci: refresh with latest lcitool manifest
This refresh switches the CI for contributors to be triggered by merge
requests. Pushing to a branch in a fork will no longer run CI pipelines,
in order to avoid consuming CI minutes. To regain the original behaviour
contributors can opt-in to a pipeline on push
git push <remote> -o ci.variable=RUN_PIPELINE=1
This variable can also be set globally on the repository, through the
web UI options Settings -> CI/CD -> Variables, though this is not
recommended. Upstream repo pushes to branches will run CI.
The use of containers has changed in this update, with only the upstream
repo creating containers, in order to avoid consuming contributors'
limited storage quotas. A fork with existing container images may delete
them. Containers will be rebuilt upstream when pushing commits with CI
changes to the default branch. Any other scenario with CI changes will
simply install build pre-requisite packages in a throaway environment,
using the ci/buildenv/ scripts. These scripts may also be used on a
contributor's local machines.
With pipelines triggered by merge requests, it is also now possible to
workaround the inability of contributors to run pipelines if they have
run out of CI quota. A project member can trigger a pipeline from the
merge request, which will run in context of upstream, however, note
this should only be done after reviewing the code for any malicious
CI changes.
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-09-30 08:50:04 +00:00
|
|
|
# $ git push -o ci.variable=RUN_PIPELINE=1
|
2022-07-11 11:47:02 +00:00
|
|
|
#
|
|
|
|
# Aliases can be set for common usage
|
|
|
|
#
|
ci: refresh with latest lcitool manifest
This refresh switches the CI for contributors to be triggered by merge
requests. Pushing to a branch in a fork will no longer run CI pipelines,
in order to avoid consuming CI minutes. To regain the original behaviour
contributors can opt-in to a pipeline on push
git push <remote> -o ci.variable=RUN_PIPELINE=1
This variable can also be set globally on the repository, through the
web UI options Settings -> CI/CD -> Variables, though this is not
recommended. Upstream repo pushes to branches will run CI.
The use of containers has changed in this update, with only the upstream
repo creating containers, in order to avoid consuming contributors'
limited storage quotas. A fork with existing container images may delete
them. Containers will be rebuilt upstream when pushing commits with CI
changes to the default branch. Any other scenario with CI changes will
simply install build pre-requisite packages in a throaway environment,
using the ci/buildenv/ scripts. These scripts may also be used on a
contributor's local machines.
With pipelines triggered by merge requests, it is also now possible to
workaround the inability of contributors to run pipelines if they have
run out of CI quota. A project member can trigger a pipeline from the
merge request, which will run in context of upstream, however, note
this should only be done after reviewing the code for any malicious
CI changes.
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-09-30 08:50:04 +00:00
|
|
|
# $ git config --local alias.push-ci "push -o ci.variable=RUN_PIPELINE=1"
|
2022-07-11 11:47:02 +00:00
|
|
|
#
|
2022-07-22 10:19:53 +00:00
|
|
|
# Allowing the less verbose invocation
|
2022-07-11 11:47:02 +00:00
|
|
|
#
|
ci: refresh with latest lcitool manifest
This refresh switches the CI for contributors to be triggered by merge
requests. Pushing to a branch in a fork will no longer run CI pipelines,
in order to avoid consuming CI minutes. To regain the original behaviour
contributors can opt-in to a pipeline on push
git push <remote> -o ci.variable=RUN_PIPELINE=1
This variable can also be set globally on the repository, through the
web UI options Settings -> CI/CD -> Variables, though this is not
recommended. Upstream repo pushes to branches will run CI.
The use of containers has changed in this update, with only the upstream
repo creating containers, in order to avoid consuming contributors'
limited storage quotas. A fork with existing container images may delete
them. Containers will be rebuilt upstream when pushing commits with CI
changes to the default branch. Any other scenario with CI changes will
simply install build pre-requisite packages in a throaway environment,
using the ci/buildenv/ scripts. These scripts may also be used on a
contributor's local machines.
With pipelines triggered by merge requests, it is also now possible to
workaround the inability of contributors to run pipelines if they have
run out of CI quota. A project member can trigger a pipeline from the
merge request, which will run in context of upstream, however, note
this should only be done after reviewing the code for any malicious
CI changes.
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-09-30 08:50:04 +00:00
|
|
|
# $ git push-ci
|
2022-07-11 11:47:02 +00:00
|
|
|
#
|
|
|
|
# Pipeline variables can also be set in the repository
|
|
|
|
# pipeline config globally, or set against scheduled pipelines
|
|
|
|
|
ci: refresh with latest lcitool manifest
This refresh switches the CI for contributors to be triggered by merge
requests. Pushing to a branch in a fork will no longer run CI pipelines,
in order to avoid consuming CI minutes. To regain the original behaviour
contributors can opt-in to a pipeline on push
git push <remote> -o ci.variable=RUN_PIPELINE=1
This variable can also be set globally on the repository, through the
web UI options Settings -> CI/CD -> Variables, though this is not
recommended. Upstream repo pushes to branches will run CI.
The use of containers has changed in this update, with only the upstream
repo creating containers, in order to avoid consuming contributors'
limited storage quotas. A fork with existing container images may delete
them. Containers will be rebuilt upstream when pushing commits with CI
changes to the default branch. Any other scenario with CI changes will
simply install build pre-requisite packages in a throaway environment,
using the ci/buildenv/ scripts. These scripts may also be used on a
contributor's local machines.
With pipelines triggered by merge requests, it is also now possible to
workaround the inability of contributors to run pipelines if they have
run out of CI quota. A project member can trigger a pipeline from the
merge request, which will run in context of upstream, however, note
this should only be done after reviewing the code for any malicious
CI changes.
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-09-30 08:50:04 +00:00
|
|
|
|
|
|
|
variables:
|
|
|
|
RUN_UPSTREAM_NAMESPACE: libvirt
|
2023-02-27 11:34:47 +00:00
|
|
|
FF_SCRIPT_SECTIONS: 1
|
ci: refresh with latest lcitool manifest
This refresh switches the CI for contributors to be triggered by merge
requests. Pushing to a branch in a fork will no longer run CI pipelines,
in order to avoid consuming CI minutes. To regain the original behaviour
contributors can opt-in to a pipeline on push
git push <remote> -o ci.variable=RUN_PIPELINE=1
This variable can also be set globally on the repository, through the
web UI options Settings -> CI/CD -> Variables, though this is not
recommended. Upstream repo pushes to branches will run CI.
The use of containers has changed in this update, with only the upstream
repo creating containers, in order to avoid consuming contributors'
limited storage quotas. A fork with existing container images may delete
them. Containers will be rebuilt upstream when pushing commits with CI
changes to the default branch. Any other scenario with CI changes will
simply install build pre-requisite packages in a throaway environment,
using the ci/buildenv/ scripts. These scripts may also be used on a
contributor's local machines.
With pipelines triggered by merge requests, it is also now possible to
workaround the inability of contributors to run pipelines if they have
run out of CI quota. A project member can trigger a pipeline from the
merge request, which will run in context of upstream, however, note
this should only be done after reviewing the code for any malicious
CI changes.
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-09-30 08:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
workflow:
|
|
|
|
rules:
|
|
|
|
# upstream+forks: Avoid duplicate pipelines on pushes, if a MR is open
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_OPEN_MERGE_REQUESTS'
|
|
|
|
when: never
|
|
|
|
|
|
|
|
# upstream+forks: Avoid pipelines on tag pushes
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG'
|
|
|
|
when: never
|
|
|
|
|
|
|
|
# upstream+forks: Allow pipelines in scenarios we've figured out job rules
|
|
|
|
- if: '$CI_PIPELINE_SOURCE =~ /^(push|merge_request_event|api|web|schedule)$/'
|
|
|
|
when: always
|
|
|
|
|
|
|
|
# upstream+forks: Avoid all other pipelines
|
|
|
|
- when: never
|
|
|
|
|
|
|
|
|
|
|
|
debug:
|
|
|
|
image: docker.io/library/alpine:3
|
|
|
|
stage: sanity_checks
|
2022-11-14 10:47:29 +00:00
|
|
|
interruptible: true
|
ci: refresh with latest lcitool manifest
This refresh switches the CI for contributors to be triggered by merge
requests. Pushing to a branch in a fork will no longer run CI pipelines,
in order to avoid consuming CI minutes. To regain the original behaviour
contributors can opt-in to a pipeline on push
git push <remote> -o ci.variable=RUN_PIPELINE=1
This variable can also be set globally on the repository, through the
web UI options Settings -> CI/CD -> Variables, though this is not
recommended. Upstream repo pushes to branches will run CI.
The use of containers has changed in this update, with only the upstream
repo creating containers, in order to avoid consuming contributors'
limited storage quotas. A fork with existing container images may delete
them. Containers will be rebuilt upstream when pushing commits with CI
changes to the default branch. Any other scenario with CI changes will
simply install build pre-requisite packages in a throaway environment,
using the ci/buildenv/ scripts. These scripts may also be used on a
contributor's local machines.
With pipelines triggered by merge requests, it is also now possible to
workaround the inability of contributors to run pipelines if they have
run out of CI quota. A project member can trigger a pipeline from the
merge request, which will run in context of upstream, however, note
this should only be done after reviewing the code for any malicious
CI changes.
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-09-30 08:50:04 +00:00
|
|
|
needs: []
|
|
|
|
script:
|
|
|
|
- printenv | sort
|
|
|
|
rules:
|
|
|
|
- if: '$RUN_DEBUG'
|
|
|
|
when: always
|
|
|
|
|
2022-05-26 06:36:47 +00:00
|
|
|
include:
|
2022-05-27 11:35:33 +00:00
|
|
|
- local: '/ci/gitlab/container-templates.yml'
|
|
|
|
- local: '/ci/gitlab/build-templates.yml'
|
|
|
|
- local: '/ci/gitlab/sanity-checks.yml'
|
|
|
|
- local: '/ci/gitlab/containers.yml'
|
|
|
|
- local: '/ci/gitlab/builds.yml'
|