mirror of https://github.com/ansible/ansible.git
Add new default Docker container for ansible-test. (#31944)
* Add new default Docker container for ansible-test. * Update ansible-test change classification. * Update list of disabled pylint rules. * Fix pylint issues with ansible-test.pull/31953/head
parent
fbbffbabde
commit
f76afab6e5
@ -0,0 +1,3 @@
|
|||||||
|
*
|
||||||
|
!docker
|
||||||
|
!requirements
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
FROM ubuntu:16.04
|
||||||
|
|
||||||
|
COPY docker/deadsnakes.list /etc/apt/sources.list.d/deadsnakes.list
|
||||||
|
|
||||||
|
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F23C5A6CF475977595C89F51BA6932366A755776
|
||||||
|
|
||||||
|
RUN apt-get update -y && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
|
gcc \
|
||||||
|
git \
|
||||||
|
libffi-dev \
|
||||||
|
libxml2-dev \
|
||||||
|
libxslt1-dev \
|
||||||
|
locales \
|
||||||
|
make \
|
||||||
|
python2.6-dev \
|
||||||
|
python2.7-dev \
|
||||||
|
python3.5-dev \
|
||||||
|
python3.6-dev \
|
||||||
|
shellcheck \
|
||||||
|
&& \
|
||||||
|
apt-get clean
|
||||||
|
|
||||||
|
RUN rm /etc/apt/apt.conf.d/docker-clean
|
||||||
|
RUN locale-gen en_US.UTF-8
|
||||||
|
VOLUME /sys/fs/cgroup /run/lock /run /tmp
|
||||||
|
|
||||||
|
ADD https://bootstrap.pypa.io/get-pip.py /tmp/get-pip.py
|
||||||
|
|
||||||
|
COPY requirements/*.txt /tmp/requirements/
|
||||||
|
COPY docker/requirements.sh /tmp/
|
||||||
|
RUN cd /tmp/requirements && /tmp/requirements.sh
|
||||||
|
|
||||||
|
RUN ln -s python2.7 /usr/bin/python2
|
||||||
|
RUN ln -s python3.6 /usr/bin/python3
|
||||||
|
RUN ln -s python3 /usr/bin/python
|
||||||
|
|
||||||
|
ENV container=docker
|
||||||
|
CMD ["/sbin/init"]
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial main
|
||||||
|
deb-src http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial main
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash -eu
|
||||||
|
|
||||||
|
python_versions=(
|
||||||
|
2.6
|
||||||
|
2.7
|
||||||
|
3.5
|
||||||
|
3.6
|
||||||
|
)
|
||||||
|
|
||||||
|
requirements=()
|
||||||
|
|
||||||
|
for requirement in *.txt; do
|
||||||
|
if [ "${requirement}" != "constraints.txt" ]; then
|
||||||
|
requirements+=("-r" "${requirement}")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
for python_version in "${python_versions[@]}"; do
|
||||||
|
set -x
|
||||||
|
"python${python_version}" /tmp/get-pip.py -c constraints.txt
|
||||||
|
"pip${python_version}" install --disable-pip-version-check -c constraints.txt "${requirements[@]}"
|
||||||
|
set +x
|
||||||
|
done
|
||||||
Loading…
Reference in New Issue