Add test step. Limit deploy to deploy branches

This commit is contained in:
Adrien Ferrand 2018-09-17 10:07:03 +02:00
parent ac8a7b68ea
commit c9d5efb199

View File

@ -16,6 +16,17 @@ jobs:
root: workspace root: workspace
paths: paths:
- docker-backuppc.tar - 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: deploy:
machine: true machine: true
steps: steps:
@ -40,9 +51,17 @@ workflows:
filters: filters:
tags: tags:
only: ^[0-9.]+ only: ^[0-9.]+
- deploy: - test:
requires: requires:
- build - build
filters: filters:
tags:
only: ^[0-9.]+
- deploy:
requires:
- test
filters:
branches:
only: ^(master|4|3)$
tags: tags:
only: ^[0-9.]+ only: ^[0-9.]+