Pull together

This commit is contained in:
Adrien Ferrand 2020-04-26 16:59:58 +02:00
parent b553a7eccc
commit 77e7f8575d
3 changed files with 11 additions and 12 deletions

View file

@ -8,7 +8,4 @@ stages:
- stage: Test
jobs:
- template: templates/standard-tests-jobs.yml
- stage: Notify
jobs:
- template: templates/notifications-jobs.yml
condition: succeededOrFailed()
- template: templates/notify-failure-steps.yml

View file

@ -1,8 +0,0 @@
jobs:
- job: notify_failure
pool:
vmImage: ubuntu-latest
steps:
- bash: |
env
curl -i -H "Authorization: Bearer $(MATTERMOST_TOKEN)" --data '{"channel_id":"$(MATTERMOST_CHANNEL_ID)","message":"Build has failed: https://dev.azure.com/adferrand/certbot/_build/results?buildId=$(Build.BuildId)&view=results"}' -X POST "$(MATTERMOST_URL)/api/v4/posts"

View file

@ -0,0 +1,10 @@
stages:
- stage: Notify_Failure
jobs:
- job: notify
pool:
vmImage: ubuntu-latest
steps:
- bash: |
curl -i -H "Authorization: Bearer $(MATTERMOST_TOKEN)" --data '{"channel_id":"$(MATTERMOST_CHANNEL_ID)","message":"Build has failed: https://dev.azure.com/$(Build.RepositoryId)/_build/results?buildId=$(Build.BuildId)&view=results"}' -X POST "$(MATTERMOST_URL)/api/v4/posts"
condition: failed()