-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
87 lines (78 loc) · 2.16 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
83
84
85
86
87
include:
- project: 'repos/releng/kokkuri'
file: 'includes/images.yaml'
default:
tags:
- kubernetes
stages:
- lint
- test
- acceptance
- publish
workflow:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
- if: $CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED
lint-code:
stage: lint
extends: .kokkuri:build-and-run-image
variables:
BUILD_VARIANT: make
RUN_ARGUMENTS: '["lint"]'
run-unit-tests:
stage: test
extends: .kokkuri:build-and-run-image
variables:
BUILD_VARIANT: make
RUN_ARGUMENTS: '["test"]'
build-frontend-for-testing:
stage: test
extends: .kokkuri:build-and-publish-image
variables:
BUILD_VARIANT: buildkit
BUILD_TARGET_PLATFORMS: linux/amd64
PUBLISH_IMAGE_TAG: job-${CI_JOB_ID}
rules:
- if: $CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED
when: never
- when: always
build-acceptance-runner:
stage: test
extends: .kokkuri:build-and-publish-image
variables:
BUILD_VARIANT: acceptance
PUBLISH_IMAGE_TAG: job-${CI_JOB_ID}
rules:
- if: $CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED
when: never
- when: always
run-acceptance-tests:
stage: acceptance
image: '${BUILD_ACCEPTANCE_RUNNER_IMAGE_REF}'
variables:
BLUBBER_TEST_IMAGE: '${BUILD_FRONTEND_FOR_TESTING_IMAGE_REF}'
script:
- make examples
parallel:
matrix:
- BLUBBER_ONLY_EXAMPLES: ["@set1", "@set2", "@set3", "@set4"]
rules:
- if: $CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED
when: never
- when: always
# Publish a new version of the buildkit frontend each time a version tag (e.g.
# v0.0.0) is pushed. Note that these tags are marked as protected under
# https://gitlab.wikimedia.org/repos/releng/blubber/-/settings/repository and
# can only be pushed by project maintainers.
build-and-publish-frontend:
stage: publish
extends: .kokkuri:build-and-publish-image
variables:
BUILD_VARIANT: buildkit
BUILD_TARGET_PLATFORMS: linux/amd64 # omit linux/arm64 until T322453 is sorted
PUBLISH_IMAGE_NAME: '${CI_PROJECT_PATH}/buildkit'
tags:
- trusted
rules:
- if: $CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED