-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.gitlab-ci.yml
64 lines (55 loc) · 1.52 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
workflow:
rules:
# Start a pipeline if this is an MR.
- if: $CI_MERGE_REQUEST_IID
# Start a pipeline if a tag is created.
- if: $CI_COMMIT_TAG
# Start a pipeline if an event happened on "main" (e.g. an MR was merged).
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
# Start a pipeline if triggered by the web UI.
- if: $CI_PIPELINE_SOURCE == "web"
stages:
- 00-initialization
- 01-validation
- 02-test-initial-state
- 03-cleanup
- 04-publish
default:
image: "$PDG_CI_RUNNER_IMAGE"
services:
- name: "$PDG_CI_DOCKERHUB_MIRROR/docker:18.09-dind"
tags:
- k8s
variables:
DOCKER_HOST: "tcp://localhost:2375"
DOCKER_API_VERSION: "1.39"
KUBERNETES_CPU_REQUEST: "1250m"
KUBERNETES_CPU_LIMIT: "2000m"
KUBERNETES_MEMORY_REQUEST: "500Mi"
KUBERNETES_MEMORY_LIMIT: "500Mi"
KUBERNETES_POLL_TIMEOUT: 600
initialization:
stage: 00-initialization
script:
- "./.gitlab-ci/00-initialization.sh"
validation:
stage: 01-validation
script:
- "./.gitlab-ci/01-validation.sh"
test-initial-state:
stage: 02-test-initial-state
script:
- "./.gitlab-ci/02-test-initial-state.sh"
cleanup:
stage: 03-cleanup
when: always
script:
- "./.gitlab-ci/03-cleanup.sh"
publish:
stage: 04-publish
rules:
# Only formatted tags will publish. Format is <MAJOR>.<MINOR>-<YYYYMMDD>-<1-INDEX>
# e.g. 8.2-20201207-02 if this is the second tag created on December 12, 2020.
- if: $CI_COMMIT_TAG =~ /^\d+\.\d+\-\d{8}\-\d{2}$/
script:
- "./.gitlab-ci/04-publish.sh"