From 4733e2a2d13cb9a85127ba17c04cc29278b31e89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Fri, 30 Sep 2022 04:50:04 -0400 Subject: ci: refresh with latest lcitool manifest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 -o ci.variable=RUN_PIPELINE=1 This variable can also be set globally on the repository, 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. Signed-off-by: Daniel P. Berrangé --- ci/gitlab/sanity-checks.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 ci/gitlab/sanity-checks.yml (limited to 'ci/gitlab/sanity-checks.yml') diff --git a/ci/gitlab/sanity-checks.yml b/ci/gitlab/sanity-checks.yml new file mode 100644 index 0000000..f843c7f --- /dev/null +++ b/ci/gitlab/sanity-checks.yml @@ -0,0 +1,26 @@ +# THIS FILE WAS AUTO-GENERATED +# +# $ lcitool manifest ci/manifest.yml +# +# https://gitlab.com/libvirt/libvirt-ci + + +check-dco: + stage: sanity_checks + needs: [] + image: registry.gitlab.com/libvirt/libvirt-ci/check-dco:master + script: + - /check-dco "$RUN_UPSTREAM_NAMESPACE" + rules: + # upstream+forks: Run pipelines on MR + - if: '$CI_PIPELINE_SOURCE =~ "merge_request_event"' + when: on_success + + # forks: pushes to branches with pipeline requested + - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH && $RUN_PIPELINE' + when: on_success + + # upstream+forks: that's all folks + - when: never + variables: + GIT_DEPTH: 1000 -- cgit v1.2.1