diff --git a/.azure-pipelines/templates/jobs/deployment-jobs.yml b/.azure-pipelines/templates/jobs/deployment-jobs.yml index 696d34130..d0bd6e655 100644 --- a/.azure-pipelines/templates/jobs/deployment-jobs.yml +++ b/.azure-pipelines/templates/jobs/deployment-jobs.yml @@ -15,8 +15,12 @@ jobs: artifact: snap path: $(Build.SourcesDirectory)/snap displayName: Retrieve Certbot snap + - task: DownloadSecureFile@1 + name: snapcraftCfg + inputs: + secureFile: snapcraft.cfg - bash: | - mkdir .snapcraft - echo $(SNAPCRAFT_LOGIN_FILE) | base64 --decode --ignore-garbage > .snapcraft/snapcraft.cfg + mkdir -p .snapcraft + ln -s .snapcraft/snapcraft.cfg $(snapcraftCfg.secureFilePath) snapcraft push --release=edge snap/*.snap displayName: Publish to Snap store diff --git a/.azure-pipelines/templates/stages/notify-failure-stage.yml b/.azure-pipelines/templates/stages/notify-failure-stage.yml index 07123e70e..75a812c91 100644 --- a/.azure-pipelines/templates/stages/notify-failure-stage.yml +++ b/.azure-pipelines/templates/stages/notify-failure-stage.yml @@ -9,5 +9,5 @@ stages: steps: - bash: | MESSAGE="---\n##### Azure Pipeline - Pipeline: $(Build.DefinitionName) - Build: $(Build.BuildId)\n:warning: __[Build has failed](https://dev.azure.com/$(Build.Repository.ID)/_build/results?buildId=$(Build.BuildId)&view=results)__ :warning:\n\n---" - curl -i -H "Authorization: Bearer $(MATTERMOST_TOKEN)" --data "{\"channel_id\":\"$(MATTERMOST_CHANNEL_ID)\",\"message\":\"${MESSAGE}\"}" -X POST "$(MATTERMOST_URL)/api/v4/posts" + curl -i -X POST --data-urlencode 'payload={"text":"${MESSAGE}"}' "$(MATTERMOST_URL)" condition: failed()