blob: 94afd9ebddcdedeeb5ea2ddb324c2c7a7b54a1fa [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"
Anastasia Kuznetsova66df6422018-08-29 18:15:01 +040013ARG OCTAVIA_TAG="mcp/pike"
azvyagintsevf19ddc82018-02-20 18:39:32 +020014# global openstack requirements repo
sandriichenko3b17b482018-03-20 20:29:31 +020015# This is the commit where tempest version is 17.2.0 in u-c
16ARG UPPER_CONSTRAINTS_TAG="83b1de74834fbcdbe749e270c29e76cdc28f85d5"
Oleksii Butenko1fed0f02018-07-27 14:19:14 +030017
azvyagintsevf19ddc82018-02-20 18:39:32 +020018ENV 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 \
sandriichenko3ac92e92018-10-30 15:04:55 +000033 && apt-get install -y vim-tiny git-core python-pip libffi-dev libssl-dev python-dev python3-dev iputils-ping patch openssh-server
34
35RUN mkdir -p /root/.ssh
36COPY bin/ssh/config /root/.ssh/
37COPY bin/ssh/mcp-jenkins.key /root/.ssh/
38RUN chmod 400 /root/.ssh/mcp-jenkins.key
azvyagintsevf19ddc82018-02-20 18:39:32 +020039
Maksym Shalamova95d7202018-04-19 17:21:19 +030040#Due to upstream bug we should use fixed version of pip
sgarbuz5d5631f2018-04-18 13:54:56 +030041RUN pip install -U 'pip==9.0.3'
azvyagintsevf19ddc82018-02-20 18:39:32 +020042WORKDIR /var/lib/
43# TODO migrate to downstrem mirror?
44RUN git clone https://github.com/openstack/requirements.git openstack_requirements && \
45 pushd openstack_requirements; git checkout $UPPER_CONSTRAINTS_TAG; popd ;
46
sandriichenko3ac92e92018-10-30 15:04:55 +000047RUN sed -i -e 's|tempest===17.2.0|git+ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/tempest@mcp/pike#egg=tempest|g' \
Maksym Shalamovdf54d202018-04-13 16:13:12 +030048 /var/lib/openstack_requirements/upper-constraints.txt;
49
sandriichenko3ac92e92018-10-30 15:04:55 +000050RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/tempest-horizon tempest-horizon-plugin; \
azvyagintsevf19ddc82018-02-20 18:39:32 +020051 pushd tempest-horizon-plugin ; git checkout $HORIZON_TAG; \
sandriichenko3ac92e92018-10-30 15:04:55 +000052 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt ; \
sandriichenko3b17b482018-03-20 20:29:31 +020053 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020054
sandriichenko3ac92e92018-10-30 15:04:55 +000055RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/barbican-tempest-plugin && \
azvyagintsevf19ddc82018-02-20 18:39:32 +020056 pushd barbican-tempest-plugin; git checkout $BARBICAN_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
sandriichenko3ac92e92018-10-30 15:04:55 +000060RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/designate-tempest-plugin && \
azvyagintsevf19ddc82018-02-20 18:39:32 +020061 pushd designate-tempest-plugin; git checkout $DESIGNATE_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
sandriichenko3ac92e92018-10-30 15:04:55 +000065RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/heat-tempest-plugin && \
azvyagintsevf19ddc82018-02-20 18:39:32 +020066 pushd heat-tempest-plugin; git checkout $HEAT_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
sandriichenko3ac92e92018-10-30 15:04:55 +000070RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/ironic-tempest-plugin && \
azvyagintsevf19ddc82018-02-20 18:39:32 +020071 pushd ironic-tempest-plugin; git checkout $IRONIC_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
sandriichenko3ac92e92018-10-30 15:04:55 +000075RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/manila-tempest-plugin && \
azvyagintsevf19ddc82018-02-20 18:39:32 +020076 pushd manila-tempest-plugin; git checkout $MANILA_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020077 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
78 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020079
sandriichenko3ac92e92018-10-30 15:04:55 +000080RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/telemetry-tempest-plugin && \
azvyagintsevf19ddc82018-02-20 18:39:32 +020081 pushd telemetry-tempest-plugin; git checkout $TELEMETRY_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020082 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
83 popd;
84
sandriichenko3ac92e92018-10-30 15:04:55 +000085RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/octavia-tempest-plugin && \
Anastasia Kuznetsova66df6422018-08-29 18:15:01 +040086 pushd octavia-tempest-plugin; git checkout $OCTAVIA_TAG; \
87 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
88 popd;
89
sandriichenko3ac92e92018-10-30 15:04:55 +000090RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/tempest && \
sandriichenko3b17b482018-03-20 20:29:31 +020091 pushd tempest; git checkout $TEMPEST_TAG; \
azvyagintsevf19ddc82018-02-20 18:39:32 +020092 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt ; \
93 pip install . ; popd;
94
sandriichenko7ec32172018-03-19 17:21:21 +020095RUN pip install junitxml
Maksym Shalamov6f5e8d92018-04-12 18:19:09 +030096# Patch junitxml library to include skipped tests in the test report totals header
97COPY bin/patches/junitxml_init.patch /tmp/junitxml_init.patch
98RUN patch /usr/local/lib/python2.7/dist-packages/junitxml/__init__.py /tmp/junitxml_init.patch
sandriichenko7ec32172018-03-19 17:21:21 +020099
Maksym Shalamov98189f52018-04-24 13:36:26 +0300100# Patch os_testr library to fix issue ralated with tempest black-list option
101COPY bin/patches/regex_builder.patch /tmp/regex_builder.patch
102RUN patch /usr/local/lib/python2.7/dist-packages/os_testr/regex_builder.py /tmp/regex_builder.patch
103
azvyagintsevf19ddc82018-02-20 18:39:32 +0200104# Cleanup.
105RUN apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 \
106 ppp pppconfig pppoeconf popularity-contest cpp gcc g++ libssl-doc
107RUN apt-get -y autoremove; apt-get -y clean;
108RUN rm -rf /root/.cache
109RUN rm -rf /var/lib/apt/lists/*
sandriichenko3ac92e92018-10-30 15:04:55 +0000110RUN rm -rf /root/.ssh
sandriichenko3a043ca2018-06-15 11:08:36 +0300111
112RUN echo "BUILD_TIMESTAMP=$(date '+%Y-%m-%d-%H-%M-%S' -u)" > /etc/build_timestamp
113
azvyagintsevf19ddc82018-02-20 18:39:32 +0200114#
115COPY bin/entrypoint.sh /usr/bin/entrypoint.sh
sandriichenko7ec32172018-03-19 17:21:21 +0200116COPY bin/run_tempest.sh /usr/bin/run-tempest
117
118ENV LOG_DIR='/root/tempest'
azvyagintsevf19ddc82018-02-20 18:39:32 +0200119
Maksym Shalamov98189f52018-04-24 13:36:26 +0300120COPY bin/skiplists /var/lib/tempest/skiplists
121
azvyagintsevf19ddc82018-02-20 18:39:32 +0200122WORKDIR /var/lib/tempest/
123ENTRYPOINT ["/usr/bin/entrypoint.sh"]
124
125# Build
Maksym Shalamov8d89b892018-09-03 13:50:48 +0300126# docker build -t docker-ci-tempest:$(date "+%Y_%m_%d_%H_%M_%S") .