File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 11build
22.idea
33* .pem
4+ releases
5+ latest
6+ download
Original file line number Diff line number Diff 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
2021script :
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
You can’t perform that action at this time.
0 commit comments