-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
53 lines (49 loc) · 1.59 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
stages:
- build
- Non-Production Dev Deployment
- Non-Production Stage Deployment
Build IntranetCMS Image:
stage: build
rules:
- if: '$CI_COMMIT_BRANCH == "dev-container-1" || $CI_COMMIT_BRANCH == "stage-container-1"'
tags:
- intranetcms-dev-runner
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/docker/Dockerfile --destination $CI_REGISTRY_IMAGE/intranetcms-build:$CI_COMMIT_SHORT_SHA
Development:
stage: Non-Production Dev Deployment
rules:
- if: '$CI_COMMIT_BRANCH == "dev-container-1"'
tags:
- intranetcms-dev-runner
image: dtzar/helm-kubectl
script:
- kubectl config use-context intranet-cms/intranet-cms-infra:intranetcms-dev-k8s-agent
- apk add gettext
- envsubst < k8s/intranetcms.yml | kubectl apply -f - -n cms-45-dev
environment:
name: dev
url:
kubernetes:
namespace: cms-45-dev
Stage:
stage: Non-Production Stage Deployment
rules:
- if: '$CI_COMMIT_BRANCH == "stage-container-1"'
tags:
- intranetcms-stg-runner
image: dtzar/helm-kubectl
script:
- kubectl config use-context intranet-cms/intracms-infra-stage:intranetcms-stage-k8s-agent
- apk add gettext
- envsubst < k8s/intranetcms-stage.yml | kubectl apply -f - -n cms-45-stage
environment:
name: stage
url:
kubernetes:
namespace: cms-45-stage