azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 1 | FROM ubuntu:16.04 |
| 2 | |
| 3 | LABEL maintainer="qa@mirantis.com" |
Oleksii Molchanov | a936e5a | 2021-11-22 21:54:13 +0200 | [diff] [blame] | 4 | LABEL build_date="2021-11-22" |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 5 | |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 6 | ENV DEBIAN_FRONTEND=noninteractive \ |
| 7 | DEBCONF_NONINTERACTIVE_SEEN=true \ |
| 8 | LANG=C.UTF-8 \ |
Aleksey Zvyagintsev | c3d46bc | 2018-11-07 10:29:57 +0000 | [diff] [blame] | 9 | LANGUAGE=$LANG \ |
| 10 | LOG_DIR='/root/tempest' |
azvyagintsev | cafdd67 | 2018-11-12 15:32:16 +0200 | [diff] [blame] | 11 | SHELL ["/bin/bash", "-o", "pipefail", "-xec"] |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 12 | USER root |
Aleksey Zvyagintsev | c3d46bc | 2018-11-07 10:29:57 +0000 | [diff] [blame] | 13 | ADD data /var/lib/ |
| 14 | |
| 15 | COPY extra/build.sh / |
| 16 | COPY bin/entrypoint.sh /usr/bin/ |
| 17 | COPY bin/run_tempest.sh /usr/bin/run-tempest |
| 18 | COPY bin/opencontrail/policy.json /etc/opencontrail/policy.json |
| 19 | COPY bin/skiplists /var/lib/tempest/skiplists |
| 20 | |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 21 | RUN 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 Galkin | 8163b47 | 2020-01-23 00:41:53 +0400 | [diff] [blame] | 29 | && apt-get install -y vim-tiny git-core python-pip libffi-dev libssl-dev python-dev python3-dev iputils-ping patch wget \ |
Maksym Shalamov | a95d720 | 2018-04-19 17:21:19 +0300 | [diff] [blame] | 30 | #Due to upstream bug we should use fixed version of pip |
Oleksii Molchanov | 92e1df0 | 2021-06-30 12:34:22 +0300 | [diff] [blame] | 31 | && pip install -U 'setuptools==44.1.1' 'pip==19.2' \ |
Aleksey Zvyagintsev | c3d46bc | 2018-11-07 10:29:57 +0000 | [diff] [blame] | 32 | # 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 Galkin | 8163b47 | 2020-01-23 00:41:53 +0400 | [diff] [blame] | 38 | # 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 Zvyagintsev | c3d46bc | 2018-11-07 10:29:57 +0000 | [diff] [blame] | 43 | && rm -rf /root/.cache \ |
| 44 | && rm -rf /var/lib/apt/lists/* |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 45 | |
Maksym Shalamov | 6f5e8d9 | 2018-04-12 18:19:09 +0300 | [diff] [blame] | 46 | # Patch junitxml library to include skipped tests in the test report totals header |
| 47 | COPY bin/patches/junitxml_init.patch /tmp/junitxml_init.patch |
| 48 | RUN patch /usr/local/lib/python2.7/dist-packages/junitxml/__init__.py /tmp/junitxml_init.patch |
sandriichenko | 7ec3217 | 2018-03-19 17:21:21 +0200 | [diff] [blame] | 49 | |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 50 | WORKDIR /var/lib/tempest/ |
| 51 | ENTRYPOINT ["/usr/bin/entrypoint.sh"] |
| 52 | |
| 53 | # Build |
Aleksey Zvyagintsev | c3d46bc | 2018-11-07 10:29:57 +0000 | [diff] [blame] | 54 | # docker build --no-cache -t docker-ci-tempest:$(date "+%Y_%m_%d_%H_%M_%S") . |