mirror of
https://github.com/certbot/certbot.git
synced 2026-06-04 22:33:00 -04:00
* Add a new, simplified version of pipstrap. * Use tools/pipstrap.py * Uncomment code * Refactor pip_install.py and provide hashes. * Fix test_sdists.sh. * Make code work on Python 2. * Call strip_hashes.py using Python 3. * Pin the oldest version of httplib2 used in distros * Strip enum34 dependency. * Remove pip pinnings from dev_constraints.txt * Correct pipstrap docstring. * Don't set working_dir twice. * Add comments
37 lines
1 KiB
Bash
Executable file
37 lines
1 KiB
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 letsencrypt-auto-source/pieces/dependency-requirements.txt /tmp/letsencrypt-auto-source/pieces/
|
|
COPY tools/ /tmp/tools/
|
|
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/tools/pipstrap.py \
|
|
&& python /tmp/tools/pip_install.py tox \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
EOF
|
|
|
|
docker build -f "${DOCKERFILE}" -t oldest-worker .
|
|
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
|