-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
44 lines (41 loc) · 1.17 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
language: generic
sudo: false
git:
depth: 3
branches:
only:
- master
env:
global:
- HELM_VERSION="v2.9.1"
install:
- wget http://storage.googleapis.com/kubernetes-helm/helm-${HELM_VERSION}-linux-amd64.tar.gz -O /tmp/helm.tar.gz
- tar xzf /tmp/helm.tar.gz -C /tmp --strip-components=1
- chmod +x /tmp/helm
before_script:
- /tmp/helm init --client-only
script:
- |
set -e
export REPO=$(git config remote.origin.url)
export SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:}
export SHA=$(git rev-parse --verify HEAD)
for chart in *; do
if [ -d ${chart} ]; then
/tmp/helm package ${chart}
fi;
done;
git clone $REPO out
cd out
git checkout gh-pages
# rm -f *.tgz
# rm -f index.yaml
mv -f ../*.tgz .
/tmp/helm repo index . --url https://apps.go-home.io
git config user.name "Travis CI"
git config user.email "$COMMIT_AUTHOR_EMAIL"
git add -A .
git commit -m "Deploy to go-home apps: ${SHA}"
openssl aes-256-cbc -K $encrypted_47ce3df85097_key -iv $encrypted_47ce3df85097_iv -in travis_id_rsa.enc -out ~/.ssh/id_rsa -d
chmod 600 ~/.ssh/id_rsa
git push $SSH_REPO gh-pages