-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
58 lines (54 loc) · 1.85 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
56
57
58
cache:
directories:
- yarn
- npm
- $HOME/.helm
- $HOME/google-cloud-sdk
jobs:
include:
- stage: test
language: node_js
node_js: 12
install:
- yarn
before_script:
- cp .env.test .env
script:
- yarn tslint
- yarn build:test
- yarn test
- yarn test:js
# Helm
- stage: deploy
if: branch = master
env:
- CLOUDSDK_CORE_DISABLE_PROMPTS=1
- GOOGLE_APPLICATION_CREDENTIALS="$PWD/gcloud.key.json"
before_install:
- | # Install Helm
if [ ! -d "$HOME/.helm/bin" ]; then
rm -rf "$HOME/.helm"
wget https://get.helm.sh/helm-v2.16.1-linux-amd64.tar.gz
tar xf helm-v2.16.1-linux-amd64.tar.gz
mkdir -p $HOME/.helm/bin
mv linux-amd64/* $HOME/.helm/bin
$HOME/.helm/bin/helm init --client-only
$HOME/.helm/bin/helm plugin install https://github.com/hayorov/helm-gcs
fi
- export PATH=$PATH:$HOME/.helm/bin
# Install Google Cloud SDK
- if [ ! -d "$HOME/google-cloud-sdk/bin" ]; then rm -rf "$HOME/google-cloud-sdk"; curl https://sdk.cloud.google.com | bash > /dev/null; fi
- source $HOME/google-cloud-sdk/path.bash.inc
- openssl aes-256-cbc -K $helm_gcs_key -iv $helm_gcs_iv -in gcloud.key.json.enc -out gcloud.key.json -d
install:
- helm repo add micalgenus-gcs gs://micalgenus/chart
before_script:
- mv helm prbot
script:
- helm package prbot
before_deploy:
- mkdir -p $HOME/.config/helm && cp $HOME/.helm/repository/repositories.yaml $HOME/.config/helm/repositories.yaml
deploy:
- provider: script
script: helm gcs push prbot*.tgz micalgenus-gcs --force --public --publicUrl https://chart.micalgenus.com/
skip_cleanup: true