blob: 98bc9907568ec4629647a3eedc04e1004b8d7c0d [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"
azvyagintsevf19ddc82018-02-20 18:39:32 +020014# global openstack requirements repo
sandriichenkodb017b12018-06-14 17:48:26 +030015# This is the commit where tempest version is 18.0.0 in u-c
16ARG UPPER_CONSTRAINTS_TAG="6e64e622e8608ab817dbc809d99e02e4cfdd9f59"
azvyagintsevf19ddc82018-02-20 18:39:32 +020017#
18ENV DEBIAN_FRONTEND=noninteractive \
19 DEBCONF_NONINTERACTIVE_SEEN=true \
20 LANG=C.UTF-8 \
21 LANGUAGE=$LANG
22SHELL ["/bin/bash", "-xec"]
23USER root
24# pre-update
25RUN 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 Shalamov6f5e8d92018-04-12 18:19:09 +030033 && apt-get install -y vim-tiny git-core python-pip libffi-dev libssl-dev python-dev python3-dev iputils-ping patch
azvyagintsevf19ddc82018-02-20 18:39:32 +020034
Maksym Shalamova95d7202018-04-19 17:21:19 +030035#Due to upstream bug we should use fixed version of pip
sgarbuz5d5631f2018-04-18 13:54:56 +030036RUN pip install -U 'pip==9.0.3'
azvyagintsevf19ddc82018-02-20 18:39:32 +020037WORKDIR /var/lib/
38# TODO migrate to downstrem mirror?
39RUN git clone https://github.com/openstack/requirements.git openstack_requirements && \
40 pushd openstack_requirements; git checkout $UPPER_CONSTRAINTS_TAG; popd ;
41
sandriichenkodb017b12018-06-14 17:48:26 +030042RUN sed -i -e 's|tempest===18.0.0|git+https://gerrit.mcp.mirantis.net/packaging/sources/tempest@mcp/queens#egg=tempest|g' \
Maksym Shalamovdf54d202018-04-13 16:13:12 +030043 /var/lib/openstack_requirements/upper-constraints.txt;
44
azvyagintsevf19ddc82018-02-20 18:39:32 +020045RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/tempest-horizon tempest-horizon-plugin ; \
46 pushd tempest-horizon-plugin ; git checkout $HORIZON_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020047 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
48 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020049
50RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/barbican-tempest-plugin && \
51 pushd barbican-tempest-plugin; git checkout $BARBICAN_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020052 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
53 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020054
55RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/designate-tempest-plugin && \
56 pushd designate-tempest-plugin; git checkout $DESIGNATE_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020057 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
58 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020059
60RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/heat-tempest-plugin && \
61 pushd heat-tempest-plugin; git checkout $HEAT_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020062 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
63 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020064
65RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/ironic-tempest-plugin && \
66 pushd ironic-tempest-plugin; git checkout $IRONIC_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020067 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
68 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020069
70RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/manila-tempest-plugin && \
71 pushd manila-tempest-plugin; git checkout $MANILA_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020072 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
73 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020074
75RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/telemetry-tempest-plugin && \
76 pushd telemetry-tempest-plugin; git checkout $TELEMETRY_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020077 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
78 popd;
79
80RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/tempest && \
81 pushd tempest; git checkout $TEMPEST_TAG; \
azvyagintsevf19ddc82018-02-20 18:39:32 +020082 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt ; \
83 pip install . ; popd;
84
sandriichenko7ec32172018-03-19 17:21:21 +020085RUN pip install junitxml
Maksym Shalamov6f5e8d92018-04-12 18:19:09 +030086# Patch junitxml library to include skipped tests in the test report totals header
87COPY bin/patches/junitxml_init.patch /tmp/junitxml_init.patch
88RUN patch /usr/local/lib/python2.7/dist-packages/junitxml/__init__.py /tmp/junitxml_init.patch
sandriichenko7ec32172018-03-19 17:21:21 +020089
Maksym Shalamov98189f52018-04-24 13:36:26 +030090# Patch os_testr library to fix issue ralated with tempest black-list option
91COPY bin/patches/regex_builder.patch /tmp/regex_builder.patch
sandriichenkodb017b12018-06-14 17:48:26 +030092#TODO: investigate how to add skiplist without os-testr
93#RUN patch /usr/local/lib/python2.7/dist-packages/os_testr/regex_builder.py /tmp/regex_builder.patch
Maksym Shalamov98189f52018-04-24 13:36:26 +030094
azvyagintsevf19ddc82018-02-20 18:39:32 +020095# Cleanup.
96RUN apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 \
97 ppp pppconfig pppoeconf popularity-contest cpp gcc g++ libssl-doc
98RUN apt-get -y autoremove; apt-get -y clean;
99RUN rm -rf /root/.cache
100RUN rm -rf /var/lib/apt/lists/*
101#
102COPY bin/entrypoint.sh /usr/bin/entrypoint.sh
sandriichenko7ec32172018-03-19 17:21:21 +0200103COPY bin/run_tempest.sh /usr/bin/run-tempest
104
105ENV LOG_DIR='/root/tempest'
azvyagintsevf19ddc82018-02-20 18:39:32 +0200106
Maksym Shalamov98189f52018-04-24 13:36:26 +0300107COPY bin/skiplists /var/lib/tempest/skiplists
108
azvyagintsevf19ddc82018-02-20 18:39:32 +0200109WORKDIR /var/lib/tempest/
110ENTRYPOINT ["/usr/bin/entrypoint.sh"]
111
112# Build
113# docker build -t docker-ci-tempest:$(date "+%Y_%m_%d_%H_%M_%S") .