-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
58 lines (50 loc) · 1.08 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
stages:
- module-pipelines
- deploy
frontend:
stage: module-pipelines
trigger:
include:
- "/frontend/.gitlab-ci.yml"
strategy: depend
only:
changes:
- frontend/**/*
backend:
stage: module-pipelines
trigger:
include:
- "/backend/.gitlab-ci.yml"
strategy: depend
only:
changes:
- backend/**/*
charts:
stage: module-pipelines
trigger:
include:
- "/infrastructure/momo-store-chart/.gitlab-ci.yml"
strategy: depend
only:
changes:
- infrastructure/momo-store-chart/**/*
deploy-to-prod:
stage: deploy
image: alpine/helm:3.10.0
when: manual
#rules:
# - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
# when: manual
# - if: '$CI_COMMIT_BRANCH == "main"'
# when: manual
before_script:
- mkdir -p ~/.kube
- chmod 600 ~/.kube
- echo "$KUBECONFIG" > ~/.kube/config
- cat ~/.kube/config
- chmod 600 ~/.kube/config
- ls -alh ~/.kube
script:
- cd infrastructure/momo-store-chart
- helm upgrade --install --atomic momo-store .
- rm ~/.kube/config