blob: ae31932d28438effbad0017ca268ce306efec275 [file] [log] [blame]
azvyagintsevf19ddc82018-02-20 18:39:32 +02001FROM ubuntu:16.04
2
3LABEL maintainer="qa@mirantis.com"
Oleksii Molchanova936e5a2021-11-22 21:54:13 +02004LABEL build_date="2021-11-22"
azvyagintsevf19ddc82018-02-20 18:39:32 +02005
azvyagintsevf19ddc82018-02-20 18:39:32 +02006ENV DEBIAN_FRONTEND=noninteractive \
7 DEBCONF_NONINTERACTIVE_SEEN=true \
8 LANG=C.UTF-8 \
Aleksey Zvyagintsevc3d46bc2018-11-07 10:29:57 +00009 LANGUAGE=$LANG \
10 LOG_DIR='/root/tempest'
azvyagintsevcafdd672018-11-12 15:32:16 +020011SHELL ["/bin/bash", "-o", "pipefail", "-xec"]
azvyagintsevf19ddc82018-02-20 18:39:32 +020012USER root
Aleksey Zvyagintsevc3d46bc2018-11-07 10:29:57 +000013ADD data /var/lib/
14
15COPY extra/build.sh /
16COPY bin/entrypoint.sh /usr/bin/
17COPY bin/run_tempest.sh /usr/bin/run-tempest
18COPY bin/opencontrail/policy.json /etc/opencontrail/policy.json
19COPY bin/skiplists /var/lib/tempest/skiplists
20
azvyagintsevf19ddc82018-02-20 18:39:32 +020021RUN cd /etc/apt/ && echo > sources.list \
22 && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial main restricted universe multiverse" >> sources.list \
23 && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse" >> sources.list \
24 && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse" >> sources.list \
25 && echo 'Acquire::Languages "none";' > apt.conf.d/docker-no-languages \
26 && echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > apt.conf.d/docker-gzip-indexes \
27 && echo 'APT::Get::Install-Recommends "false"; APT::Get::Install-Suggests "false";' > apt.conf.d/docker-recommends \
28 && apt-get update && apt-get upgrade -y \
Sergey Galkin8163b472020-01-23 00:41:53 +040029 && apt-get install -y vim-tiny git-core python-pip libffi-dev libssl-dev python-dev python3-dev iputils-ping patch wget \
Maksym Shalamova95d7202018-04-19 17:21:19 +030030#Due to upstream bug we should use fixed version of pip
Oleksii Molchanov92e1df02021-06-30 12:34:22 +030031 && pip install -U 'setuptools==44.1.1' 'pip==19.2' \
Aleksey Zvyagintsevc3d46bc2018-11-07 10:29:57 +000032# Do main stuff
33 && /build.sh buildme \
34# Cleanup
35 && apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 \
36 ppp pppconfig pppoeconf popularity-contest cpp gcc g++ libssl-doc \
37 && apt-get -y autoremove; apt-get -y clean \
Sergey Galkin8163b472020-01-23 00:41:53 +040038 # Download files for telemetry_tempest_plugin.scenario.test_telemetry_integration.TestTelemetryIntegration test
39 && cd /tmp \
40 && wget https://github.com/codybum/OpenStackInAction/raw/master/scripts/icehouse/opt/devstack/files/images/cirros-0.3.1-x86_64-uec/cirros-0.3.1-x86_64-blank.img \
41 && wget https://github.com/codybum/OpenStackInAction/raw/master/scripts/icehouse/opt/devstack/files/images/cirros-0.3.1-x86_64-uec/cirros-0.3.1-x86_64-initrd \
42 && wget https://github.com/codybum/OpenStackInAction/raw/master/scripts/icehouse/opt/devstack/files/images/cirros-0.3.1-x86_64-uec/cirros-0.3.1-x86_64-vmlinuz \
Aleksey Zvyagintsevc3d46bc2018-11-07 10:29:57 +000043 && rm -rf /root/.cache \
44 && rm -rf /var/lib/apt/lists/*
azvyagintsevf19ddc82018-02-20 18:39:32 +020045
Maksym Shalamov6f5e8d92018-04-12 18:19:09 +030046# Patch junitxml library to include skipped tests in the test report totals header
47COPY bin/patches/junitxml_init.patch /tmp/junitxml_init.patch
48RUN patch /usr/local/lib/python2.7/dist-packages/junitxml/__init__.py /tmp/junitxml_init.patch
sandriichenko7ec32172018-03-19 17:21:21 +020049
azvyagintsevf19ddc82018-02-20 18:39:32 +020050WORKDIR /var/lib/tempest/
51ENTRYPOINT ["/usr/bin/entrypoint.sh"]
52
53# Build
Aleksey Zvyagintsevc3d46bc2018-11-07 10:29:57 +000054# docker build --no-cache -t docker-ci-tempest:$(date "+%Y_%m_%d_%H_%M_%S") .