blob: c7d6e7d4ed800ffe493c66c0ba5ae6f0ce28a8ef [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
azvyagintsevf19ddc82018-02-20 18:39:32 +02004ENV DEBIAN_FRONTEND=noninteractive \
5 DEBCONF_NONINTERACTIVE_SEEN=true \
6 LANG=C.UTF-8 \
Aleksey Zvyagintsevce2cd902018-11-07 10:29:57 +00007 LANGUAGE=$LANG \
Ievgeniia Zadorozhnab3877dd2019-10-22 18:13:35 +03008 LOG_DIR='/root/tempest' \
9 OS_TEST_TIMEOUT=700
Aleksey Zvyagintsevce2cd902018-11-07 10:29:57 +000010SHELL ["/bin/bash", "-o", "pipefail", "-xec"]
azvyagintsevf19ddc82018-02-20 18:39:32 +020011USER root
Aleksey Zvyagintsevce2cd902018-11-07 10:29:57 +000012ADD data /var/lib/
13
14COPY extra/build.sh /
15COPY bin/entrypoint.sh /usr/bin/
16COPY bin/run_tempest.sh /usr/bin/run-tempest
17COPY bin/opencontrail/policy.json /etc/opencontrail/policy.json
18COPY bin/skiplists /var/lib/tempest/skiplists
19
20# Patch junitxml library to include skipped tests in the test report totals header
21COPY bin/patches/junitxml_init.patch /var/lib/junitxml_init.patch
22
23# Patch os_testr library to fix issue ralated with tempest black-list option
24COPY bin/patches/regex_builder.patch /var/lib/regex_builder.patch
25
azvyagintsevf19ddc82018-02-20 18:39:32 +020026RUN 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 \
Aleksey Zvyagintsevce2cd902018-11-07 10:29:57 +000034 && apt-get install -y vim-tiny git-core python-pip libffi-dev libssl-dev python-dev python3-dev iputils-ping patch \
Maksym Shalamova95d7202018-04-19 17:21:19 +030035#Due to upstream bug we should use fixed version of pip
Aleksey Zvyagintsevce2cd902018-11-07 10:29:57 +000036 && pip install -U 'pip==18.0' \
37# Do main stuff
38 && /build.sh buildme \
39# Cleanup
40 && apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 \
41 ppp pppconfig pppoeconf popularity-contest cpp gcc g++ libssl-doc \
42 && apt-get -y autoremove; apt-get -y clean \
43 && rm -rf /root/.cache \
44 && rm -rf /var/lib/apt/lists/*
azvyagintsevf19ddc82018-02-20 18:39:32 +020045
Maksym Shalamovdf54d202018-04-13 16:13:12 +030046
Aleksey Zvyagintsevce2cd902018-11-07 10:29:57 +000047RUN patch /usr/local/lib/python2.7/dist-packages/junitxml/__init__.py /var/lib/junitxml_init.patch
48RUN patch /usr/local/lib/python2.7/dist-packages/os_testr/regex_builder.py /var/lib/regex_builder.patch
azvyagintsevf19ddc82018-02-20 18:39:32 +020049
Maksym Shalamov98189f52018-04-24 13:36:26 +030050
azvyagintsevf19ddc82018-02-20 18:39:32 +020051WORKDIR /var/lib/tempest/
52ENTRYPOINT ["/usr/bin/entrypoint.sh"]
53
Aleksey Zvyagintsevce2cd902018-11-07 10:29:57 +000054# docker build --no-cache -t docker-ci-tempest:$(date "+%Y_%m_%d_%H_%M_%S") .