-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
82 lines (74 loc) · 1.91 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
include:
- project: repos/releng/kokkuri
file: includes/images.yaml
- project: repos/releng/docpub
file: includes/publish.yml
stages:
- test
- publish-dist
- build-docs
- publish-docs
verify-deps:
stage: test
extends: .kokkuri:build-and-run-image
parallel:
matrix:
- DISTRO: &supported_distros [buster, bullseye, bookworm]
variables:
BUILD_VARIANT: verify-deps-$DISTRO
test-web:
stage: test
extends: .kokkuri:build-image
variables:
BUILD_VARIANT: test-web
test:
stage: test
extends: .kokkuri:build-image
parallel:
matrix:
- DISTRO: *supported_distros
variables:
BUILD_VARIANT: test-$DISTRO-report
BUILDCTL_BUILD_FLAGS: --output type=local,dest=test-reports
artifacts:
when: always
reports:
junit: test-reports/junit.xml
coverage_report:
coverage_format: cobertura
path: test-reports/coverage.xml
coverage: /(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/
publish-dist:
stage: publish-dist
extends: .kokkuri:build-and-publish-image
parallel:
matrix:
- DISTRO: *supported_distros
variables:
BUILD_VARIANT: binary-dist-$DISTRO
PUBLISH_IMAGE_NAME: ${CI_PROJECT_PATH}/$DISTRO
PUBLISH_IMAGE_TAG: $CI_COMMIT_TAG
PUBLISH_IMAGE_EXTRA_TAGS: 'latest'
tags:
- trusted
rules:
- if: $CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED
.docs-job:
rules:
- if: $CI_PROJECT_PATH == "repos/releng/scap" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_REF_PROTECTED
build-docs:
stage: build-docs
extends:
- .kokkuri:build-image
- .docs-job
- .docpub:build-docs
variables:
BUILD_VARIANT: docs
# We'll end up with generated-documentation/docs/index.html, etc
BUILDCTL_BUILD_FLAGS: --output type=local,dest=generated-documentation
DOCS_DIR: generated-documentation/docs
publish-docs:
stage: publish-docs
extends:
- .docs-job
- .docpub:publish-docs