mirror of
https://github.com/certbot/certbot.git
synced 2026-06-05 06:42:10 -04:00
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.
36 lines
984 B
Bash
Executable file
36 lines
984 B
Bash
Executable file
#!/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
|