qemu: Attach persistent reservations manager if block-copy target requires it
[libvirt.git] / ci / gitlab.yml
blob0daab1267668c46b27ba783cf77fc4956a8a3e03
1 # THIS FILE WAS AUTO-GENERATED
3 #  $ lcitool manifest ci/manifest.yml
5 # https://gitlab.com/libvirt/libvirt-ci
8 # Variables that can be set to control the behaviour of
9 # pipelines that are run
11 #  - RUN_PIPELINE - force creation of a CI pipeline when
12 #    pushing to a branch in a forked repository. Official
13 #    CI pipelines are triggered when merge requests are
14 #    created/updated. Setting this variable allows CI
15 #    testing prior to opening a merge request. A value
16 #    of "0" will create the pipeline but leave all jobs
17 #    to be manually started, while "1" will immediately
18 #    run all default jobs.
20 #  - RUN_PIPELINE_UPSTREAM_ENV - same semantics as RUN_PIPELINE,
21 #    but uses the CI environment (containers) from the upstream project
22 #    rather than creating and updating a throwaway environment
23 #    Should not be used if the pushed branch includes CI container
24 #    changes.
26 #  - RUN_CONTAINER_BUILDS - CI pipelines in upstream only
27 #    publish containers if CI file changes are detected.
28 #    Setting this variable to a non-empty value will force
29 #    re-publishing, even when no file changes are detected.
30 #    Typically to use from a scheduled job once a month.
32 #  - RUN_UPSTREAM_NAMESPACE - the upstream namespace is
33 #    configured to default to 'libvirt'. When testing
34 #    changes to CI it might be useful to use a different
35 #    upstream. Setting this variable will override the
36 #    namespace considered to be upstream.
38 # These can be set as git push options
40 #  $ git push -o ci.variable=RUN_PIPELINE=1
42 # Aliases can be set for common usage
44 #  $ git config --local alias.push-ci "push -o ci.variable=RUN_PIPELINE=0"
45 #  $ git config --local alias.push-ci-now "push -o ci.variable=RUN_PIPELINE=1"
47 # Allowing the less verbose invocation
49 #  $ git push-ci     (create pipeline but don't start jobs)
50 #  $ git push-ci-now (create pipeline and start default jobs)
52 # Pipeline variables can also be set in the repository
53 # pipeline config globally, or set against scheduled pipelines
56 variables:
57   RUN_UPSTREAM_NAMESPACE: libvirt
58   FF_SCRIPT_SECTIONS: 1
61 workflow:
62   rules:
63     # upstream+forks: Avoid duplicate pipelines on pushes, if a MR is open
64     - if: '$CI_PIPELINE_SOURCE == "push" && $CI_OPEN_MERGE_REQUESTS'
65       when: never
67     # upstream+forks: Avoid pipelines on tag pushes
68     - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG'
69       when: never
71     # upstream+forks: Allow pipelines in scenarios we've figured out job rules
72     - if: '$CI_PIPELINE_SOURCE =~ /^(push|merge_request_event|api|web|schedule)$/'
73       when: always
75     # upstream+forks: Avoid all other pipelines
76     - when: never
79 debug:
80   image: docker.io/library/alpine:3
81   stage: sanity_checks
82   interruptible: true
83   needs: []
84   script:
85     - printenv | sort
86   rules:
87     - if: '$RUN_DEBUG'
88       when: always
90 include:
91   - local: '/ci/gitlab/container-templates.yml'
92   - local: '/ci/gitlab/build-templates.yml'
93   - local: '/ci/gitlab/sanity-checks.yml'
94   - local: '/ci/gitlab/containers.yml'
95   - local: '/ci/gitlab/builds.yml'