-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy path.drone.yml
45 lines (43 loc) · 1.65 KB
/
.drone.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
kind: pipeline
type: docker
name: default
steps:
- name: frontend-deploy-staging
image: google/cloud-sdk
volumes:
- name: secret_keys
path: /secrets
secrets:
- source: REACT_APP_GOOGLE_CLIENT_ID_STAGING
target: REACT_APP_GOOGLE_CLIENT_ID
environment:
REACT_APP_API_BASE_URL: "https://backend.tilde.umuzi.org"
REACT_APP_FEATURE_AUTHENTICATION: 1
REACT_APP_FEATURE_BACKEND_API_ON: 1
GCLOUD_SERVICE_ACCOUNT_NAME: "[email protected]"
NVM_DIR: "/root/.nvm"
NODE_VERSION: 14.17.0
commands:
# - ls /secrets
# - apt install -U curl bash ca-certificates openssl ncurses coreutils python2 make gcc g++ libgcc linux-headers grep util-linux binutils findutils
# - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
# - yes | apt install nodejs npm
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
# - cat /root/.bashrc
# - bash -c "bash /root/.nvm/nvm.sh which $${NODE_VERSION}"
# - nvm install $${NODE_VERSION}
# - nvm alias default $${NODE_VERSION}
# - nvm use default
# - yes | apt install tree
# - tree /root/.nvm
- cd frontend
- bash -c "source ~/.bashrc; npm install && npm run build"
# - bash -c "npm run build"
- gcloud auth activate-service-account $${GCLOUD_SERVICE_ACCOUNT_NAME} --key-file=/secrets/drone-service-account-key.json
- yes | gcloud app deploy --appyaml app-staging.yaml
when:
branches: [develop, hotfix/*]
volumes:
- name: secret_keys
host:
path: /home/sheena/.secrets