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.

68 lines
2.2KB

  1. kind: pipeline
  2. name: notify-pipeline-start
  3. steps:
  4. - name: slack
  5. image: plugins/slack
  6. settings:
  7. webhook:
  8. from_secret: SLACK_WEBHOOK
  9. link_names: true
  10. template: >
  11. {{#if build.pull }}
  12. *Build started*: {{ repo.owner }}/{{ repo.name }} - <https://git.eeqj.de/{{ repo.owner }}/{{ repo.name }}/pull/{{ build.pull }}|Pull Request #{{ build.pull }}>
  13. {{else}}
  14. *Build started: {{ repo.owner }}/{{ repo.name }} - Build #{{ build.number }}* (type: `{{ build.event }}`)
  15. {{/if}}
  16. Commit: <https://git.eeqj.de/{{ repo.owner }}/{{ repo.name }}/commit/{{ build.commit }}|{{ truncate build.commit 8 }}>
  17. Branch: <https://git.eeqj.de/{{ repo.owner }}/{{ repo.name }}/commits/{{ build.branch }}|{{ build.branch }}>
  18. Author: {{ build.author }}
  19. <{{ build.link }}|Visit build page ↗>
  20. ---
  21. kind: pipeline
  22. name: test-docker-build
  23. steps:
  24. - name: test-docker-build
  25. image: plugins/docker
  26. network_mode: bridge
  27. settings:
  28. repo: sneak/sco
  29. dry_run: true
  30. tags:
  31. - ${DRONE_COMMIT_SHA}
  32. - ${DRONE_BRANCH}
  33. ---
  34. kind: pipeline
  35. name: notify-pipeline-end
  36. steps:
  37. - name: slack
  38. image: plugins/slack
  39. settings:
  40. webhook:
  41. from_secret: SLACK_WEBHOOK
  42. link_names: true
  43. template: >
  44. {{#if build.pull }}
  45. *{{#success build.status}}✔{{ else }}✘{{/success}} {{ uppercasefirst build.status }}*: {{ repo.owner }}/{{ repo.name }} - <https://git.eeqj.de/{{ repo.owner }}/{{ repo.name }}/pull/{{ build.pull }}|Pull Request #{{ build.pull }}>
  46. {{else}}
  47. *{{#success build.status}}✔{{ else }}✘{{/success}} {{ uppercasefirst build.status }}: {{ repo.owner }}/{{ repo.name }} - Build #{{ build.number }}* (type: `{{ build.event }}`)
  48. {{/if}}
  49. Commit: <https://git.eeqj.de/{{ repo.owner }}/{{ repo.name }}/commit/{{ build.commit }}|{{ truncate build.commit 8 }}>
  50. Branch: <https://git.eeqj.de/{{ repo.owner }}/{{ repo.name }}/commits/{{ build.branch }}|{{ build.branch }}>
  51. Author: {{ build.author }}
  52. Duration: {{ since build.created }}
  53. <{{ build.link }}|Visit build page ↗>
  54. depends_on:
  55. - test-docker-build
  56. trigger:
  57. status:
  58. - success
  59. - failure