From 9720cdac9509f937e2a3dff9fb71432eaf2e3671 Mon Sep 17 00:00:00 2001 From: Sergey Bogatyrets Date: Mon, 24 Apr 2017 23:26:42 +0300 Subject: [PATCH] Add CI --- .circleci/config.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..492649c --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,29 @@ +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 + - run: | + name: Build Docker image + docker build -t serjs/go-socks5-proxy . + - 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