azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 1 | FROM ubuntu:16.04 |
| 2 | |
| 3 | LABEL maintainer="qa@mirantis.com" |
| 4 | |
| 5 | ARG TEMPEST_TAG="mcp/pike" |
| 6 | # Tempest plugins |
| 7 | ARG HORIZON_TAG="mcp/pike" |
Ilya Menkov | bf72514 | 2018-03-05 20:18:01 +0400 | [diff] [blame^] | 8 | ARG BARBICAN_TAG="mcp/pike" |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 9 | ARG DESIGNATE_TAG="mcp/pike" |
| 10 | ARG HEAT_TAG="mcp/pike" |
Ilya Menkov | bf72514 | 2018-03-05 20:18:01 +0400 | [diff] [blame^] | 11 | ARG IRONIC_TAG="mcp/pike" |
| 12 | ARG MANILA_TAG="mcp/pike" |
| 13 | ARG TELEMETRY_TAG="mcp/pike" |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 14 | # global openstack requirements repo |
| 15 | ARG UPPER_CONSTRAINTS_TAG="stable/pike" |
| 16 | # |
| 17 | ENV DEBIAN_FRONTEND=noninteractive \ |
| 18 | DEBCONF_NONINTERACTIVE_SEEN=true \ |
| 19 | LANG=C.UTF-8 \ |
| 20 | LANGUAGE=$LANG |
| 21 | SHELL ["/bin/bash", "-xec"] |
| 22 | USER root |
| 23 | # pre-update |
| 24 | RUN cd /etc/apt/ && echo > sources.list \ |
| 25 | && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial main restricted universe multiverse" >> sources.list \ |
| 26 | && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse" >> sources.list \ |
| 27 | && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse" >> sources.list \ |
| 28 | && echo 'Acquire::Languages "none";' > apt.conf.d/docker-no-languages \ |
| 29 | && echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > apt.conf.d/docker-gzip-indexes \ |
| 30 | && echo 'APT::Get::Install-Recommends "false"; APT::Get::Install-Suggests "false";' > apt.conf.d/docker-recommends \ |
| 31 | && apt-get update && apt-get upgrade -y \ |
| 32 | && apt-get install -y vim-tiny git-core python-pip libffi-dev libssl-dev python-dev python3-dev |
| 33 | |
| 34 | RUN pip install -U pip |
| 35 | WORKDIR /var/lib/ |
| 36 | # TODO migrate to downstrem mirror? |
| 37 | RUN git clone https://github.com/openstack/requirements.git openstack_requirements && \ |
| 38 | pushd openstack_requirements; git checkout $UPPER_CONSTRAINTS_TAG; popd ; |
| 39 | |
| 40 | RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/tempest && \ |
| 41 | pushd tempest; git checkout $TEMPEST_TAG; \ |
| 42 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt ; \ |
| 43 | pip install . ; popd; |
| 44 | |
| 45 | RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/tempest-horizon tempest-horizon-plugin ; \ |
| 46 | pushd tempest-horizon-plugin ; git checkout $HORIZON_TAG; \ |
| 47 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt ; \ |
| 48 | pip install . ; popd; |
| 49 | |
| 50 | RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/barbican-tempest-plugin && \ |
| 51 | pushd barbican-tempest-plugin; git checkout $BARBICAN_TAG; \ |
| 52 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt ; \ |
| 53 | pip install . ; popd; |
| 54 | |
| 55 | RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/designate-tempest-plugin && \ |
| 56 | pushd designate-tempest-plugin; git checkout $DESIGNATE_TAG; \ |
| 57 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt ; \ |
| 58 | pip install . ; popd; |
| 59 | |
| 60 | RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/heat-tempest-plugin && \ |
| 61 | pushd heat-tempest-plugin; git checkout $HEAT_TAG; \ |
| 62 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt ; \ |
| 63 | pip install . ; popd; |
| 64 | |
| 65 | RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/ironic-tempest-plugin && \ |
| 66 | pushd ironic-tempest-plugin; git checkout $IRONIC_TAG; \ |
| 67 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt ; \ |
| 68 | pip install . ; popd; |
| 69 | |
| 70 | RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/manila-tempest-plugin && \ |
| 71 | pushd manila-tempest-plugin; git checkout $MANILA_TAG; \ |
| 72 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt ; \ |
| 73 | pip install . ; popd; |
| 74 | |
| 75 | RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/telemetry-tempest-plugin && \ |
| 76 | pushd telemetry-tempest-plugin; git checkout $TELEMETRY_TAG; \ |
| 77 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt ; \ |
| 78 | pip install . ; popd; |
| 79 | |
| 80 | # Cleanup. |
| 81 | RUN apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 \ |
| 82 | ppp pppconfig pppoeconf popularity-contest cpp gcc g++ libssl-doc |
| 83 | RUN apt-get -y autoremove; apt-get -y clean; |
| 84 | RUN rm -rf /root/.cache |
| 85 | RUN rm -rf /var/lib/apt/lists/* |
| 86 | # |
| 87 | COPY bin/entrypoint.sh /usr/bin/entrypoint.sh |
| 88 | |
| 89 | WORKDIR /var/lib/tempest/ |
| 90 | ENTRYPOINT ["/usr/bin/entrypoint.sh"] |
| 91 | |
| 92 | # Build |
| 93 | # docker build -t docker-ci-tempest:$(date "+%Y_%m_%d_%H_%M_%S") . |