[Skiboot] [PATCH] travis/ci: rework Dockerfiles to produce build artifacts

Stewart Smith stewart at linux.ibm.com
Mon Oct 29 15:06:42 AEDT 2018


ubuntu-latest was also missing clang, as ubuntu-latest is closer to
ubuntu 18.04 than 16.04

Signed-off-by: Stewart Smith <stewart at linux.ibm.com>
---
 .travis.yml                        | 2 +-
 opal-ci/Dockerfile-centos6         | 1 -
 opal-ci/Dockerfile-centos7         | 1 -
 opal-ci/Dockerfile-debian-stretch  | 1 -
 opal-ci/Dockerfile-debian-unstable | 1 -
 opal-ci/Dockerfile-docs            | 1 -
 opal-ci/Dockerfile-fedora-rawhide  | 1 -
 opal-ci/Dockerfile-fedora27        | 1 -
 opal-ci/Dockerfile-fedora28        | 2 +-
 opal-ci/Dockerfile-ubuntu-16.04    | 2 +-
 opal-ci/Dockerfile-ubuntu-18.04    | 1 -
 opal-ci/Dockerfile-ubuntu-latest   | 5 ++---
 opal-ci/build-debian-stretch.sh    | 1 +
 opal-ci/build-debian-unstable.sh   | 1 +
 opal-ci/build-docs.sh              | 8 ++++++++
 opal-ci/build-fedora-rawhide.sh    | 1 +
 opal-ci/build-ubuntu-latest.sh     | 1 +
 17 files changed, 17 insertions(+), 14 deletions(-)
 create mode 120000 opal-ci/build-debian-stretch.sh
 create mode 120000 opal-ci/build-debian-unstable.sh
 create mode 100644 opal-ci/build-docs.sh
 create mode 120000 opal-ci/build-fedora-rawhide.sh
 create mode 120000 opal-ci/build-ubuntu-latest.sh

diff --git a/.travis.yml b/.travis.yml
index b5a021f22017..e69545438a72 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -47,7 +47,7 @@ before_install:
 script:
     - if [ ${COVERITY_SCAN_BRANCH} != 1 ]; then
        docker build --pull -t ${RUN_ON_CONTAINER} -f opal-ci/Dockerfile-${RUN_ON_CONTAINER} . &&
-       docker run --volume $HOME/.ccache:/root/.ccache --rm -t $RUN_ON_CONTAINER;
+       docker run --volume $HOME/.ccache:/root/.ccache --volume `pwd`:/build --rm -t $RUN_ON_CONTAINER bash -c "./opal-ci/build-${RUN_ON_CONTAINER}.sh";
       fi
     - if [ ${COVERITY_SCAN_BRANCH} == 1 ]; then
         sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test &&
diff --git a/opal-ci/Dockerfile-centos6 b/opal-ci/Dockerfile-centos6
index de6f2bc7bd74..263a98e76977 100644
--- a/opal-ci/Dockerfile-centos6
+++ b/opal-ci/Dockerfile-centos6
@@ -8,4 +8,3 @@ RUN curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/package
 RUN yum -y install systemsim-p8-1.0-2.el6.x86_64.rpm
 COPY . /build/
 WORKDIR /build
-ENTRYPOINT ./opal-ci/build-centos6.sh
diff --git a/opal-ci/Dockerfile-centos7 b/opal-ci/Dockerfile-centos7
index 3b041af89538..ab94ef6853a4 100644
--- a/opal-ci/Dockerfile-centos7
+++ b/opal-ci/Dockerfile-centos7
@@ -11,4 +11,3 @@ RUN curl -L https://github.com/dgibson/dtc/archive/v1.4.2.tar.gz|tar xfz -
 RUN (cd dtc-1.4.2; make PREFIX=/usr/local install)
 COPY . /build/
 WORKDIR /build
-ENTRYPOINT ./opal-ci/build-centos7.sh
diff --git a/opal-ci/Dockerfile-debian-stretch b/opal-ci/Dockerfile-debian-stretch
index 9485e7a12b1a..f9e4ae21aa73 100644
--- a/opal-ci/Dockerfile-debian-stretch
+++ b/opal-ci/Dockerfile-debian-stretch
@@ -7,4 +7,3 @@ RUN apt-get update -qq && apt-get install -y gcc-arm-linux-gnueabi || true
 RUN if [ `arch` = "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.0-0/systemsim-p9-1.0-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.0-0-trusty_amd64.deb; fi
 COPY . /build/
 WORKDIR /build
-ENTRYPOINT ./opal-ci/build-ubuntu-16.04.sh
diff --git a/opal-ci/Dockerfile-debian-unstable b/opal-ci/Dockerfile-debian-unstable
index 8a21008ce928..d98880070004 100644
--- a/opal-ci/Dockerfile-debian-unstable
+++ b/opal-ci/Dockerfile-debian-unstable
@@ -8,4 +8,3 @@ RUN if [ `arch` = "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software
 RUN if [ `arch` = "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.0-0/systemsim-p9-1.0-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.0-0-trusty_amd64.deb; fi
 COPY . /build/
 WORKDIR /build
-ENTRYPOINT ./opal-ci/build-ubuntu-16.04.sh
diff --git a/opal-ci/Dockerfile-docs b/opal-ci/Dockerfile-docs
index 0ebd3919ea51..4e5f2d8f7e82 100644
--- a/opal-ci/Dockerfile-docs
+++ b/opal-ci/Dockerfile-docs
@@ -2,4 +2,3 @@ FROM fedora:27
 RUN dnf -y install wget curl xterm gcc git xz make diffutils findutils expect valgrind valgrind-devel ccache dtc openssl-devel
 COPY . /build/
 WORKDIR /build
-ENTRYPOINT ./opal-ci/build-docs.sh
diff --git a/opal-ci/Dockerfile-fedora-rawhide b/opal-ci/Dockerfile-fedora-rawhide
index 403110038048..a6056a491446 100644
--- a/opal-ci/Dockerfile-fedora-rawhide
+++ b/opal-ci/Dockerfile-fedora-rawhide
@@ -4,4 +4,3 @@ RUN dnf -y install gcc-powerpc64-linux-gnu
 RUN if [ `arch` = "x86_64" ]; then dnf -y install http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0.f22.x86_64.rpm; fi
 COPY . /build/
 WORKDIR /build
-ENTRYPOINT ./opal-ci/build-fedora27.sh
diff --git a/opal-ci/Dockerfile-fedora27 b/opal-ci/Dockerfile-fedora27
index 4d9537b426c4..06c206c3c70f 100644
--- a/opal-ci/Dockerfile-fedora27
+++ b/opal-ci/Dockerfile-fedora27
@@ -4,4 +4,3 @@ RUN dnf -y install gcc-powerpc64-linux-gnu
 RUN if [ `arch` = "x86_64" ]; then dnf -y install http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0.f22.x86_64.rpm; fi
 COPY . /build/
 WORKDIR /build
-ENTRYPOINT ./opal-ci/build-fedora27.sh
diff --git a/opal-ci/Dockerfile-fedora28 b/opal-ci/Dockerfile-fedora28
index 14c40ff95107..c863d93dc9c0 100644
--- a/opal-ci/Dockerfile-fedora28
+++ b/opal-ci/Dockerfile-fedora28
@@ -6,4 +6,4 @@ RUN dnf -y install flex bison
 RUN if [ `arch` = "x86_64" ]; then dnf -y install http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0.f22.x86_64.rpm; fi
 COPY . /build/
 WORKDIR /build
-ENTRYPOINT ./opal-ci/build-fedora28.sh
+
diff --git a/opal-ci/Dockerfile-ubuntu-16.04 b/opal-ci/Dockerfile-ubuntu-16.04
index ce3148c3ec9a..c53bf03ce437 100644
--- a/opal-ci/Dockerfile-ubuntu-16.04
+++ b/opal-ci/Dockerfile-ubuntu-16.04
@@ -8,4 +8,4 @@ RUN if [ `arch` = "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software
 RUN if [ `arch` = "x86_64" ]; then curl -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.1-0-trusty_amd64.deb; fi
 COPY . /build/
 WORKDIR /build
-ENTRYPOINT ./opal-ci/build-ubuntu-16.04.sh
+
diff --git a/opal-ci/Dockerfile-ubuntu-18.04 b/opal-ci/Dockerfile-ubuntu-18.04
index 6e860946c12a..1743df2f507e 100644
--- a/opal-ci/Dockerfile-ubuntu-18.04
+++ b/opal-ci/Dockerfile-ubuntu-18.04
@@ -7,4 +7,3 @@ RUN if [ `arch` = "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software
 RUN if [ `arch` = "x86_64" ]; then curl -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.1-0-trusty_amd64.deb; fi
 COPY . /build/
 WORKDIR /build
-ENTRYPOINT ./opal-ci/build-ubuntu-18.04.sh
diff --git a/opal-ci/Dockerfile-ubuntu-latest b/opal-ci/Dockerfile-ubuntu-latest
index 6adb170ae47b..c729214ad38f 100644
--- a/opal-ci/Dockerfile-ubuntu-latest
+++ b/opal-ci/Dockerfile-ubuntu-latest
@@ -2,10 +2,9 @@ FROM ubuntu:latest
 ENV DEBIAN_FRONTEND    noninteractive
 RUN apt-get update -qq
 RUN if [ `arch` != "ppc64le" ]; then apt-get update -qq && apt-get install -y gcc-powerpc64le-linux-gnu; fi
-RUN apt-get update -qq && apt-get install -y gcc ccache expect libssl-dev wget curl xterm device-tree-compiler build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind libtcl8.6
+RUN apt-get update -qq && apt-get install -y gcc ccache expect libssl-dev wget curl xterm device-tree-compiler build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind libtcl8.6 clang qemu-system-ppc
 RUN apt-get update -qq && apt-get install -y gcc-arm-linux-gnueabi || true
 RUN if [ `arch` = "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8_1.0-2_amd64.deb; dpkg -i systemsim-p8_1.0-2_amd64.deb; fi
 RUN if [ `arch` = "x86_64" ]; then curl -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.1-0-trusty_amd64.deb; fi
 COPY . /build/
-WORKDIR /build
-ENTRYPOINT ./opal-ci/build-ubuntu-16.04.sh
+WORKDIR /build
\ No newline at end of file
diff --git a/opal-ci/build-debian-stretch.sh b/opal-ci/build-debian-stretch.sh
new file mode 120000
index 000000000000..a340f1420652
--- /dev/null
+++ b/opal-ci/build-debian-stretch.sh
@@ -0,0 +1 @@
+build-ubuntu-16.04.sh
\ No newline at end of file
diff --git a/opal-ci/build-debian-unstable.sh b/opal-ci/build-debian-unstable.sh
new file mode 120000
index 000000000000..a340f1420652
--- /dev/null
+++ b/opal-ci/build-debian-unstable.sh
@@ -0,0 +1 @@
+build-ubuntu-16.04.sh
\ No newline at end of file
diff --git a/opal-ci/build-docs.sh b/opal-ci/build-docs.sh
new file mode 100644
index 000000000000..817773bf3172
--- /dev/null
+++ b/opal-ci/build-docs.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+set -uo pipefail
+set -e
+set -vx
+
+cd doc;
+make html latexpdf text
diff --git a/opal-ci/build-fedora-rawhide.sh b/opal-ci/build-fedora-rawhide.sh
new file mode 120000
index 000000000000..74d86363979f
--- /dev/null
+++ b/opal-ci/build-fedora-rawhide.sh
@@ -0,0 +1 @@
+build-fedora28.sh
\ No newline at end of file
diff --git a/opal-ci/build-ubuntu-latest.sh b/opal-ci/build-ubuntu-latest.sh
new file mode 120000
index 000000000000..d8840a9c9d37
--- /dev/null
+++ b/opal-ci/build-ubuntu-latest.sh
@@ -0,0 +1 @@
+build-ubuntu-18.04.sh
\ No newline at end of file
-- 
2.17.2



More information about the Skiboot mailing list