blob: fded5b7fd774c90360df880e0a3b405cf9f116e6 [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"
azvyagintsevf19ddc82018-02-20 18:39:32 +020015# global openstack requirements repo
sandriichenkodb017b12018-06-14 17:48:26 +030016# This is the commit where tempest version is 18.0.0 in u-c
17ARG UPPER_CONSTRAINTS_TAG="6e64e622e8608ab817dbc809d99e02e4cfdd9f59"
azvyagintsevf19ddc82018-02-20 18:39:32 +020018#
19ENV DEBIAN_FRONTEND=noninteractive \
20 DEBCONF_NONINTERACTIVE_SEEN=true \
21 LANG=C.UTF-8 \
22 LANGUAGE=$LANG
23SHELL ["/bin/bash", "-xec"]
24USER root
25# pre-update
26RUN cd /etc/apt/ && echo > sources.list \
27 && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial main restricted universe multiverse" >> sources.list \
28 && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse" >> sources.list \
29 && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse" >> sources.list \
30 && echo 'Acquire::Languages "none";' > apt.conf.d/docker-no-languages \
31 && echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > apt.conf.d/docker-gzip-indexes \
32 && echo 'APT::Get::Install-Recommends "false"; APT::Get::Install-Suggests "false";' > apt.conf.d/docker-recommends \
33 && apt-get update && apt-get upgrade -y \
sandriichenko920ac7c2018-10-30 15:04:55 +000034 && apt-get install -y vim-tiny git-core python-pip libffi-dev libssl-dev python-dev python3-dev iputils-ping patch openssh-server
35
36RUN mkdir -p /root/.ssh
37COPY bin/ssh/config /root/.ssh/
38COPY bin/ssh/mcp-jenkins.key /root/.ssh/
39RUN chmod 400 /root/.ssh/mcp-jenkins.key
azvyagintsevf19ddc82018-02-20 18:39:32 +020040
Maksym Shalamova95d7202018-04-19 17:21:19 +030041#Due to upstream bug we should use fixed version of pip
sgarbuz5d5631f2018-04-18 13:54:56 +030042RUN pip install -U 'pip==9.0.3'
azvyagintsevf19ddc82018-02-20 18:39:32 +020043WORKDIR /var/lib/
44# TODO migrate to downstrem mirror?
45RUN git clone https://github.com/openstack/requirements.git openstack_requirements && \
46 pushd openstack_requirements; git checkout $UPPER_CONSTRAINTS_TAG; popd ;
47
sandriichenko920ac7c2018-10-30 15:04:55 +000048RUN 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 +030049 /var/lib/openstack_requirements/upper-constraints.txt;
50
sandriichenko920ac7c2018-10-30 15:04:55 +000051RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/tempest-horizon tempest-horizon-plugin; \
azvyagintsevf19ddc82018-02-20 18:39:32 +020052 pushd tempest-horizon-plugin ; git checkout $HORIZON_TAG; \
sandriichenko920ac7c2018-10-30 15:04:55 +000053 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt ; \
sandriichenko3b17b482018-03-20 20:29:31 +020054 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020055
sandriichenko920ac7c2018-10-30 15:04:55 +000056RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/barbican-tempest-plugin && \
azvyagintsevf19ddc82018-02-20 18:39:32 +020057 pushd barbican-tempest-plugin; git checkout $BARBICAN_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020058 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
59 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020060
sandriichenko920ac7c2018-10-30 15:04:55 +000061RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/designate-tempest-plugin && \
azvyagintsevf19ddc82018-02-20 18:39:32 +020062 pushd designate-tempest-plugin; git checkout $DESIGNATE_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020063 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
64 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020065
sandriichenko920ac7c2018-10-30 15:04:55 +000066RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/heat-tempest-plugin && \
azvyagintsevf19ddc82018-02-20 18:39:32 +020067 pushd heat-tempest-plugin; git checkout $HEAT_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020068 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
69 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020070
sandriichenko920ac7c2018-10-30 15:04:55 +000071RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/ironic-tempest-plugin && \
azvyagintsevf19ddc82018-02-20 18:39:32 +020072 pushd ironic-tempest-plugin; git checkout $IRONIC_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020073 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
74 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020075
sandriichenko920ac7c2018-10-30 15:04:55 +000076RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/manila-tempest-plugin && \
azvyagintsevf19ddc82018-02-20 18:39:32 +020077 pushd manila-tempest-plugin; git checkout $MANILA_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020078 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
79 popd;
azvyagintsevf19ddc82018-02-20 18:39:32 +020080
sandriichenko920ac7c2018-10-30 15:04:55 +000081RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/telemetry-tempest-plugin && \
azvyagintsevf19ddc82018-02-20 18:39:32 +020082 pushd telemetry-tempest-plugin; git checkout $TELEMETRY_TAG; \
sandriichenko3b17b482018-03-20 20:29:31 +020083 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
84 popd;
85
sandriichenko920ac7c2018-10-30 15:04:55 +000086RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/octavia-tempest-plugin && \
Ann Kamyshnikovac6460af2018-09-20 14:19:20 +040087 pushd octavia-tempest-plugin; git checkout $OCTAVIA_TAG; \
88 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt . ; \
89 popd;
90
sandriichenko920ac7c2018-10-30 15:04:55 +000091RUN git clone ssh://mcp-jenkins@gerrit.mcp.mirantis.com:29418/packaging/sources/tempest && \
sandriichenko3b17b482018-03-20 20:29:31 +020092 pushd tempest; git checkout $TEMPEST_TAG; \
azvyagintsevf19ddc82018-02-20 18:39:32 +020093 pip install --constraint /var/lib/openstack_requirements/upper-constraints.txt -r requirements.txt ; \
94 pip install . ; popd;
95
sandriichenko7ec32172018-03-19 17:21:21 +020096RUN pip install junitxml
Maksym Shalamov6f5e8d92018-04-12 18:19:09 +030097# Patch junitxml library to include skipped tests in the test report totals header
98COPY bin/patches/junitxml_init.patch /tmp/junitxml_init.patch
99RUN patch /usr/local/lib/python2.7/dist-packages/junitxml/__init__.py /tmp/junitxml_init.patch
sandriichenko7ec32172018-03-19 17:21:21 +0200100
azvyagintsevf19ddc82018-02-20 18:39:32 +0200101# Cleanup.
102RUN apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 \
103 ppp pppconfig pppoeconf popularity-contest cpp gcc g++ libssl-doc
104RUN apt-get -y autoremove; apt-get -y clean;
105RUN rm -rf /root/.cache
106RUN rm -rf /var/lib/apt/lists/*
sandriichenko920ac7c2018-10-30 15:04:55 +0000107RUN rm -rf /root/.ssh
108
109RUN echo "BUILD_TIMESTAMP=$(date '+%Y-%m-%d-%H-%M-%S' -u)" > /etc/build_timestamp
110
azvyagintsevf19ddc82018-02-20 18:39:32 +0200111#
112COPY bin/entrypoint.sh /usr/bin/entrypoint.sh
sandriichenko7ec32172018-03-19 17:21:21 +0200113COPY bin/run_tempest.sh /usr/bin/run-tempest
114
115ENV LOG_DIR='/root/tempest'
azvyagintsevf19ddc82018-02-20 18:39:32 +0200116
Maksym Shalamov98189f52018-04-24 13:36:26 +0300117COPY bin/skiplists /var/lib/tempest/skiplists
118
azvyagintsevf19ddc82018-02-20 18:39:32 +0200119WORKDIR /var/lib/tempest/
120ENTRYPOINT ["/usr/bin/entrypoint.sh"]
121
122# Build
123# docker build -t docker-ci-tempest:$(date "+%Y_%m_%d_%H_%M_%S") .