-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
35 lines (30 loc) · 1.14 KB
/
.travis.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
language: node_js
branches:
only:
- master
cache:
directories:
- node_modules
- $HOME/gcloud/
env:
- PATH=$PATH:$HOME/gcloud/google-cloud-sdk/bin CLOUDSDK_CORE_DISABLE_PROMPTS=1
before_install:
- openssl aes-256-cbc -K $encrypted_6813f64756c7_key -iv $encrypted_6813f64756c7_iv -in googleServiceAccount.json.enc -out express/googleServiceAccount.json -d
- export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)" &&
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list &&
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - &&
sudo apt-get update -y &&
sudo apt-get install google-cloud-sdk=216.0.0-0 -y
- gcloud --version
- npm i yarn -g
script:
- yarn
- yarn build
- cd express
- yarn
- yarn build
- rm -rf node_modules
- yarn install --production
- cp -r ../dist/* ./dist
- gcloud -q auth activate-service-account --key-file googleServiceAccount.json
- gcloud functions deploy mustread --trigger-http --verbosity=debug --memory=2048MB --project=mustread-tech --runtime nodejs8 --timeout=30s