...
 
Commits (2)
......@@ -62,18 +62,26 @@ buildAndTest:
- tags
deploy:
dependencies:
- buildAndTest
stage: deploy
extends: .ansible
script:
- ansible-playbook --private-key=ansible.key -i deployment/inventories/staging deployment/deploy.yml
- echo "true" > .deployed
artifacts:
paths:
- .deployed
selenium:
dependencies: []
stage: acceptance
image: golang
variables:
HUB_HOST: "standalone-chrome"
HUB_HOST: "selenium"
services:
- selenium/standalone-chrome:latest
- name: selenium/standalone-chrome:latest
alias: selenium
script:
- cd acception
- go test . --hub="${HUB_HOST}:4444" --url="https://hashworks.net/" --htmlPath acceptionTest.html --screenshotPath acceptionTest.png
......@@ -88,9 +96,11 @@ selenium:
- acceptionTest.png
restore:
dependencies:
- deploy
stage: restore
extends: .ansible
script:
- test -f acceptionTest.html || exit 0
- test -f .deployed || exit 0
- ansible-playbook --private-key=ansible.key -i deployment/inventories/staging deployment/restore.yml
when: on_failure