2017-04-21 05:23:45 -04:00
|
|
|
#!/usr/bin/env bash
|
2016-02-19 06:58:06 -05:00
|
|
|
set -e
|
|
|
|
|
|
2017-05-16 11:24:08 -04:00
|
|
|
if [ -n "$TRAVIS_TAG" ]; then
|
2016-04-05 14:47:23 -04:00
|
|
|
echo "Deploying..."
|
2016-02-22 09:01:00 -05:00
|
|
|
else
|
|
|
|
|
echo "Skipping deploy"
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
|
2017-08-28 05:48:03 -04:00
|
|
|
git config --global user.email "$TRAEFIKER_EMAIL"
|
|
|
|
|
git config --global user.name "Traefiker"
|
2016-04-06 12:43:27 -04:00
|
|
|
|
2016-04-05 14:47:38 -04:00
|
|
|
# load ssh key
|
2016-04-05 14:47:23 -04:00
|
|
|
echo "Loading key..."
|
2019-06-17 17:40:05 -04:00
|
|
|
openssl aes-256-cbc -K $encrypted_f9e835a425bc_key -iv $encrypted_f9e835a425bc_iv -in .travis/traefiker_rsa.enc -out ~/.ssh/traefiker_rsa -d
|
2016-04-05 14:47:23 -04:00
|
|
|
eval "$(ssh-agent -s)"
|
2017-08-28 05:48:03 -04:00
|
|
|
chmod 600 ~/.ssh/traefiker_rsa
|
|
|
|
|
ssh-add ~/.ssh/traefiker_rsa
|
2016-04-05 14:47:23 -04:00
|
|
|
|
2016-02-24 09:41:25 -05:00
|
|
|
# update traefik-library-image repo (official Docker image)
|
2016-04-05 14:47:23 -04:00
|
|
|
echo "Updating traefik-library-imag repo..."
|
2016-04-04 16:33:01 -04:00
|
|
|
git clone git@github.com:containous/traefik-library-image.git
|
2019-06-17 17:40:05 -04:00
|
|
|
cd traefik-library-image
|
|
|
|
|
./updatev2.sh $VERSION
|
2016-02-24 09:41:25 -05:00
|
|
|
git add -A
|
2019-06-17 17:40:05 -04:00
|
|
|
echo $VERSION | git commit --file -
|
|
|
|
|
echo $VERSION | git tag -a $VERSION --file -
|
2016-04-06 12:43:27 -04:00
|
|
|
git push -q --follow-tags -u origin master > /dev/null 2>&1
|
2016-02-24 10:43:39 -05:00
|
|
|
|
2019-06-17 17:40:05 -04:00
|
|
|
cd ..
|
2016-02-24 09:41:25 -05:00
|
|
|
rm -Rf traefik-library-image/
|
|
|
|
|
|
2019-05-10 11:24:06 -04:00
|
|
|
echo "Deployed"
|