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" |
| 3 | |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 4 | ENV DEBIAN_FRONTEND=noninteractive \ |
| 5 | DEBCONF_NONINTERACTIVE_SEEN=true \ |
| 6 | LANG=C.UTF-8 \ |
Aleksey Zvyagintsev | ce2cd90 | 2018-11-07 10:29:57 +0000 | [diff] [blame^] | 7 | LANGUAGE=$LANG \ |
| 8 | LOG_DIR='/root/tempest' |
| 9 | SHELL ["/bin/bash", "-o", "pipefail", "-xec"] |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 10 | USER root |
Aleksey Zvyagintsev | ce2cd90 | 2018-11-07 10:29:57 +0000 | [diff] [blame^] | 11 | ADD data /var/lib/ |
| 12 | |
| 13 | COPY extra/build.sh / |
| 14 | COPY bin/entrypoint.sh /usr/bin/ |
| 15 | COPY bin/run_tempest.sh /usr/bin/run-tempest |
| 16 | COPY bin/opencontrail/policy.json /etc/opencontrail/policy.json |
| 17 | COPY bin/skiplists /var/lib/tempest/skiplists |
| 18 | |
| 19 | # Patch junitxml library to include skipped tests in the test report totals header |
| 20 | COPY bin/patches/junitxml_init.patch /var/lib/junitxml_init.patch |
| 21 | |
| 22 | # Patch os_testr library to fix issue ralated with tempest black-list option |
| 23 | COPY bin/patches/regex_builder.patch /var/lib/regex_builder.patch |
| 24 | |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 25 | RUN cd /etc/apt/ && echo > sources.list \ |
| 26 | && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial main restricted universe multiverse" >> sources.list \ |
| 27 | && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse" >> sources.list \ |
| 28 | && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse" >> sources.list \ |
| 29 | && echo 'Acquire::Languages "none";' > apt.conf.d/docker-no-languages \ |
| 30 | && echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > apt.conf.d/docker-gzip-indexes \ |
| 31 | && echo 'APT::Get::Install-Recommends "false"; APT::Get::Install-Suggests "false";' > apt.conf.d/docker-recommends \ |
| 32 | && apt-get update && apt-get upgrade -y \ |
Aleksey Zvyagintsev | ce2cd90 | 2018-11-07 10:29:57 +0000 | [diff] [blame^] | 33 | && 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] | 34 | #Due to upstream bug we should use fixed version of pip |
Aleksey Zvyagintsev | ce2cd90 | 2018-11-07 10:29:57 +0000 | [diff] [blame^] | 35 | && pip install -U 'pip==18.0' \ |
| 36 | # Do main stuff |
| 37 | && /build.sh buildme \ |
| 38 | # Cleanup |
| 39 | && apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 \ |
| 40 | ppp pppconfig pppoeconf popularity-contest cpp gcc g++ libssl-doc \ |
| 41 | && apt-get -y autoremove; apt-get -y clean \ |
| 42 | && rm -rf /root/.cache \ |
| 43 | && rm -rf /var/lib/apt/lists/* |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 44 | |
Maksym Shalamov | df54d20 | 2018-04-13 16:13:12 +0300 | [diff] [blame] | 45 | |
Aleksey Zvyagintsev | ce2cd90 | 2018-11-07 10:29:57 +0000 | [diff] [blame^] | 46 | RUN patch /usr/local/lib/python2.7/dist-packages/junitxml/__init__.py /var/lib/junitxml_init.patch |
| 47 | 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] | 48 | |
Maksym Shalamov | 98189f5 | 2018-04-24 13:36:26 +0300 | [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 | |
Aleksey Zvyagintsev | ce2cd90 | 2018-11-07 10:29:57 +0000 | [diff] [blame^] | 53 | # docker build --no-cache -t docker-ci-tempest:$(date "+%Y_%m_%d_%H_%M_%S") . |