azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 1 | FROM ubuntu:16.04 |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 2 | LABEL maintainer="qa@mirantis.com" |
Oleksii Molchanov | ffdd962 | 2021-11-22 21:54:13 +0200 | [diff] [blame] | 3 | LABEL build_date="2021-11-22" |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 4 | |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 5 | ENV DEBIAN_FRONTEND=noninteractive \ |
| 6 | DEBCONF_NONINTERACTIVE_SEEN=true \ |
| 7 | LANG=C.UTF-8 \ |
Aleksey Zvyagintsev | ce2cd90 | 2018-11-07 10:29:57 +0000 | [diff] [blame] | 8 | LANGUAGE=$LANG \ |
Ievgeniia Zadorozhna | b3877dd | 2019-10-22 18:13:35 +0300 | [diff] [blame] | 9 | LOG_DIR='/root/tempest' \ |
| 10 | OS_TEST_TIMEOUT=700 |
Aleksey Zvyagintsev | ce2cd90 | 2018-11-07 10:29:57 +0000 | [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 | ce2cd90 | 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 | |
| 21 | # Patch junitxml library to include skipped tests in the test report totals header |
| 22 | COPY bin/patches/junitxml_init.patch /var/lib/junitxml_init.patch |
| 23 | |
| 24 | # Patch os_testr library to fix issue ralated with tempest black-list option |
| 25 | COPY bin/patches/regex_builder.patch /var/lib/regex_builder.patch |
| 26 | |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 27 | RUN cd /etc/apt/ && echo > sources.list \ |
| 28 | && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial main restricted universe multiverse" >> sources.list \ |
| 29 | && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse" >> sources.list \ |
| 30 | && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse" >> sources.list \ |
| 31 | && echo 'Acquire::Languages "none";' > apt.conf.d/docker-no-languages \ |
| 32 | && echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > apt.conf.d/docker-gzip-indexes \ |
| 33 | && echo 'APT::Get::Install-Recommends "false"; APT::Get::Install-Suggests "false";' > apt.conf.d/docker-recommends \ |
| 34 | && apt-get update && apt-get upgrade -y \ |
Aleksey Zvyagintsev | ce2cd90 | 2018-11-07 10:29:57 +0000 | [diff] [blame] | 35 | && apt-get install -y vim-tiny git-core python-pip libffi-dev libssl-dev python-dev python3-dev iputils-ping patch \ |
Maksym Shalamov | a95d720 | 2018-04-19 17:21:19 +0300 | [diff] [blame] | 36 | #Due to upstream bug we should use fixed version of pip |
Oleksii Molchanov | f4d5223 | 2021-06-30 12:34:22 +0300 | [diff] [blame] | 37 | && pip install -U 'setuptools==44.1.1' 'pip==19.2' \ |
Aleksey Zvyagintsev | ce2cd90 | 2018-11-07 10:29:57 +0000 | [diff] [blame] | 38 | # Do main stuff |
| 39 | && /build.sh buildme \ |
| 40 | # Cleanup |
| 41 | && apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 \ |
| 42 | ppp pppconfig pppoeconf popularity-contest cpp gcc g++ libssl-doc \ |
| 43 | && apt-get -y autoremove; apt-get -y clean \ |
| 44 | && rm -rf /root/.cache \ |
| 45 | && rm -rf /var/lib/apt/lists/* |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 46 | |
Ievgeniia Zadorozhna | 6aebc48 | 2019-12-04 14:36:51 +0300 | [diff] [blame] | 47 | # Download some images for Tempest |
| 48 | 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 |
| 49 | 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 |
| 50 | 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 |
| 51 | |
Maksym Shalamov | df54d20 | 2018-04-13 16:13:12 +0300 | [diff] [blame] | 52 | |
Aleksey Zvyagintsev | ce2cd90 | 2018-11-07 10:29:57 +0000 | [diff] [blame] | 53 | RUN patch /usr/local/lib/python2.7/dist-packages/junitxml/__init__.py /var/lib/junitxml_init.patch |
| 54 | RUN patch /usr/local/lib/python2.7/dist-packages/os_testr/regex_builder.py /var/lib/regex_builder.patch |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 55 | |
Maksym Shalamov | 98189f5 | 2018-04-24 13:36:26 +0300 | [diff] [blame] | 56 | |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 57 | WORKDIR /var/lib/tempest/ |
| 58 | ENTRYPOINT ["/usr/bin/entrypoint.sh"] |
| 59 | |
Aleksey Zvyagintsev | ce2cd90 | 2018-11-07 10:29:57 +0000 | [diff] [blame] | 60 | # docker build --no-cache -t docker-ci-tempest:$(date "+%Y_%m_%d_%H_%M_%S") . |