azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 1 | FROM ubuntu:16.04 |
| 2 | |
| 3 | LABEL maintainer="qa@mirantis.com" |
| 4 | |
sandriichenko | db017b1 | 2018-06-14 17:48:26 +0300 | [diff] [blame] | 5 | ARG TEMPEST_TAG="mcp/queens" |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 6 | # Tempest plugins |
sandriichenko | db017b1 | 2018-06-14 17:48:26 +0300 | [diff] [blame] | 7 | ARG HORIZON_TAG="mcp/queens" |
| 8 | ARG BARBICAN_TAG="mcp/queens" |
| 9 | ARG DESIGNATE_TAG="mcp/queens" |
| 10 | ARG HEAT_TAG="mcp/queens" |
| 11 | ARG IRONIC_TAG="mcp/queens" |
| 12 | ARG MANILA_TAG="mcp/queens" |
| 13 | ARG TELEMETRY_TAG="mcp/queens" |
Ann Kamyshnikova | c6460af | 2018-09-20 14:19:20 +0400 | [diff] [blame] | 14 | ARG OCTAVIA_TAG="mcp/queens" |
ibumarskov | 6112ba7 | 2018-10-18 13:49:17 +0400 | [diff] [blame] | 15 | ARG PATROLE_TAG="0.4.x" |
| 16 | ARG TUNGSTEN_TAG="0.1.x" |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 17 | # global openstack requirements repo |
sandriichenko | db017b1 | 2018-06-14 17:48:26 +0300 | [diff] [blame] | 18 | # This is the commit where tempest version is 18.0.0 in u-c |
| 19 | ARG UPPER_CONSTRAINTS_TAG="6e64e622e8608ab817dbc809d99e02e4cfdd9f59" |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 20 | # |
| 21 | ENV DEBIAN_FRONTEND=noninteractive \ |
| 22 | DEBCONF_NONINTERACTIVE_SEEN=true \ |
| 23 | LANG=C.UTF-8 \ |
| 24 | LANGUAGE=$LANG |
| 25 | SHELL ["/bin/bash", "-xec"] |
| 26 | USER root |
| 27 | # pre-update |
| 28 | RUN cd /etc/apt/ && echo > sources.list \ |
| 29 | && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial main restricted universe multiverse" >> sources.list \ |
| 30 | && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse" >> sources.list \ |
| 31 | && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse" >> sources.list \ |
| 32 | && echo 'Acquire::Languages "none";' > apt.conf.d/docker-no-languages \ |
| 33 | && echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > apt.conf.d/docker-gzip-indexes \ |
| 34 | && echo 'APT::Get::Install-Recommends "false"; APT::Get::Install-Suggests "false";' > apt.conf.d/docker-recommends \ |
| 35 | && apt-get update && apt-get upgrade -y \ |
sandriichenko | 920ac7c | 2018-10-30 15:04:55 +0000 | [diff] [blame] | 36 | && apt-get install -y vim-tiny git-core python-pip libffi-dev libssl-dev python-dev python3-dev iputils-ping patch openssh-server |
| 37 | |
| 38 | RUN mkdir -p /root/.ssh |
| 39 | COPY bin/ssh/config /root/.ssh/ |
| 40 | COPY bin/ssh/mcp-jenkins.key /root/.ssh/ |
| 41 | RUN chmod 400 /root/.ssh/mcp-jenkins.key |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 42 | |
Maksym Shalamov | a95d720 | 2018-04-19 17:21:19 +0300 | [diff] [blame] | 43 | #Due to upstream bug we should use fixed version of pip |
Maksym Shalamov | b17f450 | 2018-09-21 17:22:09 +0300 | [diff] [blame] | 44 | RUN pip install -U 'pip==18.0' |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 45 | WORKDIR /var/lib/ |
| 46 | # TODO migrate to downstrem mirror? |
| 47 | RUN git clone https://github.com/openstack/requirements.git openstack_requirements && \ |
| 48 | pushd openstack_requirements; git checkout $UPPER_CONSTRAINTS_TAG; popd ; |
| 49 | |
sandriichenko | 920ac7c | 2018-10-30 15:04:55 +0000 | [diff] [blame] | 50 | RUN sed -i -e 's|tempest===18.0.0|git+ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/tempest@mcp/queens#egg=tempest|g' \ |
Maksym Shalamov | df54d20 | 2018-04-13 16:13:12 +0300 | [diff] [blame] | 51 | /var/lib/openstack_requirements/upper-constraints.txt; |
| 52 | |
sandriichenko | 920ac7c | 2018-10-30 15:04:55 +0000 | [diff] [blame] | 53 | RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/tempest-horizon tempest-horizon-plugin; \ |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 54 | pushd tempest-horizon-plugin ; git checkout $HORIZON_TAG; \ |
sandriichenko | 920ac7c | 2018-10-30 15:04:55 +0000 | [diff] [blame] | 55 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt ; \ |
sandriichenko | 3b17b48 | 2018-03-20 20:29:31 +0200 | [diff] [blame] | 56 | popd; |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 57 | |
sandriichenko | 920ac7c | 2018-10-30 15:04:55 +0000 | [diff] [blame] | 58 | RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/barbican-tempest-plugin && \ |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 59 | pushd barbican-tempest-plugin; git checkout $BARBICAN_TAG; \ |
sandriichenko | 3b17b48 | 2018-03-20 20:29:31 +0200 | [diff] [blame] | 60 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \ |
| 61 | popd; |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 62 | |
sandriichenko | 920ac7c | 2018-10-30 15:04:55 +0000 | [diff] [blame] | 63 | RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/designate-tempest-plugin && \ |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 64 | pushd designate-tempest-plugin; git checkout $DESIGNATE_TAG; \ |
sandriichenko | 3b17b48 | 2018-03-20 20:29:31 +0200 | [diff] [blame] | 65 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \ |
| 66 | popd; |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 67 | |
sandriichenko | 920ac7c | 2018-10-30 15:04:55 +0000 | [diff] [blame] | 68 | RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/heat-tempest-plugin && \ |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 69 | pushd heat-tempest-plugin; git checkout $HEAT_TAG; \ |
sandriichenko | 3b17b48 | 2018-03-20 20:29:31 +0200 | [diff] [blame] | 70 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \ |
| 71 | popd; |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 72 | |
sandriichenko | 920ac7c | 2018-10-30 15:04:55 +0000 | [diff] [blame] | 73 | RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/ironic-tempest-plugin && \ |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 74 | pushd ironic-tempest-plugin; git checkout $IRONIC_TAG; \ |
sandriichenko | 3b17b48 | 2018-03-20 20:29:31 +0200 | [diff] [blame] | 75 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \ |
| 76 | popd; |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 77 | |
sandriichenko | 920ac7c | 2018-10-30 15:04:55 +0000 | [diff] [blame] | 78 | RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/manila-tempest-plugin && \ |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 79 | pushd manila-tempest-plugin; git checkout $MANILA_TAG; \ |
sandriichenko | 3b17b48 | 2018-03-20 20:29:31 +0200 | [diff] [blame] | 80 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \ |
| 81 | popd; |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 82 | |
sandriichenko | 920ac7c | 2018-10-30 15:04:55 +0000 | [diff] [blame] | 83 | RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/telemetry-tempest-plugin && \ |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 84 | pushd telemetry-tempest-plugin; git checkout $TELEMETRY_TAG; \ |
sandriichenko | 3b17b48 | 2018-03-20 20:29:31 +0200 | [diff] [blame] | 85 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \ |
| 86 | popd; |
| 87 | |
sandriichenko | 920ac7c | 2018-10-30 15:04:55 +0000 | [diff] [blame] | 88 | RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/octavia-tempest-plugin && \ |
Ann Kamyshnikova | c6460af | 2018-09-20 14:19:20 +0400 | [diff] [blame] | 89 | pushd octavia-tempest-plugin; git checkout $OCTAVIA_TAG; \ |
| 90 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \ |
| 91 | popd; |
| 92 | |
ibumarskov | 6112ba7 | 2018-10-18 13:49:17 +0400 | [diff] [blame] | 93 | RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/patrole patrole-tempest-plugin ; \ |
| 94 | pushd /var/lib/patrole-tempest-plugin; git checkout $PATROLE_TAG; \ |
| 95 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \ |
| 96 | popd; |
| 97 | |
| 98 | RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/contrail/tungsten-tempest tungsten-tempest-plugin ; \ |
| 99 | pushd /var/lib/tungsten-tempest-plugin; git checkout $TUNGSTEN_TAG; \ |
| 100 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \ |
| 101 | popd; |
| 102 | |
sandriichenko | 920ac7c | 2018-10-30 15:04:55 +0000 | [diff] [blame] | 103 | RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/tempest && \ |
sandriichenko | 3b17b48 | 2018-03-20 20:29:31 +0200 | [diff] [blame] | 104 | pushd tempest; git checkout $TEMPEST_TAG; \ |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 105 | pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt ; \ |
| 106 | pip install . ; popd; |
| 107 | |
sandriichenko | 7ec3217 | 2018-03-19 17:21:21 +0200 | [diff] [blame] | 108 | RUN pip install junitxml |
Maksym Shalamov | 6f5e8d9 | 2018-04-12 18:19:09 +0300 | [diff] [blame] | 109 | # Patch junitxml library to include skipped tests in the test report totals header |
| 110 | COPY bin/patches/junitxml_init.patch /tmp/junitxml_init.patch |
| 111 | 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] | 112 | |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 113 | # Cleanup. |
| 114 | RUN apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 \ |
| 115 | ppp pppconfig pppoeconf popularity-contest cpp gcc g++ libssl-doc |
| 116 | RUN apt-get -y autoremove; apt-get -y clean; |
| 117 | RUN rm -rf /root/.cache |
| 118 | RUN rm -rf /var/lib/apt/lists/* |
sandriichenko | 920ac7c | 2018-10-30 15:04:55 +0000 | [diff] [blame] | 119 | RUN rm -rf /root/.ssh |
| 120 | |
| 121 | RUN echo "BUILD_TIMESTAMP=$(date '+%Y-%m-%d-%H-%M-%S' -u)" > /etc/build_timestamp |
| 122 | |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 123 | # |
| 124 | COPY bin/entrypoint.sh /usr/bin/entrypoint.sh |
sandriichenko | 7ec3217 | 2018-03-19 17:21:21 +0200 | [diff] [blame] | 125 | COPY bin/run_tempest.sh /usr/bin/run-tempest |
ibumarskov | 6112ba7 | 2018-10-18 13:49:17 +0400 | [diff] [blame] | 126 | COPY bin/opencontrail/policy.json /etc/opencontrail/policy.json |
sandriichenko | 7ec3217 | 2018-03-19 17:21:21 +0200 | [diff] [blame] | 127 | |
| 128 | ENV LOG_DIR='/root/tempest' |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 129 | |
Maksym Shalamov | 98189f5 | 2018-04-24 13:36:26 +0300 | [diff] [blame] | 130 | COPY bin/skiplists /var/lib/tempest/skiplists |
| 131 | |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 132 | WORKDIR /var/lib/tempest/ |
| 133 | ENTRYPOINT ["/usr/bin/entrypoint.sh"] |
| 134 | |
| 135 | # Build |
Ilya Menkov | f285be6 | 2018-10-25 16:14:34 +0400 | [diff] [blame^] | 136 | # docker build -t docker-ci-tempest:$(date "+%Y_%m_%d_%H_%M_%S"). |