blob: b3095e097247639a330c5f6abdb9193411930000 [file] [log] [blame]
azvyagintsevf19ddc82018-02-20 18:39:32 +02001FROM ubuntu:16.04
azvyagintsevf19ddc82018-02-20 18:39:32 +02002LABEL maintainer="qa@mirantis.com"
3
4ARG TEMPEST_TAG="mcp/pike"
5# Tempest plugins
6ARG HORIZON_TAG="mcp/pike"
Ilya Menkovbf725142018-03-05 20:18:01 +04007ARG BARBICAN_TAG="mcp/pike"
azvyagintsevf19ddc82018-02-20 18:39:32 +02008ARG DESIGNATE_TAG="mcp/pike"
9ARG HEAT_TAG="mcp/pike"
Ilya Menkovbf725142018-03-05 20:18:01 +040010ARG IRONIC_TAG="mcp/pike"
11ARG MANILA_TAG="mcp/pike"
12ARG TELEMETRY_TAG="mcp/pike"
azvyagintsevf19ddc82018-02-20 18:39:32 +020013# global openstack requirements repo
sandriichenko3b17b482018-03-20 20:29:31 +020014# This is the commit where tempest version is 17.2.0 in u-c
15ARG UPPER_CONSTRAINTS_TAG="83b1de74834fbcdbe749e270c29e76cdc28f85d5"
Oleksii Butenko1fed0f02018-07-27 14:19:14 +030016
azvyagintsevf19ddc82018-02-20 18:39:32 +020017ENV DEBIAN_FRONTEND=noninteractive \
18 DEBCONF_NONINTERACTIVE_SEEN=true \
19 LANG=C.UTF-8 \
20 LANGUAGE=$LANG
21SHELL ["/bin/bash", "-xec"]
22USER root
23# pre-update
24RUN cd /etc/apt/ && echo > sources.list \
25 && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial main restricted universe multiverse" >> sources.list \
26 && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse" >> sources.list \
27 && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse" >> sources.list \
28 && echo 'Acquire::Languages "none";' > apt.conf.d/docker-no-languages \
29 && echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > apt.conf.d/docker-gzip-indexes \
30 && echo 'APT::Get::Install-Recommends "false"; APT::Get::Install-Suggests "false";' > apt.conf.d/docker-recommends \
31 && apt-get update && apt-get upgrade -y \
Maksym Shalamov6f5e8d92018-04-12 18:19:09 +030032 && 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 +020033
Maksym Shalamova95d7202018-04-19 17:21:19 +030034#Due to upstream bug we should use fixed version of pip
sgarbuz5d5631f2018-04-18 13:54:56 +030035RUN pip install -U 'pip==9.0.3'
azvyagintsevf19ddc82018-02-20 18:39:32 +020036WORKDIR /var/lib/
37# TODO migrate to downstrem mirror?
38RUN git clone https://github.com/openstack/requirements.git openstack_requirements && \
39 pushd openstack_requirements; git checkout $UPPER_CONSTRAINTS_TAG; popd ;
40
Maksym Shalamovdf54d202018-04-13 16:13:12 +030041RUN sed -i -e 's|tempest===17.2.0|git+https://gerrit.mcp.mirantis.net/packaging/sources/tempest@mcp/pike#egg=tempest|g' \
42 /var/lib/openstack_requirements/upper-constraints.txt;
43
azvyagintsevf19ddc82018-02-20 18:39:32 +020044RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/tempest-horizon tempest-horizon-plugin ; \
45 pushd tempest-horizon-plugin ; git checkout $HORIZON_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020046 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
47 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020048
49RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/barbican-tempest-plugin && \
50 pushd barbican-tempest-plugin; git checkout $BARBICAN_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020051 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
52 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020053
54RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/designate-tempest-plugin && \
55 pushd designate-tempest-plugin; git checkout $DESIGNATE_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020056 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
57 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020058
59RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/heat-tempest-plugin && \
60 pushd heat-tempest-plugin; git checkout $HEAT_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020061 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
62 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020063
64RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/ironic-tempest-plugin && \
65 pushd ironic-tempest-plugin; git checkout $IRONIC_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020066 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
67 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020068
69RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/manila-tempest-plugin && \
70 pushd manila-tempest-plugin; git checkout $MANILA_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020071 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
72 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020073
74RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/telemetry-tempest-plugin && \
75 pushd telemetry-tempest-plugin; git checkout $TELEMETRY_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020076 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
77 popd;
78
79RUN git clone https://gerrit.mcp.mirantis.net/packaging/sources/tempest && \
80 pushd tempest; git checkout $TEMPEST_TAG; \
azvyagintsevf19ddc82018-02-20 18:39:32 +020081 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt ; \
82 pip install . ; popd;
83
sandriichenko7ec32172018-03-19 17:21:21 +020084RUN pip install junitxml
Maksym Shalamov6f5e8d92018-04-12 18:19:09 +030085# Patch junitxml library to include skipped tests in the test report totals header
86COPY bin/patches/junitxml_init.patch /tmp/junitxml_init.patch
87RUN patch /usr/local/lib/python2.7/dist-packages/junitxml/__init__.py /tmp/junitxml_init.patch
sandriichenko7ec32172018-03-19 17:21:21 +020088
Maksym Shalamov98189f52018-04-24 13:36:26 +030089# Patch os_testr library to fix issue ralated with tempest black-list option
90COPY bin/patches/regex_builder.patch /tmp/regex_builder.patch
91RUN patch /usr/local/lib/python2.7/dist-packages/os_testr/regex_builder.py /tmp/regex_builder.patch
92
azvyagintsevf19ddc82018-02-20 18:39:32 +020093# Cleanup.
94RUN apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 \
95 ppp pppconfig pppoeconf popularity-contest cpp gcc g++ libssl-doc
96RUN apt-get -y autoremove; apt-get -y clean;
97RUN rm -rf /root/.cache
98RUN rm -rf /var/lib/apt/lists/*
sandriichenko3a043ca2018-06-15 11:08:36 +030099
100RUN echo "BUILD_TIMESTAMP=$(date '+%Y-%m-%d-%H-%M-%S' -u)" > /etc/build_timestamp
101
azvyagintsevf19ddc82018-02-20 18:39:32 +0200102#
103COPY bin/entrypoint.sh /usr/bin/entrypoint.sh
sandriichenko7ec32172018-03-19 17:21:21 +0200104COPY bin/run_tempest.sh /usr/bin/run-tempest
105
106ENV LOG_DIR='/root/tempest'
azvyagintsevf19ddc82018-02-20 18:39:32 +0200107
Maksym Shalamov98189f52018-04-24 13:36:26 +0300108COPY bin/skiplists /var/lib/tempest/skiplists
109
azvyagintsevf19ddc82018-02-20 18:39:32 +0200110WORKDIR /var/lib/tempest/
111ENTRYPOINT ["/usr/bin/entrypoint.sh"]
112
113# Build
Maksym Shalamov09ec5a92018-08-10 10:26:57 +0300114# docker build -t docker-ci-tempest:$(date "+%Y_%m_%d_%H_%M_%S").