blob: 7850555129aa3250b5fdd06dc06b06b16646e54a [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 Zvyagintsevb2199a42018-11-07 10:29:57 +00007 LANGUAGE=$LANG \
8 LOG_DIR='/root/tempest'
9SHELL ["/bin/bash", "-o", "pipefail", "-xec"]
azvyagintsevf19ddc82018-02-20 18:39:32 +020010USER root
Aleksey Zvyagintsevb2199a42018-11-07 10:29:57 +000011ADD data /var/lib/
12
13COPY extra/build.sh /
14COPY bin/entrypoint.sh /usr/bin/
15COPY bin/run_tempest.sh /usr/bin/run-tempest
16COPY bin/opencontrail/policy.json /etc/opencontrail/policy.json
17COPY bin/skiplists /var/lib/tempest/skiplists
18
19# Patch junitxml library to include skipped tests in the test report totals header
20COPY bin/patches/junitxml_init.patch /var/lib/junitxml_init.patch
21
22# Patch os_testr library to fix issue ralated with tempest black-list option
23COPY bin/patches/regex_builder.patch /var/lib/regex_builder.patch
24
azvyagintsevf19ddc82018-02-20 18:39:32 +020025RUN 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 \
Aleksey Zvyagintsevb2199a42018-11-07 10:29:57 +000033 && 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 +030034#Due to upstream bug we should use fixed version of pip
Aleksey Zvyagintsevb2199a42018-11-07 10:29:57 +000035 && pip install -U 'pip==18.0' \
36# Do main stuff
37 && /build.sh buildme \
38# Cleanup
39 && apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 \
40 ppp pppconfig pppoeconf popularity-contest cpp gcc g++ libssl-doc \
41 && apt-get -y autoremove; apt-get -y clean \
42 && rm -rf /root/.cache \
43 && rm -rf /var/lib/apt/lists/*
azvyagintsevf19ddc82018-02-20 18:39:32 +020044
Maksym Shalamovdf54d202018-04-13 16:13:12 +030045
Aleksey Zvyagintsevb2199a42018-11-07 10:29:57 +000046RUN patch /usr/local/lib/python2.7/dist-packages/junitxml/__init__.py /var/lib/junitxml_init.patch
47RUN patch /usr/local/lib/python2.7/dist-packages/os_testr/regex_builder.py /var/lib/regex_builder.patch
Maksym Shalamov98189f52018-04-24 13:36:26 +030048
azvyagintsevf19ddc82018-02-20 18:39:32 +020049WORKDIR /var/lib/tempest/
50ENTRYPOINT ["/usr/bin/entrypoint.sh"]
51
Aleksey Zvyagintsevb2199a42018-11-07 10:29:57 +000052# docker build --no-cache -t docker-ci-tempest:$(date "+%Y_%m_%d_%H_%M_%S") .