mirror of
https://github.com/certbot/certbot.git
synced 2026-03-23 19:03:33 -04:00
Revert "switch to checking agent job status to dedup code"
This reverts commit a54f366b40.
This commit is contained in:
parent
50e273a419
commit
40fdcba82b
2 changed files with 23 additions and 8 deletions
|
|
@ -1,8 +1,7 @@
|
|||
stages:
|
||||
- stage: Notify
|
||||
condition: succeededOrFailed()
|
||||
- stage: NotifySuccess
|
||||
jobs:
|
||||
- job: notify_release_build
|
||||
- job: notify_release_build_success
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
|
|
@ -13,5 +12,21 @@ stages:
|
|||
- bash: |
|
||||
set -e
|
||||
AUTHOR_NAME="$(git log -1 --pretty=format:'%an')"
|
||||
"${BUILD_REPOSITORY_LOCALPATH}/tools/notify_mattermost.py" "${AUTHOR_NAME}" $(webhook_url.secureFilePath) "${AGENT_JOBSTATUS}"
|
||||
displayName: Send mattermost message
|
||||
"${BUILD_REPOSITORY_LOCALPATH}/tools/notify_mattermost.py" "${AUTHOR_NAME}" $(webhook_url.secureFilePath) SUCCESS
|
||||
displayName: Send mattermost success message
|
||||
- stage: NotifyFailure
|
||||
condition: failed()
|
||||
jobs:
|
||||
- job: notify_release_build_failure
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- task: DownloadSecureFile@1
|
||||
name: webhook_url
|
||||
inputs:
|
||||
secureFile: mattermost_webhook_url_release_notify
|
||||
- bash: |
|
||||
set -e
|
||||
AUTHOR_NAME="$(git log -1 --pretty=format:'%an')"
|
||||
"${BUILD_REPOSITORY_LOCALPATH}/tools/notify_mattermost.py" "${AUTHOR_NAME}" $(webhook_url.secureFilePath) FAILURE
|
||||
displayName: Send mattermost failure message
|
||||
|
|
|
|||
|
|
@ -49,12 +49,12 @@ fun_success_messages = [
|
|||
'all certbot release systems are set for launch!',
|
||||
]
|
||||
|
||||
if status in ['Succeeded', 'SucceededWithIssues ']:
|
||||
if status == 'SUCCESS':
|
||||
message = random.choice(fun_success_messages)
|
||||
elif status == 'Failed':
|
||||
elif status == 'FAILURE':
|
||||
message = "the release pipeline has failed."
|
||||
else:
|
||||
raise RuntimeError("Unexpected Azure job status encountered")
|
||||
raise RuntimeError("STATUS must be either SUCCESS or FAILURE")
|
||||
|
||||
|
||||
azure_url = 'https://dev.azure.com/certbot/certbot/_build?definitionId=3'
|
||||
|
|
|
|||
Loading…
Reference in a new issue