1 # THIS FILE WAS AUTO-GENERATED
3 # $ lcitool manifest ci/manifest.yml
5 # https://gitlab.com/libvirt/libvirt-ci
9 # We use pre-built containers for any pipelines that are:
11 # - Validating code committed on default upstream branch
12 # - Validating patches targetting default upstream branch
13 # which do not have CI changes
15 # We use a local build env for any pipelines that are:
17 # - Validating code committed to a non-default upstream branch
18 # - Validating patches targetting a non-default upstream branch
19 # - Validating patches targetting default upstream branch which
21 # - Validating code committed to a fork branch
23 # Note: the rules across the prebuilt_env and local_env templates
24 # should be logical inverses, such that jobs are mutually exclusive
26 .gitlab_native_build_job_prebuilt_env:
27 image: $CI_REGISTRY/$RUN_UPSTREAM_NAMESPACE/nbdkit/ci-$NAME:latest
32 # upstream: pushes to the default branch
33 - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $JOB_OPTIONAL'
36 - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
39 # upstream: other web/api/scheduled pipelines targetting the default branch
40 - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $JOB_OPTIONAL'
43 - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH'
46 # upstream+forks: merge requests targetting the default branch, without CI changes
47 - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH'
49 - ci/gitlab/container-templates.yml
50 - ci/containers/$NAME.Dockerfile
52 - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH && $JOB_OPTIONAL'
55 - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH'
58 # upstream+forks: that's all folks
61 .gitlab_native_build_job_local_env:
65 - source ci/buildenv/$NAME.sh
69 # upstream: pushes to a non-default branch
70 - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH && $JOB_OPTIONAL'
73 - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH'
76 - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE && $JOB_OPTIONAL'
79 - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE'
82 # upstream: other web/api/scheduled pipelines targetting non-default branches
83 - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH && $JOB_OPTIONAL'
86 - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH'
89 # forks: other web/api/scheduled pipelines
90 - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $JOB_OPTIONAL'
93 - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/'
96 # upstream+forks: merge requests targetting the default branch, with CI changes
97 - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH && $JOB_OPTIONAL'
99 - ci/gitlab/container-templates.yml
100 - ci/containers/$NAME.Dockerfile
103 - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH'
105 - ci/gitlab/container-templates.yml
106 - ci/containers/$NAME.Dockerfile
109 # upstream+forks: merge requests targetting non-default branches
110 - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH && $JOB_OPTIONAL'
113 - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH'
116 # upstream+forks: that's all folks
121 # We use pre-built containers for any pipelines that are:
123 # - Validating code committed on default upstream branch
124 # - Validating patches targetting default upstream branch
125 # which do not have CI changes
127 # We use a local build env for any pipelines that are:
129 # - Validating code committed to a non-default upstream branch
130 # - Validating patches targetting a non-default upstream branch
131 # - Validating patches targetting default upstream branch which
133 # - Validating code committed to a fork branch
135 # Note: the rules across the prebuilt_env and local_env templates
136 # should be logical inverses, such that jobs are mutually exclusive
138 .gitlab_cross_build_job_prebuilt_env:
139 image: $CI_REGISTRY/$RUN_UPSTREAM_NAMESPACE/nbdkit/ci-$NAME-cross-$CROSS:latest
144 # upstream: pushes to the default branch
145 - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $JOB_OPTIONAL'
148 - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
151 # upstream: other web/api/scheduled pipelines targetting the default branch
152 - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $JOB_OPTIONAL'
155 - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH'
158 # upstream+forks: merge requests targetting the default branch, without CI changes
159 - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH'
161 - ci/gitlab/container-templates.yml
162 - ci/containers/$NAME.Dockerfile
164 - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH && $JOB_OPTIONAL'
167 - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH'
170 # upstream+forks: that's all folks
173 .gitlab_cross_build_job_local_env:
177 - source ci/buildenv/$NAME.sh
181 # upstream: pushes to a non-default branch
182 - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH && $JOB_OPTIONAL'
185 - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH'
188 - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE && $JOB_OPTIONAL'
191 - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE'
194 # upstream: other web/api/scheduled pipelines targetting non-default branches
195 - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH && $JOB_OPTIONAL'
198 - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH'
201 # forks: other web/api/scheduled pipelines
202 - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/ && $JOB_OPTIONAL'
205 - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE =~ /(web|api|schedule)/'
208 # upstream+forks: merge requests targetting the default branch, with CI changes
209 - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH && $JOB_OPTIONAL'
211 - ci/gitlab/container-templates.yml
212 - ci/containers/$NAME.Dockerfile
215 - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH'
217 - ci/gitlab/container-templates.yml
218 - ci/containers/$NAME.Dockerfile
221 # upstream+forks: merge requests targetting non-default branches
222 - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH && $JOB_OPTIONAL'
225 - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH'
228 # upstream+forks: that's all folks
234 image: registry.gitlab.com/libvirt/libvirt-ci/cirrus-run:master
237 - source ci/cirrus/$NAME.vars
238 - sed -e "s|[@]CI_REPOSITORY_URL@|$CI_REPOSITORY_URL|g"
239 -e "s|[@]CI_COMMIT_REF_NAME@|$CI_COMMIT_REF_NAME|g"
240 -e "s|[@]CI_COMMIT_SHA@|$CI_COMMIT_SHA|g"
241 -e "s|[@]CIRRUS_VM_INSTANCE_TYPE@|$CIRRUS_VM_INSTANCE_TYPE|g"
242 -e "s|[@]CIRRUS_VM_IMAGE_SELECTOR@|$CIRRUS_VM_IMAGE_SELECTOR|g"
243 -e "s|[@]CIRRUS_VM_IMAGE_NAME@|$CIRRUS_VM_IMAGE_NAME|g"
244 -e "s|[@]UPDATE_COMMAND@|$UPDATE_COMMAND|g"
245 -e "s|[@]UPGRADE_COMMAND@|$UPGRADE_COMMAND|g"
246 -e "s|[@]INSTALL_COMMAND@|$INSTALL_COMMAND|g"
247 -e "s|[@]PATH@|$PATH_EXTRA${PATH_EXTRA:+:}\$PATH|g"
248 -e "s|[@]PKG_CONFIG_PATH@|$PKG_CONFIG_PATH|g"
249 -e "s|[@]PKGS@|$PKGS|g"
250 -e "s|[@]MAKE@|$MAKE|g"
251 -e "s|[@]PYTHON@|$PYTHON|g"
252 -e "s|[@]PIP3@|$PIP3|g"
253 -e "s|[@]PYPI_PKGS@|$PYPI_PKGS|g"
254 -e "s|[@]XML_CATALOG_FILES@|$XML_CATALOG_FILES|g"
255 <ci/cirrus/build.yml >ci/cirrus/$NAME.yml
256 - cat ci/cirrus/$NAME.yml
257 - cirrus-run -v --show-build-log always ci/cirrus/$NAME.yml
259 # upstream+forks: Can't run unless Cirrus is configured
260 - if: '$CIRRUS_GITHUB_REPO == null || $CIRRUS_API_TOKEN == null'
263 # upstream: pushes to branches
264 - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $JOB_OPTIONAL'
267 - if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push"'
270 # forks: pushes to branches with pipeline requested
271 - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE && $JOB_OPTIONAL'
274 - if: '$CI_PROJECT_NAMESPACE != $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $RUN_PIPELINE'
277 # upstream+forks: Run pipelines on MR, web, api & scheduled
278 - if: '$CI_PIPELINE_SOURCE =~ /(web|api|schedule|merge_request_event)/ && $JOB_OPTIONAL'
281 - if: '$CI_PIPELINE_SOURCE =~ /(web|api|schedule|merge_request_event)/'
284 # upstream+forks: that's all folks