mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 00:02:14 -04:00
Merge remote-tracking branch 'origin/nginx-compatibility-test' into nginx-compatibility-test
This commit is contained in:
commit
ade66fbbfa
9 changed files with 97 additions and 40 deletions
12
.travis.yml
12
.travis.yml
|
|
@ -34,6 +34,8 @@ matrix:
|
|||
- python: "2.7"
|
||||
env: TOXENV=apacheconftest
|
||||
sudo: required
|
||||
- python: "2.7"
|
||||
env: TOXENV=nginxroundtrip
|
||||
- python: "2.7"
|
||||
env: TOXENV=py27 BOULDER_INTEGRATION=1
|
||||
sudo: true
|
||||
|
|
@ -53,6 +55,16 @@ matrix:
|
|||
services: docker
|
||||
before_install:
|
||||
addons:
|
||||
- sudo: required
|
||||
env: TOXENV=apache_compat
|
||||
services: docker
|
||||
before_install:
|
||||
addons:
|
||||
- sudo: required
|
||||
env: TOXENV=nginx_compat
|
||||
services: docker
|
||||
before_install:
|
||||
addons:
|
||||
- python: "2.7"
|
||||
env: TOXENV=cover
|
||||
- python: "3.3"
|
||||
|
|
|
|||
51
certbot-compatibility-test/Dockerfile
Normal file
51
certbot-compatibility-test/Dockerfile
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
FROM debian:jessie
|
||||
MAINTAINER Brad Warren <bmw@eff.org>
|
||||
|
||||
# no need to mkdir anything:
|
||||
# https://docs.docker.com/reference/builder/#copy
|
||||
# If <dest> doesn't exist, it is created along with all missing
|
||||
# directories in its path.
|
||||
|
||||
# TODO: Install non-default Python versions for tox.
|
||||
# TODO: Install Apache/Nginx for plugin development.
|
||||
COPY certbot-auto /opt/certbot/src/certbot-auto
|
||||
RUN /opt/certbot/src/certbot-auto -n --os-packages-only
|
||||
|
||||
# the above is not likely to change, so by putting it further up the
|
||||
# Dockerfile we make sure we cache as much as possible
|
||||
|
||||
COPY setup.py README.rst CHANGES.rst MANIFEST.in linter_plugin.py tox.cover.sh tox.ini pep8.travis.sh .pep8 .pylintrc /opt/certbot/src/
|
||||
|
||||
# all above files are necessary for setup.py, however, package source
|
||||
# code directory has to be copied separately to a subdirectory...
|
||||
# https://docs.docker.com/reference/builder/#copy: "If <src> is a
|
||||
# directory, the entire contents of the directory are copied,
|
||||
# including filesystem metadata. Note: The directory itself is not
|
||||
# copied, just its contents." Order again matters, three files are far
|
||||
# more likely to be cached than the whole project directory
|
||||
|
||||
COPY certbot /opt/certbot/src/certbot/
|
||||
COPY acme /opt/certbot/src/acme/
|
||||
COPY certbot-apache /opt/certbot/src/certbot-apache/
|
||||
COPY certbot-nginx /opt/certbot/src/certbot-nginx/
|
||||
COPY certbot-compatibility-test /opt/certbot/src/certbot-compatibility-test/
|
||||
|
||||
RUN virtualenv --no-site-packages -p python2 /opt/certbot/venv && \
|
||||
/opt/certbot/venv/bin/pip install -U setuptools && \
|
||||
/opt/certbot/venv/bin/pip install -U pip && \
|
||||
/opt/certbot/venv/bin/pip install \
|
||||
-e /opt/certbot/src/acme \
|
||||
-e /opt/certbot/src \
|
||||
-e /opt/certbot/src/certbot-apache \
|
||||
-e /opt/certbot/src/certbot-nginx \
|
||||
-e /opt/certbot/src/certbot-compatibility-test \
|
||||
-e /opt/certbot/src[dev,docs]
|
||||
|
||||
# install in editable mode (-e) to save space: it's not possible to
|
||||
# "rm -rf /opt/certbot/src" (it's stays in the underlaying image);
|
||||
# this might also help in debugging: you can "docker run --entrypoint
|
||||
# bash" and investigate, apply patches, etc.
|
||||
|
||||
WORKDIR /opt/certbot/src/certbot-compatibility-test/certbot_compatibility_test/testdata
|
||||
|
||||
ENV PATH /opt/certbot/venv/bin:$PATH
|
||||
6
certbot-compatibility-test/Dockerfile-apache
Normal file
6
certbot-compatibility-test/Dockerfile-apache
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
FROM certbot-compatibility-test
|
||||
MAINTAINER Brad Warren <bmw@eff.org>
|
||||
|
||||
RUN apt-get install apache2 -y
|
||||
|
||||
ENTRYPOINT [ "certbot-compatibility-test", "-p", "apache" ]
|
||||
6
certbot-compatibility-test/Dockerfile-nginx
Normal file
6
certbot-compatibility-test/Dockerfile-nginx
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
FROM certbot-compatibility-test
|
||||
MAINTAINER Brad Warren <bmw@eff.org>
|
||||
|
||||
RUN apt-get install nginx -y
|
||||
|
||||
ENTRYPOINT [ "certbot-compatibility-test", "-p", "nginx" ]
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
FROM httpd
|
||||
MAINTAINER Brad Warren <bradmw@umich.edu>
|
||||
|
||||
RUN mkdir /var/run/apache2
|
||||
|
||||
ENV APACHE_RUN_USER=daemon \
|
||||
APACHE_RUN_GROUP=daemon \
|
||||
APACHE_PID_FILE=/usr/local/apache2/logs/httpd.pid \
|
||||
APACHE_RUN_DIR=/var/run/apache2 \
|
||||
APACHE_LOCK_DIR=/var/lock \
|
||||
APACHE_LOG_DIR=/usr/local/apache2/logs
|
||||
|
||||
COPY certbot-compatibility-test/certbot_compatibility_test/configurators/apache/a2enmod.sh /usr/local/bin/
|
||||
COPY certbot-compatibility-test/certbot_compatibility_test/configurators/apache/a2dismod.sh /usr/local/bin/
|
||||
COPY certbot-compatibility-test/certbot_compatibility_test/testdata/rsa1024_key2.pem /usr/local/apache2/conf/
|
||||
COPY certbot-compatibility-test/certbot_compatibility_test/testdata/empty_cert.pem /usr/local/apache2/conf/
|
||||
|
||||
# Note: this only exposes the port to other docker containers. You
|
||||
# still have to bind to 443@host at runtime.
|
||||
EXPOSE 443
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
FROM httpd
|
||||
MAINTAINER Brad Warren <bradmw@umich.edu>
|
||||
|
||||
RUN mkdir /var/run/apache2
|
||||
|
||||
ENV APACHE_RUN_USER=daemon \
|
||||
APACHE_RUN_GROUP=daemon \
|
||||
APACHE_PID_FILE=/usr/local/apache2/logs/httpd.pid \
|
||||
APACHE_RUN_DIR=/var/run/apache2 \
|
||||
APACHE_LOCK_DIR=/var/lock \
|
||||
APACHE_LOG_DIR=/usr/local/apache2/logs
|
||||
|
||||
COPY certbot-compatibility-test/certbot_compatibility_test/configurators/apache/a2enmod.sh /usr/local/bin/
|
||||
COPY certbot-compatibility-test/certbot_compatibility_test/configurators/apache/a2dismod.sh /usr/local/bin/
|
||||
COPY certbot-compatibility-test/certbot_compatibility_test/testdata/rsa1024_key2.pem /usr/local/apache2/conf/
|
||||
COPY certbot-compatibility-test/certbot_compatibility_test/testdata/empty_cert.pem /usr/local/apache2/conf/
|
||||
|
||||
# Note: this only exposes the port to other docker containers. You
|
||||
# still have to bind to 443@host at runtime.
|
||||
EXPOSE 443
|
||||
BIN
certbot-compatibility-test/certbot_compatibility_test/testdata/nginx.tar.gz
vendored
Normal file
BIN
certbot-compatibility-test/certbot_compatibility_test/testdata/nginx.tar.gz
vendored
Normal file
Binary file not shown.
22
tox.ini
22
tox.ini
|
|
@ -79,6 +79,10 @@ commands =
|
|||
pip install -e acme -e .[dev] -e certbot-apache -e certbot-nginx -e certbot-compatibility-test -e letshelp-certbot
|
||||
{toxinidir}/certbot-apache/certbot_apache/tests/apache-conf-files/apache-conf-test --debian-modules
|
||||
|
||||
[testenv:nginxroundtrip]
|
||||
commands =
|
||||
pip install -e acme[dev] -e .[dev] -e certbot-nginx
|
||||
python certbot-compatibility-test/nginx/roundtrip.py certbot-compatibility-test/nginx/nginx-roundtrip-testdata
|
||||
|
||||
[testenv:le_auto]
|
||||
# At the moment, this tests under Python 2.7 only, as only that version is
|
||||
|
|
@ -89,3 +93,21 @@ commands =
|
|||
whitelist_externals =
|
||||
docker
|
||||
passenv = DOCKER_*
|
||||
|
||||
[testenv:apache_compat]
|
||||
commands =
|
||||
docker build -t certbot-compatibility-test -f certbot-compatibility-test/Dockerfile .
|
||||
docker build -t apache-compat -f certbot-compatibility-test/Dockerfile-apache .
|
||||
docker run --rm -it apache-compat -c apache.tar.gz -vvvv
|
||||
whitelist_externals =
|
||||
docker
|
||||
passenv = DOCKER_*
|
||||
|
||||
[testenv:nginx_compat]
|
||||
commands =
|
||||
docker build -t certbot-compatibility-test -f certbot-compatibility-test/Dockerfile .
|
||||
docker build -t nginx-compat -f certbot-compatibility-test/Dockerfile-nginx .
|
||||
docker run --rm -it nginx-compat -c nginx.tar.gz -vvvv
|
||||
whitelist_externals =
|
||||
docker
|
||||
passenv = DOCKER_*
|
||||
|
|
|
|||
Loading…
Reference in a new issue