-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
71 lines (64 loc) · 2.05 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
# CI/CD for rippled status page updater
stages:
- publish
- deploy
variables:
GCR_PROJECT_ID: xpring-dev-sandbox
GCLOUD_PROJECT_ID: xpring-dev-sandbox
CLUSTER_NAME: poc1-cluster
CLUSTER_REGION: us-central1
RELEASE_NAME: xrpl-countdown
RELEASE_ENV: dev
include:
- project: 'xpring/xpring-ci-templates'
file: '/templates/build_for_gcr.yml'
# Build a docker image and push it to the GCR associated with $GCLOUD_PROJECT_ID
build/publish:
stage: publish
extends: .publish
# This is a template that is used below. It does not do anything by itself
.deploy_xrpl_countdown:
extends: .deploy
needs: ["build/publish"]
when: manual
script:
- mkdir dependency_charts
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.in.ripplex.dev/xpring-eng/xpring_nginx.git dependency_charts/xpring_nginx
- export IMAGE_UID="$(cat image_uid.meta.txt)"
- kubectl create namespace ${RELEASE_NAME}-${RELEASE_ENV} || true
- helm dep update ./charts
- helm upgrade --install --namespace ${RELEASE_NAME}-${RELEASE_ENV}
--set PORT="${PORT}"
--set SLACK_TOKEN="${SLACK_TOKEN}"
--set SLACK_CHANNEL_ID="${SLACK_CHANNEL_ID}"
--set ALTNET="${ALTNET}"
--set DEVNET="${DEVNET}"
--set LOG="${LOG}"
--set releaseImage="gcr.io/$GCR_PROJECT_ID/$CI_PROJECT_NAME:$IMAGE_UID"
--set sslproxy.proxiedService="http://${RELEASE_NAME}-${RELEASE_ENV}"
--set sslproxy.domainName=${DOMAIN_NAME}
${RELEASE_NAME}-${RELEASE_ENV} ./charts
deploy to dev dev:
stage: deploy
extends: .deploy_xrpl_countdown
environment:
name: dev-dev
variables:
RELEASE_ENV: dev-dev
DOMAIN_NAME: dev.xrpl-countdown.xpring.dev
deploy to dev test:
stage: deploy
extends: .deploy_xrpl_countdown
environment:
name: dev-test
variables:
RELEASE_ENV: dev-test
DOMAIN_NAME: dev.xrpl-countdown.xpring.dev
deploy to dev live:
stage: deploy
extends: .deploy_xrpl_countdown
environment:
name: dev-live
variables:
RELEASE_ENV: dev-live
DOMAIN_NAME: dev.xrpl-countdown.xpring.dev