From c9d5efb1996d0cd612fdb6dc4b3a99fd54ca8bf6 Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Mon, 17 Sep 2018 10:07:03 +0200 Subject: [PATCH] Add test step. Limit deploy to deploy branches --- .circleci/config.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9b3f5d2..ab30047 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,6 +16,17 @@ jobs: root: workspace paths: - docker-backuppc.tar + test: + machine: true + steps: + - attach_workspace: + at: /tmp/workspace + - run: + command: + docker load < /tmp/workspace/docker-backuppc.tar + - run: + command: + docker run --rm adferrand/backuppc echo 'Hello World!' deploy: machine: true steps: @@ -40,9 +51,17 @@ workflows: filters: tags: only: ^[0-9.]+ - - deploy: + - test: requires: - build filters: + tags: + only: ^[0-9.]+ + - deploy: + requires: + - test + filters: + branches: + only: ^(master|4|3)$ tags: only: ^[0-9.]+