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 \ |
Maksym Shalamov | 6f5e8d9 | 2018-04-12 18:19:09 +0300 | [diff] [blame] | 33 | && apt-get install -y vim-tiny git-core python-pip libffi-dev libssl-dev python-dev python3-dev iputils-ping patch |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 34 | |
Maksym Shalamov | a95d720 | 2018-04-19 17:21:19 +0300 | [diff] [blame] | 35 | #Due to upstream bug we should use fixed version of pip |
sgarbuz | 5d5631f | 2018-04-18 13:54:56 +0300 | [diff] [blame] | 36 | RUN pip install -U 'pip==9.0.3' |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 37 | WORKDIR /var/lib/ |
| 38 | # TODO migrate to downstrem mirror? |
| 39 | RUN git clone https://github.com/openstack/requirements.git openstack_requirements && \ |
| 40 | pushd openstack_requirements; git checkout $UPPER_CONSTRAINTS_TAG; popd ; |
| 41 | |
Maksym Shalamov | df54d20 | 2018-04-13 16:13:12 +0300 | [diff] [blame] | 42 | RUN sed -i -e 's|tempest===17.2.0|git+https://gerrit.mcp.mirantis.net/packaging/sources/tempest@mcp/pike#egg=tempest|g' \ |
| 43 | /var/lib/openstack_requirements/upper-constraints.txt; |
| 44 | |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 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; \ |
sandriichenko | 3b17b48 | 2018-03-20 20:29:31 +0200 | [diff] [blame] | 47 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \ |
| 48 | popd; |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 49 | |
| 50 | RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/barbican-tempest-plugin && \ |
| 51 | pushd barbican-tempest-plugin; git checkout $BARBICAN_TAG; \ |
sandriichenko | 3b17b48 | 2018-03-20 20:29:31 +0200 | [diff] [blame] | 52 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \ |
| 53 | popd; |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 54 | |
| 55 | RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/designate-tempest-plugin && \ |
| 56 | pushd designate-tempest-plugin; git checkout $DESIGNATE_TAG; \ |
sandriichenko | 3b17b48 | 2018-03-20 20:29:31 +0200 | [diff] [blame] | 57 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \ |
| 58 | popd; |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 59 | |
| 60 | RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/heat-tempest-plugin && \ |
| 61 | pushd heat-tempest-plugin; git checkout $HEAT_TAG; \ |
sandriichenko | 3b17b48 | 2018-03-20 20:29:31 +0200 | [diff] [blame] | 62 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \ |
| 63 | popd; |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 64 | |
| 65 | RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/ironic-tempest-plugin && \ |
| 66 | pushd ironic-tempest-plugin; git checkout $IRONIC_TAG; \ |
sandriichenko | 3b17b48 | 2018-03-20 20:29:31 +0200 | [diff] [blame] | 67 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \ |
| 68 | popd; |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 69 | |
| 70 | RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/manila-tempest-plugin && \ |
| 71 | pushd manila-tempest-plugin; git checkout $MANILA_TAG; \ |
sandriichenko | 3b17b48 | 2018-03-20 20:29:31 +0200 | [diff] [blame] | 72 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \ |
| 73 | popd; |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 74 | |
| 75 | RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/telemetry-tempest-plugin && \ |
| 76 | pushd telemetry-tempest-plugin; git checkout $TELEMETRY_TAG; \ |
sandriichenko | 3b17b48 | 2018-03-20 20:29:31 +0200 | [diff] [blame] | 77 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \ |
| 78 | popd; |
| 79 | |
| 80 | RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/tempest && \ |
| 81 | pushd tempest; git checkout $TEMPEST_TAG; \ |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 82 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt ; \ |
| 83 | pip install . ; popd; |
| 84 | |
sandriichenko | 7ec3217 | 2018-03-19 17:21:21 +0200 | [diff] [blame] | 85 | RUN pip install junitxml |
Maksym Shalamov | 6f5e8d9 | 2018-04-12 18:19:09 +0300 | [diff] [blame] | 86 | # Patch junitxml library to include skipped tests in the test report totals header |
| 87 | COPY bin/patches/junitxml_init.patch /tmp/junitxml_init.patch |
| 88 | RUN patch /usr/local/lib/python2.7/dist-packages/junitxml/__init__.py /tmp/junitxml_init.patch |
sandriichenko | 7ec3217 | 2018-03-19 17:21:21 +0200 | [diff] [blame] | 89 | |
Maksym Shalamov | 98189f5 | 2018-04-24 13:36:26 +0300 | [diff] [blame] | 90 | # Patch os_testr library to fix issue ralated with tempest black-list option |
| 91 | COPY bin/patches/regex_builder.patch /tmp/regex_builder.patch |
| 92 | RUN patch /usr/local/lib/python2.7/dist-packages/os_testr/regex_builder.py /tmp/regex_builder.patch |
| 93 | |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 94 | # Cleanup. |
| 95 | RUN apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 \ |
| 96 | ppp pppconfig pppoeconf popularity-contest cpp gcc g++ libssl-doc |
| 97 | RUN apt-get -y autoremove; apt-get -y clean; |
| 98 | RUN rm -rf /root/.cache |
| 99 | RUN rm -rf /var/lib/apt/lists/* |
| 100 | # |
| 101 | COPY bin/entrypoint.sh /usr/bin/entrypoint.sh |
sandriichenko | 7ec3217 | 2018-03-19 17:21:21 +0200 | [diff] [blame] | 102 | COPY bin/run_tempest.sh /usr/bin/run-tempest |
| 103 | |
| 104 | ENV LOG_DIR='/root/tempest' |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 105 | |
Maksym Shalamov | 98189f5 | 2018-04-24 13:36:26 +0300 | [diff] [blame] | 106 | COPY bin/skiplists /var/lib/tempest/skiplists |
| 107 | |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 108 | WORKDIR /var/lib/tempest/ |
| 109 | ENTRYPOINT ["/usr/bin/entrypoint.sh"] |
| 110 | |
| 111 | # Build |
| 112 | # docker build -t docker-ci-tempest:$(date "+%Y_%m_%d_%H_%M_%S") . |