forked from jobtome-labs/ci-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
helm-multiregion.yml
137 lines (131 loc) · 4.3 KB
/
helm-multiregion.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
include:
- remote: 'https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.0.1/helm-quality.yml'
# EUROPE
deploy:production:europe:helm:
extends: .deploy:production:helm
variables:
GOOGLE_KEY: ${GOOGLE_KEY_PRODUCTION_EUROPE}
CLUSTER_NAME: ${CLUSTER_NAME_PRODUCTION_EUROPE}
CLUSTER_ZONE: ${CLUSTER_ZONE_PRODUCTION_EUROPE}
DOMAIN: ${DOMAIN_PRODUCTION_EUROPE}
SECRET_YAML: ${SECRET_YAML_PRODUCTION_EUROPE}
NAMESPACE: ${NAMESPACE_PRODUCTION_EUROPE}
ENVIRONMENT: production
ENVIRONMENT_NAME: production-europe
ENVIRONMENT_PATH: ${ENVIRONMENT_PATH_EUROPE}
before_script:
- |
# CHECK VARIABLES PHASE
for var in "GOOGLE_KEY_PRODUCTION_EUROPE" "CLUSTER_NAME_PRODUCTION_EUROPE" "CLUSTER_ZONE_PRODUCTION_EUROPE"; do
if [ -z "${!var}" ]; then
echo "Missing '${var}' variable!"
exit 1
fi
done
verify:production:europe:
extends: .verify
stage: verify
variables:
GOOGLE_KEY: ${GOOGLE_KEY_PRODUCTION_EUROPE}
CLUSTER_NAME: ${CLUSTER_NAME_PRODUCTION_EUROPE}
CLUSTER_ZONE: ${CLUSTER_ZONE_PRODUCTION_EUROPE}
NAMESPACE: ${NAMESPACE_PRODUCTION_EUROPE}
before_script:
- |
# CHECK VARIABLES PHASE
for var in "GOOGLE_KEY_PRODUCTION_EUROPE" "CLUSTER_NAME_PRODUCTION_EUROPE" "CLUSTER_ZONE_PRODUCTION_EUROPE" "NAMESPACE_PRODUCTION_EUROPE"; do
if [ -z "${!var}" ]; then
echo "Missing '${var}' variable!"
exit 1
fi
done
only:
- /^v.+$/i
except:
- branches
# AMERICA
deploy:production:america:helm:
extends: .deploy:production:helm
variables:
GOOGLE_KEY: ${GOOGLE_KEY_PRODUCTION_AMERICA}
CLUSTER_NAME: ${CLUSTER_NAME_PRODUCTION_AMERICA}
CLUSTER_ZONE: ${CLUSTER_ZONE_PRODUCTION_AMERICA}
DOMAIN: ${DOMAIN_PRODUCTION_AMERICA}
SECRET_YAML: ${SECRET_YAML_PRODUCTION_AMERICA}
NAMESPACE: ${NAMESPACE_PRODUCTION_AMERICA}
ENVIRONMENT: production
ENVIRONMENT_NAME: production-america
ENVIRONMENT_PATH: ${ENVIRONMENT_PATH_AMERICA}
before_script:
- |
# CHECK VARIABLES PHASE
for var in "GOOGLE_KEY_PRODUCTION_AMERICA" "CLUSTER_NAME_PRODUCTION_AMERICA" "CLUSTER_ZONE_PRODUCTION_AMERICA"; do
if [ -z "${!var}" ]; then
echo "Missing '${var}' variable!"
exit 1
fi
done
verify:production:america:
extends: .verify
stage: verify
variables:
GOOGLE_KEY: ${GOOGLE_KEY_PRODUCTION_AMERICA}
CLUSTER_NAME: ${CLUSTER_NAME_PRODUCTION_AMERICA}
CLUSTER_ZONE: ${CLUSTER_ZONE_PRODUCTION_AMERICA}
NAMESPACE: ${NAMESPACE_PRODUCTION_AMERICA}
before_script:
- |
# CHECK VARIABLES PHASE
for var in "GOOGLE_KEY_PRODUCTION_AMERICA" "CLUSTER_NAME_PRODUCTION_AMERICA" "CLUSTER_ZONE_PRODUCTION_AMERICA" "NAMESPACE_PRODUCTION_AMERICA"; do
if [ -z "${!var}" ]; then
echo "Missing '${var}' variable!"
exit 1
fi
done
only:
- /^v.+$/i
except:
- branches
# ASIA
deploy:production:asia:helm:
extends: .deploy:production:helm
variables:
GOOGLE_KEY: ${GOOGLE_KEY_PRODUCTION_ASIA}
CLUSTER_NAME: ${CLUSTER_NAME_PRODUCTION_ASIA}
CLUSTER_ZONE: ${CLUSTER_ZONE_PRODUCTION_ASIA}
DOMAIN: ${DOMAIN_PRODUCTION_ASIA}
SECRET_YAML: ${SECRET_YAML_PRODUCTION_ASIA}
NAMESPACE: ${NAMESPACE_PRODUCTION_ASIA}
ENVIRONMENT: production
ENVIRONMENT_NAME: production-asia
ENVIRONMENT_PATH: ${ENVIRONMENT_PATH_ASIA}
before_script:
- |
# CHECK VARIABLES PHASE
for var in "GOOGLE_KEY_PRODUCTION_ASIA" "CLUSTER_NAME_PRODUCTION_ASIA" "CLUSTER_ZONE_PRODUCTION_ASIA"; do
if [ -z "${!var}" ]; then
echo "Missing '${var}' variable!"
exit 1
fi
done
verify:production:asia:
extends: .verify
stage: verify
variables:
GOOGLE_KEY: ${GOOGLE_KEY_PRODUCTION_ASIA}
CLUSTER_NAME: ${CLUSTER_NAME_PRODUCTION_ASIA}
CLUSTER_ZONE: ${CLUSTER_ZONE_PRODUCTION_ASIA}
NAMESPACE: ${NAMESPACE_PRODUCTION_ASIA}
before_script:
- |
# CHECK VARIABLES PHASE
for var in "GOOGLE_KEY_PRODUCTION_ASIA" "CLUSTER_NAME_PRODUCTION_ASIA" "CLUSTER_ZONE_PRODUCTION_ASIA" "NAMESPACE_PRODUCTION_ASIA"; do
if [ -z "${!var}" ]; then
echo "Missing '${var}' variable!"
exit 1
fi
done
only:
- /^v.+$/i
except:
- branches