From 63fb9c713500095a1de07c55c47f1fdd29311a16 Mon Sep 17 00:00:00 2001 From: Emile Vauge Date: Wed, 24 Feb 2016 15:41:25 +0100 Subject: [PATCH] publish binary to traefik-library-image repo Signed-off-by: Emile Vauge --- script/deploy.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/script/deploy.sh b/script/deploy.sh index bf142cc36..f706f6eb9 100755 --- a/script/deploy.sh +++ b/script/deploy.sh @@ -13,8 +13,28 @@ unzip -q linux_amd64.zip sudo mv ghr /usr/bin/ghr sudo chmod +x /usr/bin/ghr +# github release and tag 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 push ${REPO,,}:latest docker tag ${REPO,,}:latest ${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"