-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
62 lines (55 loc) · 1.41 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
# Mandatory include
include:
- project: "city-of-helsinki/kuva/ci-cd-config/ci-configuration"
ref: v2
file: "/.gitlab-ci-template.yml"
# These variables are available for all stages
variables:
SERVICE_PORT: 3000
K8S_SECRET_PORT: 3000
POSTGRES_ENABLED: 0
build-review:
# These variables are available only for review env and are merged with the general variables defined above.
extends: .build
# Build time variables
variables:
DOCKER_IMAGE_NAME: "$CI_PROJECT_NAME-review"
only:
refs:
- external_pull_requests
build-staging:
extends: .build
# Build time variables
variables:
DOCKER_IMAGE_NAME: "$CI_PROJECT_NAME-staging"
only:
refs:
- develop
build-production:
extends: .build
# Build time variables
variables:
DOCKER_IMAGE_NAME: "$CI_PROJECT_NAME-production"
only:
refs:
- master
# this regexp will match release-tags
- /^release-.*$/
review:
# Runtime variables
variables:
POSTGRES_ENABLED: 0
DOCKER_IMAGE_NAME: "$CI_PROJECT_NAME-review"
staging:
# Runtime variables
variables:
DOCKER_IMAGE_NAME: "$CI_PROJECT_NAME-staging"
# By default the staging environment is created from the master-branch.
# Here we define that it should be created from the branch called "develop" instead.
only:
refs:
- develop
production:
# Runtime variables
variables:
DOCKER_IMAGE_NAME: "$CI_PROJECT_NAME-production"