Migrate the CI pipeline from Travis to Azure Pipeline (#8098)

Fixes #8071 and fixes https://github.com/certbot/certbot/issues/8110.

This PR migrates every job from Travis in Azure Pipeline.

This PR essentially converts the Travis jobs into Azure Pipeline with a complete iso-fonctionality (or I made a mistake). The jobs are added in the relevant existing pipelines (`main`, `nightly`, `advanced-test`, `release`). A global refactoring thanks to the templating system is done to reduce greatly the verbosity of the pipeline descriptions.

A specific feature (not present in Travis) is added: the stage `On_Failure`. Using directly the Mattermost API, it allows to notify pipeline failure in a Mattermost channel with a link to the failed pipelines without the need to authenticate to Microsoft.

See https://github.com/certbot/certbot/pull/8098#issuecomment-649873641 for the post merge actions to do at the end of this work.
This commit is contained in:
Adrien Ferrand
2020-07-02 15:01:21 -07:00
committed by GitHub
parent cb3ff9ef18
commit 8a3a8c7097
28 changed files with 475 additions and 504 deletions
+1 -1
View File
@@ -12,7 +12,6 @@ ndg-httpsclient==0.3.2
ply==3.4
pyasn1==0.1.9
pycparser==2.14
pyOpenSSL==0.13.1
pyRFC3339==1.0
python-augeas==0.5.0
oauth2client==4.0.0
@@ -49,6 +48,7 @@ requests[security]==2.6.0
# Ubuntu Xenial constraints
ConfigArgParse==0.10.0
pyOpenSSL==0.15.1
funcsigs==0.4
zope.hookable==4.0.4
+36
View File
@@ -0,0 +1,36 @@
#!/bin/bash
set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
pushd "${DIR}/../"
function cleanup() {
rm -f "${DOCKERFILE}"
popd
}
trap cleanup EXIT
DOCKERFILE=$(mktemp /tmp/Dockerfile.XXXXXX)
cat << "EOF" >> "${DOCKERFILE}"
FROM ubuntu:16.04
COPY pipstrap.py /tmp/pipstrap.py
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
python-dev python-pip python-setuptools \
gcc libaugeas0 libssl-dev libffi-dev \
git ca-certificates nginx-light openssl curl \
&& curl -fsSL https://get.docker.com | bash /dev/stdin \
&& python /tmp/pipstrap.py \
&& python -m pip install tox \
&& rm -rf /var/lib/apt/lists/*
EOF
docker build -f "${DOCKERFILE}" -t oldest-worker ./letsencrypt-auto-source/pieces
docker run --rm --network=host -w "${PWD}" \
-v /var/run/docker.sock:/var/run/docker.sock \
-v "${PWD}:${PWD}" -v /tmp:/tmp \
-e TOXENV -e ACME_SERVER -e PYTEST_ADDOPTS \
oldest-worker python -m tox