Skip to content

Commit

Permalink
add prev releases charts and last index
Browse files Browse the repository at this point in the history
  • Loading branch information
kfeofantov committed May 25, 2018
1 parent 3bc3eba commit b94aa86
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
build
.idea
*.pem
releases
latest
download
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ install:
- curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
- helm init --client-only
- go get github.com/mikefarah/yq
- sudo apt-get install jq

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

Expand All @@ -39,3 +46,11 @@ deploy:
keep-history: true
on:
tags: true
- provider: releases
api_key: $GITHUB_TOKEN
file:
- "charts/$NAME-${TRAVIS_TAG}.tgz"
- "charts/index.yaml"
skip_cleanup: true
on:
tags: true

0 comments on commit b94aa86

Please sign in to comment.