summaryrefslogtreecommitdiff
path: root/.gitlab/ci/notifications.gitlab-ci.yml
blob: 8e00ba022d08fa3fff1ca4c02041ec9ba2ba25a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.notify:
  image: alpine
  stage: notification
  dependencies: []
  cache: {}
  before_script:
    - apk update && apk add git curl bash

schedule:package-and-qa:notify-success:
  extends:
    - .only-canonical-schedules
    - .notify
  variables:
    COMMIT_NOTES_URL: "https://$CI_SERVER_HOST/$CI_PROJECT_PATH/commit/$CI_COMMIT_SHA#notes-list"
  script:
    - 'scripts/notify-slack qa-master ":tada: Scheduled QA against master passed! :tada: See $CI_PIPELINE_URL. For downstream pipelines, see $COMMIT_NOTES_URL" ci_passing'
  needs: ["schedule:package-and-qa"]
  when: on_success

schedule:package-and-qa:notify-failure:
  extends:
    - .only-canonical-schedules
    - .notify
  variables:
    COMMIT_NOTES_URL: "https://$CI_SERVER_HOST/$CI_PROJECT_PATH/commit/$CI_COMMIT_SHA#notes-list"
  script:
    - 'scripts/notify-slack qa-master ":skull_and_crossbones: Scheduled QA against master failed! :skull_and_crossbones: See $CI_PIPELINE_URL. For downstream pipelines, see $COMMIT_NOTES_URL" ci_failing'
  needs: ["schedule:package-and-qa"]
  when: on_failure