From 66e26e5182041dec2ae1e29be6d944c6b85c813c Mon Sep 17 00:00:00 2001 From: Joshua Scott Brown Date: Sat, 6 Apr 2019 18:06:26 -0600 Subject: [PATCH 1/2] Clean up release scripts and docker files --- scripts/deploy.bash | 0 scripts/docker_clean.bash | 5 +++++ scripts/release.bash | 5 +++-- scripts/release_distros/centos7/Dockerfile | 8 ++++---- scripts/release_distros/debian9/Dockerfile | 8 ++++---- scripts/release_distros/fedora28/Dockerfile | 8 ++++---- scripts/release_distros/ubuntu18/Dockerfile | 8 ++++---- 7 files changed, 24 insertions(+), 18 deletions(-) mode change 100644 => 100755 scripts/deploy.bash create mode 100755 scripts/docker_clean.bash diff --git a/scripts/deploy.bash b/scripts/deploy.bash old mode 100644 new mode 100755 diff --git a/scripts/docker_clean.bash b/scripts/docker_clean.bash new file mode 100755 index 0000000..aacbe27 --- /dev/null +++ b/scripts/docker_clean.bash @@ -0,0 +1,5 @@ +#!/bin/bash + +# Will remove all docker containers and images +docker container prune +docker image prune -a diff --git a/scripts/release.bash b/scripts/release.bash index b788d6c..267f86d 100755 --- a/scripts/release.bash +++ b/scripts/release.bash @@ -3,12 +3,13 @@ directory=$(pwd) distros="centos7 fedora28 ubuntu18 debian9" for distro in $distros; do + echo "Building ${distro}" cd ${directory}/release_distros/${distro} pwd ls cp ${directory}/release_distros/package_release.bash ${directory}/release_distros/${distro}/ - docker build ${directory}/release_distros/${distro} -t catnip${distro} - id=$(docker create catnip${distro}) + docker build ${directory}/release_distros/${distro} -t "catnip${distro}" + id=$(docker create "catnip${distro}") docker cp $id:TAR . rm ${directory}/release_distros/${distro}/package_release.bash done diff --git a/scripts/release_distros/centos7/Dockerfile b/scripts/release_distros/centos7/Dockerfile index 9d56dac..7b1921b 100644 --- a/scripts/release_distros/centos7/Dockerfile +++ b/scripts/release_distros/centos7/Dockerfile @@ -1,7 +1,7 @@ FROM centos:7 RUN yum update -y -RUN yum install make cmake gcc-c++ git file redhat-lsb-core -y +RUN yum install python curl unzip zip make cmake gcc-c++ git file redhat-lsb-core -y RUN curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py" RUN chmod +x get-pip.py RUN ./get-pip.py @@ -10,12 +10,12 @@ RUN git clone https://github.com/JoshuaSBrown/QC_Tools.git RUN mkdir -p QC_Tools/build_test RUN mkdir -p QC_Tools/build # Build with tests and then test -WORKDIR /QC_Tools/build_test +WORKDIR /QC_Tools/build RUN cmake -DENABLE_TESTS=ON -DENABLE_INTEGRATION_TESTS=ON ../ RUN make -RUN make test +RUN make ARGS="-V" test # Build optimized release version -WORKDIR /QC_Tools/build +RUN rm -rf * RUN cmake -DCMAKE_BUILD_TYPE=Release ../ RUN make # VERSION of calc_J diff --git a/scripts/release_distros/debian9/Dockerfile b/scripts/release_distros/debian9/Dockerfile index a59a9dd..4c52092 100644 --- a/scripts/release_distros/debian9/Dockerfile +++ b/scripts/release_distros/debian9/Dockerfile @@ -1,7 +1,7 @@ FROM debian:stretch RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections -RUN apt-get update && apt-get install -y apt-utils ca-certificates make cmake gcc g++ git file lsb-release && apt-get clean && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y python curl zip unzip apt-utils ca-certificates make cmake gcc g++ git file lsb-release && apt-get clean && rm -rf /var/lib/apt/lists/* RUN curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py" RUN chmod +x get-pip.py RUN ./get-pip.py @@ -11,12 +11,12 @@ RUN mkdir -p QC_Tools/build_test RUN mkdir -p QC_Tools/build # Build with tests and then test -WORKDIR /QC_Tools/build_test +WORKDIR /QC_Tools/build RUN cmake -DENABLE_TESTS=ON -DENABLE_INTEGRATION_TESTS=ON ../ RUN make -RUN make test +RUN make ARGS="-V" test # Build optimized release version -WORKDIR /QC_Tools/build +RUN rm -rf * RUN cmake -DCMAKE_BUILD_TYPE=Release ../ RUN make # VERSION of calc_J diff --git a/scripts/release_distros/fedora28/Dockerfile b/scripts/release_distros/fedora28/Dockerfile index 1d8974b..323b1ff 100644 --- a/scripts/release_distros/fedora28/Dockerfile +++ b/scripts/release_distros/fedora28/Dockerfile @@ -1,6 +1,6 @@ FROM fedora:28 -RUN dnf install make cmake gcc-c++ git file redhat-lsb-core -y +RUN dnf install python curl zip unzip make cmake gcc-c++ git file redhat-lsb-core -y RUN curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py" RUN chmod +x get-pip.py RUN ./get-pip.py @@ -9,12 +9,12 @@ RUN git clone https://github.com/JoshuaSBrown/QC_Tools.git RUN mkdir -p QC_Tools/build_test RUN mkdir -p QC_Tools/build # Build with tests and then test -WORKDIR /QC_Tools/build_test +WORKDIR /QC_Tools/build RUN cmake -DENABLE_TESTS=ON -DENABLE_INTEGRATION_TESTS=ON ../ RUN make -RUN make test +RUN make ARGS="-V" test # Build optimized release version -WORKDIR /QC_Tools/build +RUN rm -rf * RUN cmake -DCMAKE_BUILD_TYPE=Release ../ RUN make # VERSION of calc_J diff --git a/scripts/release_distros/ubuntu18/Dockerfile b/scripts/release_distros/ubuntu18/Dockerfile index d536eb1..dbd46d4 100644 --- a/scripts/release_distros/ubuntu18/Dockerfile +++ b/scripts/release_distros/ubuntu18/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:bionic -RUN apt-get update && apt-get install -y apt-utils ca-certificates make cmake gcc g++ git file lsb-release && apt-get clean && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y python curl zip unzip apt-utils ca-certificates make cmake gcc g++ git file lsb-release && apt-get clean && rm -rf /var/lib/apt/lists/* RUN curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py" RUN chmod +x get-pip.py RUN ./get-pip.py @@ -9,12 +9,12 @@ RUN git clone https://github.com/JoshuaSBrown/QC_Tools.git RUN mkdir -p QC_Tools/build_test RUN mkdir -p QC_Tools/build # Build with tests and then test -WORKDIR /QC_Tools/build_test +WORKDIR /QC_Tools/build RUN cmake -DENABLE_TESTS=ON -DENABLE_INTEGRATION_TESTS=ON ../ RUN make -RUN make test +RUN make ARGS="-V" test # Build optimized release version -WORKDIR /QC_Tools/build +RUN rm -rf * RUN cmake -DCMAKE_BUILD_TYPE=Release ../ RUN make # VERSION of calc_J From 4a800e2b99352eb3b91adcf227d7bebf9118b018 Mon Sep 17 00:00:00 2001 From: Joshua Scott Brown Date: Sat, 6 Apr 2019 18:36:46 -0600 Subject: [PATCH 2/2] Add bc to debian and ubuntu --- scripts/release_distros/debian9/Dockerfile | 2 +- scripts/release_distros/ubuntu18/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/release_distros/debian9/Dockerfile b/scripts/release_distros/debian9/Dockerfile index 4c52092..f7185f6 100644 --- a/scripts/release_distros/debian9/Dockerfile +++ b/scripts/release_distros/debian9/Dockerfile @@ -1,7 +1,7 @@ FROM debian:stretch RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections -RUN apt-get update && apt-get install -y python curl zip unzip apt-utils ca-certificates make cmake gcc g++ git file lsb-release && apt-get clean && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y python curl bc zip unzip apt-utils ca-certificates make cmake gcc g++ git file lsb-release && apt-get clean && rm -rf /var/lib/apt/lists/* RUN curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py" RUN chmod +x get-pip.py RUN ./get-pip.py diff --git a/scripts/release_distros/ubuntu18/Dockerfile b/scripts/release_distros/ubuntu18/Dockerfile index dbd46d4..9794df1 100644 --- a/scripts/release_distros/ubuntu18/Dockerfile +++ b/scripts/release_distros/ubuntu18/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:bionic -RUN apt-get update && apt-get install -y python curl zip unzip apt-utils ca-certificates make cmake gcc g++ git file lsb-release && apt-get clean && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y bc python curl zip unzip apt-utils ca-certificates make cmake gcc g++ git file lsb-release && apt-get clean && rm -rf /var/lib/apt/lists/* RUN curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py" RUN chmod +x get-pip.py RUN ./get-pip.py