| FROM ubuntu:16.04 |
| LABEL maintainer="qa@mirantis.com" |
| LABEL build_date="2021-11-22" |
| |
| ENV DEBIAN_FRONTEND=noninteractive \ |
| DEBCONF_NONINTERACTIVE_SEEN=true \ |
| LANG=C.UTF-8 \ |
| LANGUAGE=$LANG \ |
| LOG_DIR='/root/tempest' \ |
| OS_TEST_TIMEOUT=700 |
| 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 |
| |
| # Patch junitxml library to include skipped tests in the test report totals header |
| COPY bin/patches/junitxml_init.patch /var/lib/junitxml_init.patch |
| |
| # Patch os_testr library to fix issue ralated with tempest black-list option |
| COPY bin/patches/regex_builder.patch /var/lib/regex_builder.patch |
| |
| 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 \ |
| #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 \ |
| && rm -rf /root/.cache \ |
| && rm -rf /var/lib/apt/lists/* |
| |
| # Download some images for Tempest |
| ADD https://github.com/codybum/OpenStackInAction/blob/master/scripts/icehouse/opt/devstack/files/images/cirros-0.3.1-x86_64-uec/cirros-0.3.1-x86_64-blank.img /tmp/cirros-0.3.1-x86_64-blank.img |
| ADD https://github.com/codybum/OpenStackInAction/blob/master/scripts/icehouse/opt/devstack/files/images/cirros-0.3.1-x86_64-uec/cirros-0.3.1-x86_64-initrd /tmp/cirros-0.3.1-x86_64-initrd |
| ADD https://github.com/codybum/OpenStackInAction/blob/master/scripts/icehouse/opt/devstack/files/images/cirros-0.3.1-x86_64-uec/cirros-0.3.1-x86_64-vmlinuz /tmp/cirros-0.3.1-x86_64-vmlinuz |
| |
| |
| RUN patch /usr/local/lib/python2.7/dist-packages/junitxml/__init__.py /var/lib/junitxml_init.patch |
| RUN patch /usr/local/lib/python2.7/dist-packages/os_testr/regex_builder.py /var/lib/regex_builder.patch |
| |
| |
| WORKDIR /var/lib/tempest/ |
| ENTRYPOINT ["/usr/bin/entrypoint.sh"] |
| |
| # docker build --no-cache -t docker-ci-tempest:$(date "+%Y_%m_%d_%H_%M_%S") . |