forked from pingidentity/helm-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
158 lines (145 loc) · 3.97 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
include:
- local: helm-tests/template-tests/.gitlab-ci.yml
- local: helm-tests/integration-tests/.gitlab-ci.yml
- local: helm-tests/smoke-tests/.gitlab-ci.yml
- local: helm-tests/examples-test/.gitlab-ci.yml
stages:
- initialization
- test.template
- test.smoke
- test.examples
- test.integration
- publish
- push
- release
- final
default:
before_script:
- ci_scripts/before_script.sh
services:
- $PIPELINE_DEPS_REGISTRY/docker:18.09-dind
image: $RUNNER_IMAGE_X86_64
################################################
# Default variables used by all jobs unless they
# are overridden by the job
#
# - .5-1 cpu
# - 1.9GB of memory with no elasticity
# - poll timeout of 15 minutes (to release capacity)
################################################
variables:
DOCKER_HOST: tcp://localhost:2375
KUBERNETES_CPU_REQUEST: 500m
KUBERNETES_CPU_LIMIT: 1000m
KUBERNETES_MEMORY_REQUEST: 1900000000
KUBERNETES_MEMORY_LIMIT: 1900000000
KUBERNETES_POLL_TIMEOUT: 1200
################################################
# For Docker Compose Tests, provide a kubernetes
# sizing of:
#
# - 95% of a cpu up to 4x (380%)
# - 1.9g of memory with no elasticity
################################################
# variables:
# KUBERNETES_CPU_REQUEST: 950m
# KUBERNETES_CPU_LIMIT: 3800m
# KUBERNETES_MEMORY_REQUEST: 1900000000
# KUBERNETES_MEMORY_LIMIT: 1900000000
################################################
# _____ _ _ _____ _______
# |_ _| \ | |_ _|__ __|
# | | | \| | | | | |
# | | | . ` | | | | |
# _| |_| |\ |_| |
# |_____|_| \_|_____| |_|
#
################################################
intel.i.chartlinter:
stage: initialization
script:
- ci_scripts/helm_chart_linter.sh
except:
variables:
- $CI_COMMIT_REF_NAME =~ /^workspace.*/
- $CI_COMMIT_MESSAGE =~ /\[skip build\]/
- $CI_COMMIT_TAG
intel.i.shfmt:
stage: initialization
script:
- ci_scripts/shfmt.sh --diff
rules:
- changes:
- ci_scripts/*
when: always
################################################
# _____ _ _ _ _
# | __ \ | | | (_) | |
# | |__) | _| |__ | |_ ___| |__
# | ___/ | | | '_ \| | / __| '_ \
# | | | |_| | |_) | | \__ \ | | |
# |_| \__,_|_.__/|_|_|___/_| |_|
#
################################################
p.github:
stage: push
before_script:
- git config --global user.name "${GITLAB_USER}"
- git config --global user.email "${GITLAB_USER}@pingidentity.com"
script:
- git --version
- ci_scripts/push_to_github.sh
rules:
- if: '$CI_COMMIT_REF_NAME =~ /^master$/'
- if: $RELEASE == "true"
################################################
# ____ _
# | _ \ ___| | ___ __ _ ___ ___
# | |_) / _ \ |/ _ \/ _` / __|/ _ \
# | _ < __/ | __/ (_| \__ \ __/
# |_| \_\___|_|\___|\__,_|___/\___|
#
################################################
r.release:
stage: release
before_script:
- git config --global user.name "${GITLAB_USER}"
- git config --global user.email "${GITLAB_USER}@pingidentity.com"
script:
- ci_scripts/release_charts.sh
rules:
- if: $RELEASE == "true" && '$CI_COMMIT_TAG !~ "/^$/"'
################################################
# ______ _____ _ _ _
# | ____|_ _| \ | | /\ | |
# | |__ | | | \| | / \ | |
# | __| | | | . ` | / /\ \ | |
# | | _| |_| |\ |/ ____ \| |____
# |_| |_____|_| \_/_/ \_\______|
################################################
intel.clean-k8s:
stage: final
script:
- ci_scripts/cleanup_kubernetes.sh
when: always
arm.clean-k8s:
stage: final
image: $RUNNER_IMAGE_AARCH64
tags:
- platform=aarch64
script:
- ci_scripts/cleanup_kubernetes.sh
when: always
intel.delete-old-k8s:
stage: final
script:
- ci_scripts/cleanup_old_kubernetes.sh
when: always
arm.delete-old-k8s:
stage: final
image: $RUNNER_IMAGE_AARCH64
tags:
- platform=aarch64
script:
- ci_scripts/cleanup_old_kubernetes.sh
when: always