Fix pipeline and add testing support

This commit is contained in:
drymer 2019-01-19 00:36:44 +01:00
parent 5e44b9fe36
commit f71dfd9a14
Signed by: drymer
GPG Key ID: A307D64D5DDFDAAD
2 changed files with 16 additions and 5 deletions

View File

@ -1,22 +1,29 @@
---
workspace:
base: /hugo
path: /
pipeline:
build-web:
image: registry.daemons.it/hugo:latest
branch: [master, testing]
build-docker:
image: docker
commands:
- docker build -t $DOCKER_REGISTRY/baddaemons .
secrets: [docker_registry]
volumes:
- /var/run/docker.sock:/var/run/docker.sock
when:
event: push
branch: [master, testing]
push-docker:
image: docker
commands:
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD $DOCKER_REGISTRY
- docker build -t $DOCKER_REGISTRY .
- docker push $DOCKER_REGISTRY/baddaemons
secrets: [docker_user, docker_password, docker_registry]
volumes:
- /var/run/docker.sock:/var/run/docker.sock
when:
event: push
branch: [master, testing]
ssh:
image: appleboy/drone-ssh
host: daemons.it
@ -28,6 +35,7 @@ pipeline:
- sudo systemctl restart docker-hugo
when:
event: push
branch: master
notify-good:
image: registry.daemons.it/drone-xmpp
secrets: [xmpp_user, xmpp_password, xmpp_room]
@ -35,6 +43,7 @@ pipeline:
when:
status: [success]
event: push
branch: master
notify-bad:
image: registry.daemons.it/drone-xmpp
message: "Beep, boop, soy un bot. La actualización de la web ha ido mal: {build_link}"
@ -42,4 +51,5 @@ pipeline:
when:
status: [failure]
event: push
branch: master
branch: master

View File

@ -6690,3 +6690,4 @@ Tanto para el articulo como para aprender como iba todo, he usado los siguientes
- https://www.arduino.cc/reference/en/language/functions/usb/keyboard/
[fn:1] Sketch es como se llaman los programas de Arduino.