-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
37 lines (32 loc) · 1.07 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
image: registry.gitlab.com/canya-com/canwork/limepay-backend:1.0
stages:
- deploy
variables:
APP_PATH: /builds/$CI_PROJECT_PATH
before_script:
- cd $APP_PATH
deploy:staging:
stage: deploy
script:
- echo "Deploy to staging target GAE instance with project ID $STAGING_GCP_PROJECT_ID"
- echo $STAGING_GCP_KEY > /tmp/$CI_PIPELINE_ID.json
- echo $STAGING_CONFIG > ./config.json
- echo $STAGING_FIREBASE_KEY > ./firebasekey.json
- gcloud auth activate-service-account --key-file /tmp/$CI_PIPELINE_ID.json
- gcloud config set project $STAGING_GCP_PROJECT_ID
- gcloud --quiet app deploy
only:
- master
deploy:production:
stage: deploy
when: manual
script:
- echo "Deploy to staging target GAE instance with project ID $GCP_PROJECT_ID"
- echo $GCP_KEY > /tmp/$CI_PIPELINE_ID.json
- echo $CONFIG > ./config.json
- echo $FIREBASE_KEY > ./firebasekey.json
- gcloud auth activate-service-account --key-file /tmp/$CI_PIPELINE_ID.json
- gcloud config set project $GCP_PROJECT_ID
- gcloud --quiet app deploy
only:
- master