-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
103 lines (96 loc) · 1.98 KB
/
.gitlab-ci.yml
File metadata and controls
103 lines (96 loc) · 1.98 KB
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
stages:
- build
- report
- review
- deploy_canary
- deploy_prod
go:
stage: build
trigger:
include: src/api/.gitlab-ci.yml
strategy: depend
report-go:
stage: report
dependencies:
- go
script:
- echo "Generating reports"
- cat src/api/coverage.txt
cache:
key: "$CI_COMMIT_REF_SLUG-reports"
paths:
- src/api/report.xml
- src/api/coverage.txt
- src/api/cobertura.xml
policy: pull
artifacts:
when: always
reports:
coverage_report:
coverage_format: cobertura
path: src/api/cobertura.xml
junit: src/api/report.xml
coverage: /total:.*\s(\d+(?:\.\d+)?%)/
frontend:
stage: build
trigger:
include: src/frontend/.gitlab-ci.yml
strategy: depend
deploy_canary:
image: git.dbyte.xyz/distro/levant
stage: deploy_canary
dependencies:
- go
- frontend
script:
- src/tools/deploy-canary.sh
only:
- master
environment:
name: canary
url: https://canary.prospector.ie
deploy_prod:
image: multani/nomad
stage: deploy_prod
allow_failure: false
when: manual
dependencies:
- go
- frontend
script:
- nomad job promote -address=http://nomad.service.consul:4646 prospector
only:
- master
environment:
name: production
url: https://prospector.ie
deploy_review:
image: git.dbyte.xyz/distro/levant
stage: review
dependencies:
- go
- frontend
script:
- src/tools/deploy-review.sh
except:
- master
environment:
name: review/$CI_COMMIT_REF_SLUG
url: https://$CI_ENVIRONMENT_SLUG.prospector.ie
on_stop: stop_review
stop_review:
image: multani/nomad
stage: review
before_script:
- echo "null"
variables:
GIT_STRATEGY: none
script:
- nomad status -address=http://nomad.service.consul:4646
- nomad job stop -address=http://nomad.service.consul:4646 -purge prospector-${CI_ENVIRONMENT_SLUG}
except:
- master
when: manual
environment:
name: review/$CI_COMMIT_REF_SLUG
action: stop