blob: 37db53eea3eb8d7aba6ab2e6662d7cbbbb4566e6 [file] [log] [blame]
FROM ubuntu:16.04
LABEL maintainer="qa@mirantis.com"
LABEL build_date="2021-07-09"
ENV DEBIAN_FRONTEND=noninteractive \
DEBCONF_NONINTERACTIVE_SEEN=true \
LANG=C.UTF-8 \
LANGUAGE=$LANG \
LOG_DIR='/root/tempest'
SHELL ["/bin/bash", "-o", "pipefail", "-xec"]
USER root
ADD data /var/lib/
COPY extra/build.sh /
COPY bin/entrypoint.sh /usr/bin/
COPY bin/run_tempest.sh /usr/bin/run-tempest
COPY bin/opencontrail/policy.json /etc/opencontrail/policy.json
COPY bin/skiplists /var/lib/tempest/skiplists
RUN cd /etc/apt/ && echo > sources.list \
&& echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial main restricted universe multiverse" >> sources.list \
&& echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse" >> sources.list \
&& echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse" >> sources.list \
&& echo 'Acquire::Languages "none";' > apt.conf.d/docker-no-languages \
&& echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > apt.conf.d/docker-gzip-indexes \
&& echo 'APT::Get::Install-Recommends "false"; APT::Get::Install-Suggests "false";' > apt.conf.d/docker-recommends \
&& apt-get update && apt-get upgrade -y \
&& apt-get install -y vim-tiny git-core python-pip libffi-dev libssl-dev python-dev python3-dev iputils-ping patch wget \
#Due to upstream bug we should use fixed version of pip
&& pip install -U 'setuptools==44.1.1' 'pip==19.2' \
# Do main stuff
&& /build.sh buildme \
# Cleanup
&& apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 \
ppp pppconfig pppoeconf popularity-contest cpp gcc g++ libssl-doc \
&& apt-get -y autoremove; apt-get -y clean \
# Download files for telemetry_tempest_plugin.scenario.test_telemetry_integration.TestTelemetryIntegration test
&& cd /tmp \
&& 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 \
&& 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 \
&& 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 \
&& rm -rf /root/.cache \
&& rm -rf /var/lib/apt/lists/*
# Patch junitxml library to include skipped tests in the test report totals header
COPY bin/patches/junitxml_init.patch /tmp/junitxml_init.patch
RUN patch /usr/local/lib/python2.7/dist-packages/junitxml/__init__.py /tmp/junitxml_init.patch
WORKDIR /var/lib/tempest/
ENTRYPOINT ["/usr/bin/entrypoint.sh"]
# Build
# docker build --no-cache -t docker-ci-tempest:$(date "+%Y_%m_%d_%H_%M_%S") .