-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
29 lines (27 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
#### This file is not complete
sudo: required
services:
- docker
env:
global:
- SHA=$(git rev-parse HEAD)
- CLOUDSDK_CORE_DISABLE_PROMPTS=1
before_install:
# - openssl command here that is output after encrypting the json file in ruby container.
- curl https://sdk.cloud.google.com | bash > /dev/null;
- source $HOME/google-cloud-sdk/path.bash.inc
- gcloud components update kubectl
## Note that google cloud platform project and service account needs to be created for this.
- gcloud auth activate-service-account --key-file service-account.json ## Service account has to be created on Google cloud platform
## Set project ID - gcloud config set project skilful-berm-214822
## Set project Zone - gcloud config set compute/zone us-central1-a
## Get credentials from container - gcloud container clusters get-credentials multi-cluster
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build -t tislam93/react-test -f ./client/Dockerfile.dev ./client
script:
- docker run -e CI=true tislam93/react-test npm test
deploy:
provider: script
script: bash ./deploy.sh
on:
branch: master