-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
55 lines (35 loc) · 1.33 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
sudo: required
services:
- docker
language: python
cache:
directories:
- "$HOME/google-cloud-sdk/"
env:
# Make sure gcloud command is on our PATH
- PATH=$PATH:${HOME}/google-cloud-sdk/bin
before_install:
- openssl aes-256-cbc -K $encrypted_f842bcbfc33d_key -iv $encrypted_f842bcbfc33d_iv
-in all_keys.tar.gz.enc -out all_keys.tar.gz -d
- if [ ! -d ${HOME}/google-cloud-sdk ]; then
curl https://sdk.cloud.google.com | bash;
fi
- tar -xzf all_keys.tar.gz
- gcloud auth activate-service-account --key-file all_keys/peerChat-gcp-service-account-key.json
- gcloud config set project peerchat-e145d
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
install:
- cp -r all_keys/api-private api/private
- cp -r all_keys/app-private app/private
- docker build -t swrdfish/mode:latest .
- docker push swrdfish/mode:latest
# Install npm dependencies for running tests
- cd app/ && rm -rf node_modules/ && npm install
- ls -ltrh
script:
# Run tests
- npm run test && cd ..
# Delete current deployment
- gcloud deployment-manager deployments delete my-container-deployment -q
- gcloud deployment-manager deployments create my-container-deployment --config gcp/container_vm.yaml
- gcloud compute instances add-tags mode --zone us-east1-b --tags http-server