From ed94162b910fa58896db99191378d3b71a5313af Mon Sep 17 00:00:00 2001 From: Mizux Seiha Date: Thu, 12 Sep 2024 14:43:17 +0200 Subject: [PATCH] tools/release: Fix manylinux image need maven 3.6+, base image only provide 3.5.3 in the feed... --- tools/release/amd64.Dockerfile | 15 +++++++++++---- tools/release/arm64.Dockerfile | 15 +++++++++++---- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/tools/release/amd64.Dockerfile b/tools/release/amd64.Dockerfile index bc5a5d484be..7f0e7d6d00f 100644 --- a/tools/release/amd64.Dockerfile +++ b/tools/release/amd64.Dockerfile @@ -54,6 +54,13 @@ RUN dnf -y update \ && rm -rf /var/cache/dnf ENV JAVA_HOME=/usr/lib/jvm/java +# Update maven +ADD https://dlcdn.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.tar.gz /usr/local +RUN mkdir -p /usr/local/maven \ + && tar xzvf /usr/local/apache-maven-3.9.9-bin.tar.gz --strip-components=1 -C /usr/local/maven \ + && rm /usr/local/apache-maven-3.9.9-bin.tar.gz +ENV PATH=/usr/local/maven/bin:$PATH + ENV TZ=America/Los_Angeles RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone @@ -67,9 +74,9 @@ WORKDIR /root # use ORTOOLS_GIT_SHA1 to modify the command # i.e. avoid docker reusing the cache when new commit is pushed ARG ORTOOLS_GIT_BRANCH -ENV ORTOOLS_GIT_BRANCH ${ORTOOLS_GIT_BRANCH:-main} +ENV ORTOOLS_GIT_BRANCH=${ORTOOLS_GIT_BRANCH:-main} ARG ORTOOLS_GIT_SHA1 -ENV ORTOOLS_GIT_SHA1 ${ORTOOLS_GIT_SHA1:-unknown} +ENV ORTOOLS_GIT_SHA1=${ORTOOLS_GIT_SHA1:-unknown} RUN git clone -b "${ORTOOLS_GIT_BRANCH}" --single-branch https://github.com/google/or-tools \ && cd or-tools \ && git reset --hard "${ORTOOLS_GIT_SHA1}" @@ -79,9 +86,9 @@ FROM devel AS delivery WORKDIR /root/or-tools ARG ORTOOLS_TOKEN -ENV ORTOOLS_TOKEN ${ORTOOLS_TOKEN} +ENV ORTOOLS_TOKEN=${ORTOOLS_TOKEN} ARG ORTOOLS_DELIVERY -ENV ORTOOLS_DELIVERY ${ORTOOLS_DELIVERY:-all} +ENV ORTOOLS_DELIVERY=${ORTOOLS_DELIVERY:-all} RUN ./tools/release/build_delivery_linux.sh "${ORTOOLS_DELIVERY}" # Publish delivery diff --git a/tools/release/arm64.Dockerfile b/tools/release/arm64.Dockerfile index 26e12aa9cbd..dd4725a4f90 100644 --- a/tools/release/arm64.Dockerfile +++ b/tools/release/arm64.Dockerfile @@ -59,6 +59,13 @@ RUN dnf -y update \ && rm -rf /var/cache/dnf ENV JAVA_HOME=/usr/lib/jvm/java +# Update maven +ADD https://dlcdn.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.tar.gz /usr/local +RUN mkdir -p /usr/local/maven \ + && tar xzvf /usr/local/apache-maven-3.9.9-bin.tar.gz --strip-components=1 -C /usr/local/maven \ + && rm /usr/local/apache-maven-3.9.9-bin.tar.gz +ENV PATH=/usr/local/maven/bin:$PATH + ENV TZ=America/Los_Angeles RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone @@ -72,9 +79,9 @@ WORKDIR /root # use ORTOOLS_GIT_SHA1 to modify the command # i.e. avoid docker reusing the cache when new commit is pushed ARG ORTOOLS_GIT_BRANCH -ENV ORTOOLS_GIT_BRANCH ${ORTOOLS_GIT_BRANCH:-main} +ENV ORTOOLS_GIT_BRANCH=${ORTOOLS_GIT_BRANCH:-main} ARG ORTOOLS_GIT_SHA1 -ENV ORTOOLS_GIT_SHA1 ${ORTOOLS_GIT_SHA1:-unknown} +ENV ORTOOLS_GIT_SHA1=${ORTOOLS_GIT_SHA1:-unknown} RUN git clone -b "${ORTOOLS_GIT_BRANCH}" --single-branch https://github.com/google/or-tools \ && cd or-tools \ && git reset --hard "${ORTOOLS_GIT_SHA1}" @@ -84,9 +91,9 @@ FROM devel AS delivery WORKDIR /root/or-tools ARG ORTOOLS_TOKEN -ENV ORTOOLS_TOKEN ${ORTOOLS_TOKEN} +ENV ORTOOLS_TOKEN=${ORTOOLS_TOKEN} ARG ORTOOLS_DELIVERY -ENV ORTOOLS_DELIVERY ${ORTOOLS_DELIVERY:-all} +ENV ORTOOLS_DELIVERY=${ORTOOLS_DELIVERY:-all} RUN ./tools/release/build_delivery_linux.sh "${ORTOOLS_DELIVERY}" # Publish delivery