Skip to content

Commit b94aa86

Browse files
committed
add prev releases charts and last index
1 parent 3bc3eba commit b94aa86

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
build
22
.idea
33
*.pem
4+
releases
5+
latest
6+
download

.travis.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ install:
1616
- curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
1717
- helm init --client-only
1818
- go get github.com/mikefarah/yq
19+
- sudo apt-get install jq
1920

2021
script:
2122
- docker build -t "$IMAGE_NAME" .
@@ -25,6 +26,12 @@ before_deploy:
2526
- docker tag "$IMAGE_NAME" "${IMAGE_NAME}:latest"
2627
- docker tag "$IMAGE_NAME" "${IMAGE_NAME}:${TRAVIS_TAG}"
2728
- yq write --inplace charts/api-gateway/values.yaml image.tag "${TRAVIS_TAG}"
29+
- wget https://api.github.com/repos/containerum/gateway/releases
30+
- cat releases | jq '.[].assets[].browser_download_url | select(. | test(".tgz")) | select(. | test("${NAME}"))' > download
31+
- wget https://api.github.com/repos/containerum/gateway/releases/latest
32+
- cat latest | jq '.assets[].browser_download_url | select(. | test("index.yaml"))' >> download
33+
- xargs -i wget -P charts '{}' < download
34+
- rm releases && rm latest && rm download
2835
- helm package charts/$NAME --version="${TRAVIS_TAG}" --dependency-update --destination charts
2936
- helm repo index --url $HELM_URL --merge charts/index.yaml charts
3037

@@ -39,3 +46,11 @@ deploy:
3946
keep-history: true
4047
on:
4148
tags: true
49+
- provider: releases
50+
api_key: $GITHUB_TOKEN
51+
file:
52+
- "charts/$NAME-${TRAVIS_TAG}.tgz"
53+
- "charts/index.yaml"
54+
skip_cleanup: true
55+
on:
56+
tags: true

0 commit comments

Comments
 (0)