ci: Replace .build-only-schedules template with multiple extension

`.build` and `.only-schedules` are orthogonal, and I want to use
`.only-schedules` together with `.cross-template` in future, which would
require creating more cross-product templates.

Avoid that by splitting `extends: .build-only-schedules` into
```
extends:
  - .build
  - .only-schedules
```

Multiple extends are supported by GitLab: https://docs.gitlab.com/ee/ci/yaml/#extends

This introduces no functional changes.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
Philip Withnall 2022-02-20 12:30:19 +00:00
parent 32aa9b7349
commit c44abdc7a2

View File

@ -26,20 +26,21 @@ variables:
except:
- tags
# Some jobs take a long time and are unlikely to find failures (or will find
# failures which are not merge-blockers to fix), so theyre executed on a weekly
# schedule in order to save CI resources and speed up branch pipelines.
.only-schedules:
only:
- schedules
except:
- tags
.build:
extends: .only-default
before_script:
- bash .gitlab-ci/show-execution-environment.sh
- cp -r $HOME/subprojects/* subprojects/
# Some jobs take a long time and are unlikely to find failures (or will find
# failures which are not merge-blockers to fix), so theyre executed on a weekly
# schedule in order to save CI resources and speed up branch pipelines.
.build-only-schedules:
extends: .build
only:
- schedules
style-check-diff:
extends: .only-default
image: $DEBIAN_IMAGE
@ -139,7 +140,9 @@ debian-stable-x86_64:
- "_build/${CI_JOB_NAME}-report.xml"
installed-tests:
extends: .build-only-schedules
extends:
- .build
- .only-schedules
image: $FEDORA_IMAGE
stage: build
needs: []
@ -175,7 +178,9 @@ installed-tests:
- "_build/installed-tests-report/"
G_DISABLE_ASSERT:
extends: .build-only-schedules
extends:
- .build
- .only-schedules
image: $FEDORA_IMAGE
stage: build
needs: []
@ -202,7 +207,9 @@ G_DISABLE_ASSERT:
- "_build/${CI_JOB_NAME}-report.xml"
valgrind:
extends: .build-only-schedules
extends:
- .build
- .only-schedules
image: $FEDORA_IMAGE
stage: analysis
needs: []
@ -478,7 +485,9 @@ coverage:
coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
scan-build:
extends: .build-only-schedules
extends:
- .build
- .only-schedules
image: $FEDORA_IMAGE
stage: analysis
needs: []
@ -502,7 +511,9 @@ scan-build:
- "_scan_build/meson-logs/scanbuild"
coverity:
extends: .build-only-schedules
extends:
- .build
- .only-schedules
image: $COVERITY_IMAGE
stage: analysis
needs: []