From 5856ec7eac3c9794f79dc56205e2be96bce22d90 Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Sun, 16 Sep 2018 11:39:13 +0200 Subject: [PATCH] Try a first config --- .circleci/config.yml | 47 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..92567d4 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,47 @@ +version: 2 +jobs: + build: + docker: + - image:17.07.0-ce-git + steps: + - checkout + - setup_remote_docker: + docker_layer_caching: true + - run: + command: + docker build -t adferrand/backuppc:${CIRCLE_TAG} . + - run: + command: + docker save adferrand/backuppc:${CIRCLE_TAG} > docker-backuppc.tar + - persist_to_workspace: + paths: + - docker-backuppc.tar + deploy: + steps: + - attach_workspace: + at: /tmp/workspace + - setup_remote_docker: + docker_layer_caching: true + - run: + command: + docker load < /tmp/workspace/docker-backuppc.tar + - run: + command: + docker login -u ${DOCKER_USER} -p ${DOCKER_PASS} + - deploy: + command: + docker push adferrand/backuppc:${CIRCLE_TAG} +workflows: + version: 2 + build-n-deploy: + jobs: + - build: + filters: + branches: + only: ^circleci$ + - deploy: + requires: + - build + filters: + branches: + only: ^circleci$ \ No newline at end of file