blob: eca73d02e835ba9470972ec6df23d9d3ff5fef3c [file] [log] [blame]
azvyagintsevf19ddc82018-02-20 18:39:32 +02001FROM ubuntu:16.04
2
3LABEL maintainer="qa@mirantis.com"
4
sandriichenkodb017b12018-06-14 17:48:26 +03005ARG TEMPEST_TAG="mcp/queens"
azvyagintsevf19ddc82018-02-20 18:39:32 +02006# Tempest plugins
sandriichenkodb017b12018-06-14 17:48:26 +03007ARG HORIZON_TAG="mcp/queens"
8ARG BARBICAN_TAG="mcp/queens"
9ARG DESIGNATE_TAG="mcp/queens"
10ARG HEAT_TAG="mcp/queens"
11ARG IRONIC_TAG="mcp/queens"
12ARG MANILA_TAG="mcp/queens"
13ARG TELEMETRY_TAG="mcp/queens"
Ann Kamyshnikovac6460af2018-09-20 14:19:20 +040014ARG OCTAVIA_TAG="mcp/queens"
ibumarskov6112ba72018-10-18 13:49:17 +040015ARG PATROLE_TAG="0.4.x"
16ARG TUNGSTEN_TAG="0.1.x"
azvyagintsevf19ddc82018-02-20 18:39:32 +020017# global openstack requirements repo
sandriichenkodb017b12018-06-14 17:48:26 +030018# This is the commit where tempest version is 18.0.0 in u-c
19ARG UPPER_CONSTRAINTS_TAG="6e64e622e8608ab817dbc809d99e02e4cfdd9f59"
azvyagintsevf19ddc82018-02-20 18:39:32 +020020#
21ENV DEBIAN_FRONTEND=noninteractive \
22 DEBCONF_NONINTERACTIVE_SEEN=true \
23 LANG=C.UTF-8 \
24 LANGUAGE=$LANG
25SHELL ["/bin/bash", "-xec"]
26USER root
27# pre-update
28RUN 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 \
sandriichenko920ac7c2018-10-30 15:04:55 +000036 && apt-get install -y vim-tiny git-core python-pip libffi-dev libssl-dev python-dev python3-dev iputils-ping patch openssh-server
37
38RUN mkdir -p /root/.ssh
39COPY bin/ssh/config /root/.ssh/
40COPY bin/ssh/mcp-jenkins.key /root/.ssh/
41RUN chmod 400 /root/.ssh/mcp-jenkins.key
azvyagintsevf19ddc82018-02-20 18:39:32 +020042
Maksym Shalamova95d7202018-04-19 17:21:19 +030043#Due to upstream bug we should use fixed version of pip
Maksym Shalamovb17f4502018-09-21 17:22:09 +030044RUN pip install -U 'pip==18.0'
azvyagintsevf19ddc82018-02-20 18:39:32 +020045WORKDIR /var/lib/
46# TODO migrate to downstrem mirror?
47RUN git clone https://github.com/openstack/requirements.git openstack_requirements && \
48 pushd openstack_requirements; git checkout $UPPER_CONSTRAINTS_TAG; popd ;
49
sandriichenko920ac7c2018-10-30 15:04:55 +000050RUN 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 Shalamovdf54d202018-04-13 16:13:12 +030051 /var/lib/openstack_requirements/upper-constraints.txt;
52
sandriichenko920ac7c2018-10-30 15:04:55 +000053RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/tempest-horizon tempest-horizon-plugin; \
azvyagintsevf19ddc82018-02-20 18:39:32 +020054 pushd tempest-horizon-plugin ; git checkout $HORIZON_TAG; \
sandriichenko920ac7c2018-10-30 15:04:55 +000055 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt ; \
sandriichenko3b17b482018-03-20 20:29:31 +020056 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020057
sandriichenko920ac7c2018-10-30 15:04:55 +000058RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/barbican-tempest-plugin && \
azvyagintsevf19ddc82018-02-20 18:39:32 +020059 pushd barbican-tempest-plugin; git checkout $BARBICAN_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020060 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
61 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020062
sandriichenko920ac7c2018-10-30 15:04:55 +000063RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/designate-tempest-plugin && \
azvyagintsevf19ddc82018-02-20 18:39:32 +020064 pushd designate-tempest-plugin; git checkout $DESIGNATE_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020065 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
66 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020067
sandriichenko920ac7c2018-10-30 15:04:55 +000068RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/heat-tempest-plugin && \
azvyagintsevf19ddc82018-02-20 18:39:32 +020069 pushd heat-tempest-plugin; git checkout $HEAT_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020070 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
71 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020072
sandriichenko920ac7c2018-10-30 15:04:55 +000073RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/ironic-tempest-plugin && \
azvyagintsevf19ddc82018-02-20 18:39:32 +020074 pushd ironic-tempest-plugin; git checkout $IRONIC_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020075 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
76 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020077
sandriichenko920ac7c2018-10-30 15:04:55 +000078RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/manila-tempest-plugin && \
azvyagintsevf19ddc82018-02-20 18:39:32 +020079 pushd manila-tempest-plugin; git checkout $MANILA_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020080 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
81 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020082
sandriichenko920ac7c2018-10-30 15:04:55 +000083RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/telemetry-tempest-plugin && \
azvyagintsevf19ddc82018-02-20 18:39:32 +020084 pushd telemetry-tempest-plugin; git checkout $TELEMETRY_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020085 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
86 popd;
87
sandriichenko920ac7c2018-10-30 15:04:55 +000088RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/octavia-tempest-plugin && \
Ann Kamyshnikovac6460af2018-09-20 14:19:20 +040089 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
ibumarskov6112ba72018-10-18 13:49:17 +040093RUN 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
98RUN 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
sandriichenko920ac7c2018-10-30 15:04:55 +0000103RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/tempest && \
sandriichenko3b17b482018-03-20 20:29:31 +0200104 pushd tempest; git checkout $TEMPEST_TAG; \
azvyagintsevf19ddc82018-02-20 18:39:32 +0200105 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt ; \
106 pip install . ; popd;
107
sandriichenko7ec32172018-03-19 17:21:21 +0200108RUN pip install junitxml
Maksym Shalamov6f5e8d92018-04-12 18:19:09 +0300109# Patch junitxml library to include skipped tests in the test report totals header
110COPY bin/patches/junitxml_init.patch /tmp/junitxml_init.patch
111RUN patch /usr/local/lib/python2.7/dist-packages/junitxml/__init__.py /tmp/junitxml_init.patch
sandriichenko7ec32172018-03-19 17:21:21 +0200112
azvyagintsevf19ddc82018-02-20 18:39:32 +0200113# Cleanup.
114RUN apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 \
115 ppp pppconfig pppoeconf popularity-contest cpp gcc g++ libssl-doc
116RUN apt-get -y autoremove; apt-get -y clean;
117RUN rm -rf /root/.cache
118RUN rm -rf /var/lib/apt/lists/*
sandriichenko920ac7c2018-10-30 15:04:55 +0000119RUN rm -rf /root/.ssh
120
121RUN echo "BUILD_TIMESTAMP=$(date '+%Y-%m-%d-%H-%M-%S' -u)" > /etc/build_timestamp
122
azvyagintsevf19ddc82018-02-20 18:39:32 +0200123#
124COPY bin/entrypoint.sh /usr/bin/entrypoint.sh
sandriichenko7ec32172018-03-19 17:21:21 +0200125COPY bin/run_tempest.sh /usr/bin/run-tempest
ibumarskov6112ba72018-10-18 13:49:17 +0400126COPY bin/opencontrail/policy.json /etc/opencontrail/policy.json
sandriichenko7ec32172018-03-19 17:21:21 +0200127
128ENV LOG_DIR='/root/tempest'
azvyagintsevf19ddc82018-02-20 18:39:32 +0200129
Maksym Shalamov98189f52018-04-24 13:36:26 +0300130COPY bin/skiplists /var/lib/tempest/skiplists
131
azvyagintsevf19ddc82018-02-20 18:39:32 +0200132WORKDIR /var/lib/tempest/
133ENTRYPOINT ["/usr/bin/entrypoint.sh"]
134
135# Build
Ilya Menkovf285be62018-10-25 16:14:34 +0400136# docker build -t docker-ci-tempest:$(date "+%Y_%m_%d_%H_%M_%S").