Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full azure pipelines #71

Closed
wants to merge 162 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
162 commits
Select commit Hold shift + click to select a range
caac15a
Refactor pipeline to include linux tests
adferrand Apr 25, 2020
b71385f
Add linux dependencies
adferrand Apr 25, 2020
cbc2849
Sudo
adferrand Apr 25, 2020
38444b1
Add oldest tests
adferrand Apr 25, 2020
a2d0c73
Focus on oldest tests
adferrand Apr 25, 2020
d430c2a
Other attempt
adferrand Apr 25, 2020
3072ead
Upgrade system
adferrand Apr 25, 2020
542a8e3
Sudo
adferrand Apr 25, 2020
14a8602
TOXENV
adferrand Apr 25, 2020
da59a4f
Use pip_install
adferrand Apr 25, 2020
1854740
Add apache_compat
adferrand Apr 25, 2020
b85f1b9
Remove interactive, we are not in a terminal
adferrand Apr 25, 2020
289bde4
Update dependencies
adferrand Apr 25, 2020
a2fb9ff
Prepare advanced logic
adferrand Apr 25, 2020
88d69e2
Add dep
adferrand Apr 25, 2020
76ee725
Fix build dep
adferrand Apr 25, 2020
1409868
Sudo
adferrand Apr 25, 2020
15b59d8
Detect also Azure Pipelines
adferrand Apr 25, 2020
ebd9ffc
Fix source folder
adferrand Apr 25, 2020
57a9d93
Add extended tests
adferrand Apr 25, 2020
6587efb
Remove -it
adferrand Apr 25, 2020
f9b00f7
Simple move
adferrand Apr 25, 2020
fa302fe
Install docker CLI locally
adferrand Apr 25, 2020
ec73fa4
Fix unit tests
adferrand Apr 25, 2020
eb2222a
Run interactive, but without tty
adferrand Apr 25, 2020
dfb0eae
Add back -it
adferrand Apr 25, 2020
c288dfd
Try unbuffer
adferrand Apr 25, 2020
309a4d3
Unbuffer also for apache_compat
adferrand Apr 25, 2020
e8b3c67
Another try for snaps
adferrand Apr 25, 2020
9b022a9
Connect runner container to host network
adferrand Apr 25, 2020
f821de3
Original tox.ini
adferrand Apr 25, 2020
2a5c194
Dedicated script for oldest tests
adferrand Apr 25, 2020
93c5396
Fix coverage and use bare vms
adferrand Apr 25, 2020
bf83278
Consistent paths across dockers
adferrand Apr 25, 2020
60cbabc
Merge branch 'full-azure-pipelines' of github.com:adferrand/certbot i…
adferrand Apr 25, 2020
8d871a9
Mount also tmp
adferrand Apr 25, 2020
0ece985
Simplify config
adferrand Apr 25, 2020
b60f656
Correct config
adferrand Apr 25, 2020
fae4362
Working oldest test custom script
adferrand Apr 26, 2020
1dfb4b3
Try PPA
adferrand Apr 26, 2020
02603db
Factor logic with templates
adferrand Apr 26, 2020
2bf373b
Conditional execution
adferrand Apr 26, 2020
3d081d3
Use pool.vmImage
adferrand Apr 26, 2020
7021426
Use Agent.OS
adferrand Apr 26, 2020
b99ec94
Always use IMAGE_NAME
adferrand Apr 26, 2020
466d847
Fix format
adferrand Apr 26, 2020
6bc3a2a
Disable Travis
adferrand Apr 26, 2020
f3ace29
Reduce verbosity
adferrand Apr 26, 2020
b32f649
Reduce verbosity
adferrand Apr 26, 2020
d9ad84e
Simple move
adferrand Apr 26, 2020
dc31bb2
Hello World for Travis
adferrand Apr 26, 2020
997a55e
Prepare notifications
adferrand Apr 26, 2020
6260a30
Configure notification
adferrand Apr 26, 2020
d983b7f
Test failure
adferrand Apr 26, 2020
9a58c76
Configure stage
adferrand Apr 26, 2020
ee98bfc
Test without condition
adferrand Apr 26, 2020
e8d05f6
Use env
adferrand Apr 26, 2020
e877c9c
Now use it
adferrand Apr 26, 2020
b553a7e
Get env
adferrand Apr 26, 2020
77e7f85
Pull together
adferrand Apr 26, 2020
75f8ddd
Fix variable
adferrand Apr 26, 2020
02e630d
Farm tests on Azure configuration
adferrand Apr 26, 2020
6e8ff78
Test failure
adferrand Apr 26, 2020
eb0ac10
Better notify template
adferrand Apr 26, 2020
7c986b7
Update message
adferrand Apr 26, 2020
fa9bfbe
Continue format
adferrand Apr 26, 2020
48550fe
Continue format
adferrand Apr 26, 2020
1ca4351
COntinue format
adferrand Apr 26, 2020
c2f2e4e
Final touch
adferrand Apr 26, 2020
2d2ff6f
Reactivate everything
adferrand Apr 26, 2020
8be635a
Remove forced failure
adferrand Apr 26, 2020
1042743
Configure pipelines
adferrand Apr 26, 2020
0b3a270
No notification for tests branches
adferrand Apr 26, 2020
168fb7a
Prepare deploy
adferrand Apr 26, 2020
35f2345
Focus on packaging jobs
adferrand Apr 26, 2020
b26854e
Update template name
adferrand Apr 26, 2020
0963be1
Refactor
adferrand Apr 26, 2020
16f3ab1
Reuse copy task here
adferrand Apr 26, 2020
28e8fc4
Define variable group
adferrand Apr 26, 2020
ba32120
Merge branch 'master' into full-azure-pipelines
adferrand Jun 11, 2020
d339a7b
Add snap multiarch build
adferrand Jun 11, 2020
da4b3e7
Add +x permissions
adferrand Jun 11, 2020
5bf7b91
Simplify steps
adferrand Jun 11, 2020
621fc08
Disable deploy for now
adferrand Jun 11, 2020
1f4a0bc
Fix
adferrand Jun 11, 2020
46e7f1d
Fix paths
adferrand Jun 11, 2020
b16bb36
Parsing
adferrand Jun 11, 2020
5692bc3
Try without template
adferrand Jun 11, 2020
9474d53
Split in stages
adferrand Jun 12, 2020
248ba55
Fix names
adferrand Jun 12, 2020
78de077
Revert "Split in stages"
adferrand Jun 12, 2020
55ec7ce
Name
adferrand Jun 12, 2020
7ba2d96
Fix path
adferrand Jun 12, 2020
beccf72
Name
adferrand Jun 12, 2020
b181393
Variables
adferrand Jun 13, 2020
7d67a92
Merge branch 'master' into full-azure-pipelines
adferrand Jun 19, 2020
5b580d0
Add missing standard jobs
adferrand Jun 19, 2020
d220f5c
Merge branch 'master' into full-azure-pipelines
adferrand Jun 26, 2020
f8add8d
Consume snapcraft config and mattermost webhook
adferrand Jun 26, 2020
90fbdf4
Multi snap push
adferrand Jun 26, 2020
e09cbcb
Reconfigure variables in extended jobs
adferrand Jun 26, 2020
d140408
Configure farm tests
adferrand Jun 26, 2020
12dce1d
Merge logic for farm tests
adferrand Jun 26, 2020
fd8e13d
Fix
adferrand Jun 26, 2020
53b7093
Simplify config
adferrand Jun 26, 2020
636ce3a
Activate farm tests
adferrand Jun 26, 2020
e71f79e
Embed interactive console behavior in dockers
adferrand Jun 26, 2020
c779a37
Remove initialization of the pem file
adferrand Jun 26, 2020
c36070e
Some fixes
adferrand Jun 26, 2020
d5c7ccd
Use local project for test farm
adferrand Jun 26, 2020
ac9f83f
Test
adferrand Jun 26, 2020
c570a5d
Improve script call
adferrand Jun 27, 2020
0bc5697
Install util-linux
adferrand Jun 27, 2020
f17406e
Revert "Embed interactive console behavior in dockers"
adferrand Jun 27, 2020
ef00c6e
Include script call in tox
adferrand Jun 27, 2020
9e490c2
Real copy
adferrand Jun 27, 2020
e70eb4e
Fix calls
adferrand Jun 27, 2020
4d5b83a
Fix snap name
adferrand Jun 27, 2020
2d8c7ce
Put auth file in the right place
adferrand Jun 27, 2020
e49d6ca
Prevent daemons to start upon install
adferrand Jun 27, 2020
54fba18
Try another fix
adferrand Jun 27, 2020
4643f9b
Focus on farm tests
adferrand Jun 28, 2020
43069a9
Explicit non existent file
adferrand Jun 28, 2020
4ce6122
Stat
adferrand Jun 28, 2020
eda44c3
Audit network
adferrand Jun 28, 2020
e236dd8
Audit network root
adferrand Jun 28, 2020
0798b29
Stop nginx
adferrand Jun 28, 2020
28bfcf7
Default ports
adferrand Jun 28, 2020
d867193
Explicit keyname
adferrand Jun 28, 2020
3eecd71
Add env variables for farm tests
adferrand Jun 28, 2020
a244d17
Test failure
adferrand Jun 28, 2020
3aafcd7
Fix interpolation of the message
adferrand Jun 28, 2020
122f3d1
Improve message
adferrand Jun 28, 2020
ee4e6b3
Revert "Test failure"
adferrand Jun 28, 2020
916452f
Reactivate everything
adferrand Jun 28, 2020
4dcb7ad
Smarter build of oldest tests
adferrand Jun 28, 2020
6a41063
Move oldest tests to Xenial, and use pipstrap to stabilize the env
adferrand Jun 28, 2020
04cda0e
Split oldest tests
adferrand Jun 28, 2020
68950c0
Merge branch 'master' into full-azure-pipelines
adferrand Jun 30, 2020
9bdd9b8
Reorganize pipelines to refer to unitary stages
adferrand Jun 30, 2020
c556bb7
Update .azure-pipelines/templates/jobs/extended-tests-jobs.yml
adferrand Jun 30, 2020
bb75444
Fix snap -> snapd
adferrand Jun 30, 2020
36d6bc6
Fixes
adferrand Jun 30, 2020
4a941ef
Update .azure-pipelines/templates/jobs/extended-tests-jobs.yml
adferrand Jun 30, 2020
71fbcb5
Use not instead of coalesce
adferrand Jun 30, 2020
fb6a248
Try another approach
adferrand Jun 30, 2020
def19b3
Simplify condition
adferrand Jun 30, 2020
70ffd68
Improve farm tests, add comment
adferrand Jun 30, 2020
9a07ee5
Make test-farm generic
adferrand Jun 30, 2020
a6ecf68
Fix position of jobs
adferrand Jun 30, 2020
6e02f3d
Remove unused logic in run_oldest_tests
adferrand Jun 30, 2020
4d127e1
Fix toxenv names
adferrand Jun 30, 2020
2da124c
Fix test-farm logic
adferrand Jun 30, 2020
e9bf443
Export variable
adferrand Jun 30, 2020
168678b
Simply use docker run -t instead of docker run -it
adferrand Jun 30, 2020
9eb10d6
Remove a dependency not needed
adferrand Jun 30, 2020
1750e73
Rebrand advanced pipeline into nightly pipeline, running only master …
adferrand Jun 30, 2020
edaf3eb
Remove Travis references in contributing.rst. Run full tests only bra…
adferrand Jun 30, 2020
07fa8d7
Remove travis config.
adferrand Jun 30, 2020
4f4c1fc
Use expressions
adferrand Jun 30, 2020
c000c9d
Check expression
adferrand Jun 30, 2020
f88ef76
Expression is valid.
adferrand Jun 30, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .azure-pipelines/advanced-test.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Advanced pipeline for running our full test suite on demand.
# Advanced pipeline for running our full test suite on demand and for release branches.
trigger:
- '*.x'
# When changing these triggers, please ensure the documentation under
# "Running tests in CI" is still correct.
- azure-test-*
- test-*
pr: none

jobs:
# Any addition here should be reflected in the advanced and release pipelines.
# It is advised to declare all jobs here as templates to improve maintainability.
- template: templates/tests-suite.yml
- template: templates/installer-tests.yml
stages:
- template: templates/stages/test-and-package-stage.yml
# Notify failures only for release branches.
- ${{ if endsWith(variables['Build.SourceBranchName'], '.x') }}:
- template: templates/stages/notify-failure-stage.yml
18 changes: 0 additions & 18 deletions .azure-pipelines/advanced.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .azure-pipelines/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ pr:
- '*.x'

jobs:
- template: templates/tests-suite.yml
- template: templates/jobs/standard-tests-jobs.yml
15 changes: 15 additions & 0 deletions .azure-pipelines/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Nightly pipeline running each day for master.
trigger: none
pr: none
schedules:
- cron: "0 4 * * *"
displayName: Nightly build
branches:
include:
- master
always: true

stages:
- template: templates/stages/test-and-package-stage.yml
- template: templates/stages/deploy-stage.yml
- template: templates/stages/notify-failure-stage.yml
11 changes: 5 additions & 6 deletions .azure-pipelines/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ trigger:
- v*
pr: none

jobs:
# Any addition here should be reflected in the advanced and advanced-test pipelines.
# It is advised to declare all jobs here as templates to improve maintainability.
- template: templates/tests-suite.yml
- template: templates/installer-tests.yml
- template: templates/changelog.yml
stages:
- template: templates/stages/test-and-package-stage.yml
- template: templates/stages/changelog-stage.yml
- template: templates/stages/deploy-stage.yml
- template: templates/stages/notify-failure-stage.yml
14 changes: 0 additions & 14 deletions .azure-pipelines/templates/changelog.yml

This file was deleted.

96 changes: 96 additions & 0 deletions .azure-pipelines/templates/jobs/extended-tests-jobs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
jobs:
- job: extended_test
variables:
- name: IMAGE_NAME
value: ubuntu-18.04
- group: certbot-common
strategy:
matrix:
linux-py36:
PYTHON_VERSION: 3.6
TOXENV: py36
linux-py37:
PYTHON_VERSION: 3.7
TOXENV: py37
linux-py37-nopin:
PYTHON_VERSION: 3.7
TOXENV: py37
CERTBOT_NO_PIN: 1
linux-boulder-v1-integration-certbot-oldest:
TOXENV: integration-certbot-oldest
ACME_SERVER: boulder-v1
linux-boulder-v2-integration-certbot-oldest:
TOXENV: integration-certbot-oldest
ACME_SERVER: boulder-v2
linux-boulder-v1-integration-nginx-oldest:
TOXENV: integration-nginx-oldest
ACME_SERVER: boulder-v1
linux-boulder-v2-integration-nginx-oldest:
TOXENV: integration-nginx-oldest
ACME_SERVER: boulder-v2
linux-boulder-v1-py27-integration:
PYTHON_VERSION: 2.7
TOXENV: integration
ACME_SERVER: boulder-v1
linux-boulder-v2-py27-integration:
PYTHON_VERSION: 2.7
TOXENV: integration
ACME_SERVER: boulder-v2
linux-boulder-v1-py35-integration:
PYTHON_VERSION: 3.5
TOXENV: integration
ACME_SERVER: boulder-v1
linux-boulder-v2-py35-integration:
PYTHON_VERSION: 3.5
TOXENV: integration
ACME_SERVER: boulder-v2
linux-boulder-v1-py36-integration:
PYTHON_VERSION: 3.6
TOXENV: integration
ACME_SERVER: boulder-v1
linux-boulder-v2-py36-integration:
PYTHON_VERSION: 3.6
TOXENV: integration
ACME_SERVER: boulder-v2
linux-boulder-v1-py37-integration:
PYTHON_VERSION: 3.7
TOXENV: integration
ACME_SERVER: boulder-v1
linux-boulder-v2-py37-integration:
PYTHON_VERSION: 3.7
TOXENV: integration
ACME_SERVER: boulder-v2
linux-boulder-v1-py38-integration:
PYTHON_VERSION: 3.8
TOXENV: integration
ACME_SERVER: boulder-v1
linux-boulder-v2-py38-integration:
PYTHON_VERSION: 3.8
TOXENV: integration
ACME_SERVER: boulder-v2
nginx-compat:
TOXENV: nginx_compat
le-auto-jessie:
TOXENV: le_auto_jessie
le-auto-centos6:
TOXENV: le_auto_centos6
le-auto-oraclelinux6:
TOXENV: le_auto_oraclelinux6
docker-dev:
TOXENV: docker_dev
farmtest-apache2:
PYTHON_VERSION: 3.7
TOXENV: test-farm-apache2
farmtest-leauto-upgrades:
PYTHON_VERSION: 3.7
TOXENV: test-farm-leauto-upgrades
farmtest-certonly-standalone:
PYTHON_VERSION: 3.7
TOXENV: test-farm-certonly-standalone
farmtest-sdists:
PYTHON_VERSION: 3.7
TOXENV: test-farm-sdists
pool:
vmImage: $(IMAGE_NAME)
steps:
- template: ../steps/tox-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ jobs:
vmImage: $(imageName)
steps:
- powershell: |
$currentVersion = $PSVersionTable.PSVersion
if ($currentVersion.Major -ne 5) {
if ($PSVersionTable.PSVersion.Major -ne 5) {
throw "Powershell version is not 5.x"
}
condition: eq(variables['imageName'], 'vs2017-win2016')
Expand All @@ -59,3 +58,45 @@ jobs:
set PATH=%ProgramFiles(x86)%\Certbot\bin;%PATH%
venv\Scripts\python -m pytest certbot-ci\certbot_integration_tests\certbot_tests -n 4
displayName: Run certbot integration tests
- job: snap_build
strategy:
matrix:
amd64:
ARCH: amd64
arm64:
ARCH: arm64
armhf:
ARCH: armhf
pool:
vmImage: ubuntu-18.04
steps:
- script: |
snap/local/build.sh ${ARCH}
mv *.snap $(Build.ArtifactStagingDirectory)
displayName: Build Certbot snap
- task: PublishPipelineArtifact@1
inputs:
path: $(Build.ArtifactStagingDirectory)
artifact: snap-$(arch)
displayName: Store snap artifact
- job: snap_run
dependsOn: snap_build
pool:
vmImage: ubuntu-18.04
steps:
- script: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends nginx-light snap
python tools/pip_install.py -U tox
displayName: Install dependencies
- task: DownloadPipelineArtifact@2
inputs:
artifact: snap-amd64
path: $(Build.SourcesDirectory)/snap
displayName: Retrieve Certbot snap
- script: |
sudo snap install --dangerous --classic snap/*.snap
displayName: Install Certbot snap
- script: |
python -m tox -e integration-external,apacheconftest-external-with-pebble
displayName: Run tox
73 changes: 73 additions & 0 deletions .azure-pipelines/templates/jobs/standard-tests-jobs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
jobs:
- job: test
strategy:
matrix:
macos-py27:
IMAGE_NAME: macOS-10.14
PYTHON_VERSION: 2.7
TOXENV: py27
macos-py38:
IMAGE_NAME: macOS-10.14
PYTHON_VERSION: 3.8
TOXENV: py38
windows-py35:
IMAGE_NAME: vs2017-win2016
PYTHON_VERSION: 3.5
TOXENV: py35
windows-py37-cover:
IMAGE_NAME: vs2017-win2016
PYTHON_VERSION: 3.7
TOXENV: py37-cover
windows-integration-certbot:
IMAGE_NAME: vs2017-win2016
PYTHON_VERSION: 3.7
TOXENV: integration-certbot
linux-oldest-tests-1:
IMAGE_NAME: ubuntu-18.04
TOXENV: py27-{acme,apache,apache-v2,certbot}-oldest
linux-oldest-tests-2:
IMAGE_NAME: ubuntu-18.04
TOXENV: py27-{dns,nginx}-oldest
linux-py27:
IMAGE_NAME: ubuntu-18.04
PYTHON_VERSION: 2.7
TOXENV: py27
linux-py35:
IMAGE_NAME: ubuntu-18.04
PYTHON_VERSION: 3.5
TOXENV: py35
linux-py38-cover:
IMAGE_NAME: ubuntu-18.04
PYTHON_VERSION: 3.8
TOXENV: py38-cover
linux-py37-lint:
IMAGE_NAME: ubuntu-18.04
PYTHON_VERSION: 3.7
TOXENV: lint
linux-py35-mypy:
IMAGE_NAME: ubuntu-18.04
PYTHON_VERSION: 3.5
TOXENV: mypy
linux-integration:
IMAGE_NAME: ubuntu-18.04
PYTHON_VERSION: 2.7
TOXENV: integration
ACME_SERVER: pebble
apache-compat:
IMAGE_NAME: ubuntu-18.04
TOXENV: apache_compat
le-auto-xenial:
IMAGE_NAME: ubuntu-18.04
TOXENV: le_auto_xenial
apacheconftest:
IMAGE_NAME: ubuntu-18.04
PYTHON_VERSION: 2.7
TOXENV: apacheconftest-with-pebble
nginxroundtrip:
IMAGE_NAME: ubuntu-18.04
PYTHON_VERSION: 2.7
TOXENV: nginxroundtrip
pool:
vmImage: $(IMAGE_NAME)
steps:
- template: ../steps/tox-steps.yml
16 changes: 16 additions & 0 deletions .azure-pipelines/templates/stages/changelog-stage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
stages:
- stage: Changelog
jobs:
- job: prepare
pool:
vmImage: vs2017-win2016
steps:
- bash: |
CERTBOT_VERSION="$(cd certbot && python -c "import certbot; print(certbot.__version__)" && cd ~-)"
"${BUILD_REPOSITORY_LOCALPATH}\tools\extract_changelog.py" "${CERTBOT_VERSION}" >> "${BUILD_ARTIFACTSTAGINGDIRECTORY}/release_notes.md"
displayName: Prepare changelog
- task: PublishPipelineArtifact@1
inputs:
path: $(Build.ArtifactStagingDirectory)
artifact: changelog
displayName: Publish changelog
43 changes: 43 additions & 0 deletions .azure-pipelines/templates/stages/deploy-stage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
stages:
- stage: Deploy
jobs:
# This job relies on a snapcraft.yaml preconfigured with credential,
# stored as a secure file in Azure Pipeline.
# This credential has a maximum lifetime of 1 year and the current
# credential will expire on 4/22/2021. The content of snapcraft.yaml
# will need to be updated to use a new credential before then to
# prevent automated deploys from breaking. Remembering to do this is
# also tracked by https://github.com/certbot/certbot/issues/7931.
- job: publish_snap
strategy:
matrix:
amd64:
ARCH: amd64
arm64:
ARCH: arm64
armhf:
ARCH: armhf
pool:
vmImage: ubuntu-18.04
variables:
- group: certbot-common
steps:
- bash: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends snapd
sudo snap install --classic snapcraft
displayName: Install dependencies
- task: DownloadPipelineArtifact@2
inputs:
artifact: snap-$(arch)
path: $(Build.SourcesDirectory)/snap
displayName: Retrieve Certbot snap
- task: DownloadSecureFile@1
name: snapcraftCfg
inputs:
secureFile: snapcraft.cfg
- bash: |
mkdir -p .snapcraft
ln -s $(snapcraftCfg.secureFilePath) .snapcraft/snapcraft.cfg
snapcraft push --release=edge snap/*.snap
displayName: Publish to Snap store
18 changes: 18 additions & 0 deletions .azure-pipelines/templates/stages/notify-failure-stage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
stages:
- stage: On_Failure
jobs:
- job: notify_mattermost
variables:
- group: certbot-common
pool:
vmImage: ubuntu-latest
steps:
- bash: |
MESSAGE="\
---\n\
##### Azure Pipeline
*Repo* $(Build.Repository.ID) - *Pipeline* $(Build.DefinitionName) #$(Build.BuildNumber) - *Branch/PR* $(Build.SourceBranchName)\n\
:warning: __Pipeline has failed__: [Link to the build](https://dev.azure.com/$(Build.Repository.ID)/_build/results?buildId=$(Build.BuildId)&view=results)\n\n\
---"
curl -i -X POST --data-urlencode "payload={\"text\":\"${MESSAGE}\"}" "$(MATTERMOST_URL)"
condition: failed()
Loading