CircleCI: Publish chart to gh-pages branch
@@ -27,19 +27,21 @@ jobs:
name: Publish chart
command: |
if [[ -z $CIRCLE_TAG ]]; then
- echo "Not a release! Skip chart publish";
- exit;
+ echo "Not a release! Skip chart publish"
+ exit
fi
+ if echo "${CIRCLE_TAG}" | grep -Eq "^[0-9]+(\.[0-9]+)*(-[a-z]+)?$"; then
REPOSITORY="https://fluxcdbot:${GITHUB_TOKEN}@github.com/fluxcd/flux.git"
git config user.email fluxcdbot@users.noreply.github.com
git config user.name fluxcdbot
git remote set-url origin ${REPOSITORY}
- git checkout gh-pages-test
+ git checkout gh-pages
mv $HOME/chart/*.tgz .
helm repo index . --url https://fluxcd.github.io/flux
git add .
git commit -m "Publish Helm chart"
- git push origin gh-pages-test
+ git push origin gh-pages
+ fi
build:
working_directory: /home/circleci/go/src/github.com/weaveworks/flux
machine:
