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