mirror of
https://github.com/certbot/certbot.git
synced 2026-07-30 18:14:21 +02:00
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:
@@ -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
|
||||
|
||||
|
||||
Executable
+36
@@ -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
|
||||
Reference in New Issue
Block a user