This is just an exercise to learn some go. This program downloads a list of images and creates a webserver with a photo gallery to serve them. The images in the repo are technical comics.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

.drone.yml 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. ---
  2. pipeline:
  3. check-format:
  4. image: golang:1.12.6-alpine3.9
  5. commands:
  6. - apk add -U make
  7. - make test
  8. when:
  9. event: push
  10. docker-build:
  11. image: docker
  12. commands:
  13. - apk add -U make
  14. - make docker-build
  15. volumes:
  16. - /var/run/docker.sock:/var/run/docker.sock
  17. when:
  18. event: push
  19. branch: master
  20. docker-push:
  21. image: docker
  22. commands:
  23. - docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD r.daemons.it
  24. - apk add -U make
  25. - make docker-push
  26. volumes:
  27. - /var/run/docker.sock:/var/run/docker.sock
  28. secrets: [docker_username, docker_password]
  29. when:
  30. event: push
  31. branch: master
  32. ssh:
  33. image: appleboy/drone-ssh
  34. host: daemons.it
  35. username: drone
  36. port: 6699
  37. secrets: [ssh_key]
  38. script:
  39. - sudo docker pull registry.daemons.it/gomic:latest
  40. - sudo systemctl restart docker-gomic
  41. when:
  42. event: push
  43. branch: master
  44. notify-good:
  45. image: registry.daemons.it/drone-xmpp
  46. secrets: [xmpp_user, xmpp_password, xmpp_room]
  47. message: Beep, boop, soy un bot. El job ha terminado correctamente, drymer.
  48. when:
  49. status: [success]
  50. event: push
  51. notify-bad:
  52. image: registry.daemons.it/drone-xmpp
  53. message: "Beep, boop, soy un bot. El job ha ido mal: {build_link}"
  54. secrets: [xmpp_user, xmpp_password, xmpp_room]
  55. when:
  56. status: [failure]
  57. event: push
  58. branch: master