Skip to content

Commit

Permalink
Merge pull request #10 from vania-pooh/master
Browse files Browse the repository at this point in the history
Uploading unstable charts to under /unstable/ (related to #6)
  • Loading branch information
vania-pooh authored Aug 3, 2020
2 parents f6339ca + a27d84c commit 7ab6303
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
7 changes: 3 additions & 4 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,16 @@ steps:
- name: build_latest_chart
image: alpine/helm:3.2.4
commands:
- export OUTPUT_DIR="output"
- ./ci/build.sh $OUTPUT_DIR latest
- export VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))-$(git rev-parse --short HEAD)
- ./ci/build.sh $VERSION unstable
when:
branch: master
event: push

- name: build_release_chart
image: alpine/helm:3.2.4
commands:
- export OUTPUT_DIR="output"
- ./ci/build.sh $OUTPUT_DIR ${DRONE_TAG}
- ./ci/build.sh ${DRONE_TAG}
when:
branch: master
event: tag
Expand Down
11 changes: 8 additions & 3 deletions ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@

CHARTS_REPO="https://charts.aerokube.com/"

output_dir=${1:-"output"}
version=${2:-"latest"}
version=$1
path=${2:-""}
output_dir="output"
if [ -n "$path" ]; then
output_dir="$output_dir/$path"
CHARTS_REPO="$CHARTS_REPO$path/"
fi
mkdir -p ${output_dir}
tar cvz -f ${output_dir}/moon-${version}.tgz moon
helm package moon --destination ${output_dir} --version ${version}
cd ${output_dir}
wget ${CHARTS_REPO}/index.yaml || true
helm repo index . --url ${CHARTS_REPO} --merge index.yaml

0 comments on commit 7ab6303

Please sign in to comment.