socks5-server/.circleci/config.yml

31 lines
1.0 KiB
YAML
Raw Normal View History

2017-04-24 23:26:42 +03:00
version: 2
jobs:
build:
docker:
- image: docker
working_directory: ~/socks5-server
steps:
- setup_remote_docker
- run:
name: Install Docker client
command: |
set -x
VER="17.03.0-ce"
curl -L -o /tmp/docker-$VER.tgz https://get.docker.com/builds/Linux/x86_64/docker-$VER.tgz
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
mv /tmp/docker/* /usr/bin
2017-04-24 23:30:15 +03:00
- run:
2017-04-24 23:26:42 +03:00
name: Build Docker image
2017-04-24 23:30:15 +03:00
command:
docker build -t serjs/go-socks5-proxy .
2017-04-24 23:26:42 +03:00
- deploy:
command: |
docker login -u $DOCKERHUB_USER -p $DOCKERHUB_PASSWORD
if [ $CIRCLE_TAG -ne "undefined" ]; then
docker tag serjs/go-socks5-proxy serjs/go-socks5-proxy:$CIRCLE_TAG
docker push serjs/go-socks5-proxy:$CIRCLE_TAG
else
docker tag serjs/go-socks5-proxy serjs/go-socks5-proxy:dev
docker push serjs/go-socks5-proxy:dev
fi