2019-07-02 09:31:14 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
2019-07-02 20:22:14 +00:00
|
|
|
|
|
|
|
# Tag and push docker image
|
2019-07-02 09:31:14 +00:00
|
|
|
docker login -u benweet -p "$DOCKER_PASSWORD"
|
|
|
|
docker tag benweet/stackedit "benweet/stackedit:$TRAVIS_TAG"
|
|
|
|
docker push benweet/stackedit:$TRAVIS_TAG
|
|
|
|
docker tag benweet/stackedit:$TRAVIS_TAG benweet/stackedit:latest
|
|
|
|
docker push benweet/stackedit:latest
|
|
|
|
|
2019-07-08 12:56:38 +00:00
|
|
|
# Build the chart
|
|
|
|
cd "$TRAVIS_BUILD_DIR"
|
|
|
|
npm run chart
|
|
|
|
|
2019-07-02 20:22:14 +00:00
|
|
|
# Add chart to helm repository
|
2019-07-08 12:16:13 +00:00
|
|
|
git clone --branch master "https://benweet:$GITHUB_TOKEN@github.com/benweet/stackedit-charts.git" /tmp/charts
|
|
|
|
cd /tmp/charts
|
|
|
|
helm package "$TRAVIS_BUILD_DIR/dist/stackedit"
|
2019-07-02 09:31:14 +00:00
|
|
|
helm repo index --url https://benweet.github.io/stackedit-charts/ .
|
|
|
|
git config user.name "Benoit Schweblin"
|
|
|
|
git config user.email "benoit.schweblin@gmail.com"
|
|
|
|
git add .
|
|
|
|
git commit -m "Added $TRAVIS_TAG"
|
|
|
|
git push origin master
|