-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
73 lines (67 loc) · 1.65 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
63
64
65
66
67
68
69
70
71
72
73
image: docker:latest
variables:
release: resume
release_qa: ${release}-qa
namespace: ${release}
before_script:
- mkdir -p ~/.kube
- echo "${KUBE_CONFIG}" | base64 -d > ~/.kube/config
stages:
- build
- deploy
build:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
before_script:
- cat "${CI_SERVER_TLS_CA_FILE}" >> /kaniko/ssl/certs/ca-certificates.crt
script:
- |
tee /kaniko/.docker/config.json <<EOF
{
"auths": {
"${CI_REGISTRY}": {
"username":"${CI_REGISTRY_USER}",
"password":"${CI_REGISTRY_PASSWORD}"
}
}
}
EOF
- |
/kaniko/executor \
--context ${CI_PROJECT_DIR} \
--cache=true \
--dockerfile ${CI_PROJECT_DIR}/Dockerfile \
--destination ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA} \
--destination ${CI_REGISTRY_IMAGE}:latest
deploy:
stage: deploy
image:
name: alpine/helm:3.0.0-rc.1
entrypoint: [""]
script:
- |
/usr/bin/helm upgrade ${release} \
./resume --install \
--namespace ${namespace} \
--values env/prod/values.yaml \
--set image.tag=${CI_COMMIT_SHA} \
--set image.repository=${CI_REGISTRY_IMAGE}
only:
- master
deploy-qa:
stage: deploy
image:
name: alpine/helm:3.0.0-rc.1
entrypoint: [""]
script:
- |
/usr/bin/helm upgrade ${release_qa} \
./resume --install \
--namespace ${namespace} \
--values env/qa/values.yaml \
--set image.tag=${CI_COMMIT_SHA} \
--set image.repository=${CI_REGISTRY_IMAGE}
only:
- release/qa