Merge pull request #219 from emilevauge/add-traefik-library-image

Add publish to traefik-library-image
This commit is contained in:
Vincent Demeester 2016-02-24 16:11:15 +01:00
commit e0872b6157

View file

@ -13,8 +13,28 @@ unzip -q linux_amd64.zip
sudo mv ghr /usr/bin/ghr sudo mv ghr /usr/bin/ghr
sudo chmod +x /usr/bin/ghr sudo chmod +x /usr/bin/ghr
# github release and tag
ghr -t $GITHUB_TOKEN -u emilevauge -r traefik --prerelease ${VERSION} dist/ ghr -t $GITHUB_TOKEN -u emilevauge -r traefik --prerelease ${VERSION} dist/
# create docker image emilevauge/traefik
docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
docker push ${REPO,,}:latest docker push ${REPO,,}:latest
docker tag ${REPO,,}:latest ${REPO,,}:${VERSION} docker tag ${REPO,,}:latest ${REPO,,}:${VERSION}
docker push ${REPO,,}:${VERSION} docker push ${REPO,,}:${VERSION}
# update traefik-library-image repo (official Docker image)
git config --global user.email "emile@vauge.com"
git config --global user.name "Emile Vauge"
git clone https://github.com/containous/traefik-library-image.git
cd traefik-library-image
git remote rm origin
git remote add origin https://emilevauge:${GITHUB_TOKEN}@github.com/containous/traefik-library-image.git
./update.sh $VERSION
git add -A
echo $VERSION | git commit --file -
echo $VERSION | git tag -a $VERSION --file -
git push --follow-tags -u origin master
cd ..
rm -Rf traefik-library-image/
echo "Deployed"