This is an automated email from the ASF dual-hosted git repository.

stoty pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/master by this push:
     new 9934c3db15 PHOENIX-7236 Fix release scripts for 5.2
9934c3db15 is described below

commit 9934c3db15339f9f611ec7f1f560ef4bc0f503cc
Author: Istvan Toth <st...@apache.org>
AuthorDate: Mon Feb 26 10:31:46 2024 +0100

    PHOENIX-7236 Fix release scripts for 5.2
    
    * Update base docker image to Ubuntu 22.04
    * Add -L switch to curl when downloading pom.xml
    * set -x for bash when running in debug mode
---
 dev/create-release/do-release-docker.sh  |  4 +++
 dev/create-release/do-release.sh         |  5 ++++
 dev/create-release/phoenix-rm/Dockerfile | 48 +++++++++++++++++++++-----------
 dev/create-release/release-util.sh       |  2 +-
 4 files changed, 41 insertions(+), 18 deletions(-)

diff --git a/dev/create-release/do-release-docker.sh 
b/dev/create-release/do-release-docker.sh
index 8d201e8dfc..3025d7147a 100755
--- a/dev/create-release/do-release-docker.sh
+++ b/dev/create-release/do-release-docker.sh
@@ -107,6 +107,9 @@ if (( $# > 0 )); then
   error "Arguments can only be provided with option flags, invalid args: $*"
 fi
 export DEBUG
+if [ "$DEBUG" = "1" ]; then
+  set -x
+fi
 
 if [ -z "$WORKDIR" ] || [ ! -d "$WORKDIR" ]; then
   error "Work directory (-d) must be defined and exist. Run with -h for help."
@@ -223,6 +226,7 @@ ASF_PASSWORD=$ASF_PASSWORD
 RELEASE_STEP=$RELEASE_STEP
 API_DIFF_TAG=$API_DIFF_TAG
 HOST_OS=$HOST_OS
+DEBUG=$DEBUG
 EOF
 
 JAVA_MOUNT=()
diff --git a/dev/create-release/do-release.sh b/dev/create-release/do-release.sh
index fd613e2f6f..e6aa1ddfb1 100755
--- a/dev/create-release/do-release.sh
+++ b/dev/create-release/do-release.sh
@@ -18,6 +18,11 @@
 #
 
 set -e
+
+if [ "$DEBUG" = "1" ]; then
+  set -x
+fi
+
 # Use the adjacent do-release-docker.sh instead, if you can.
 # Otherwise, this runs core of the release creation.
 # Will ask you questions on what to build and for logins
diff --git a/dev/create-release/phoenix-rm/Dockerfile 
b/dev/create-release/phoenix-rm/Dockerfile
index 9aa97aae18..01de8c2634 100644
--- a/dev/create-release/phoenix-rm/Dockerfile
+++ b/dev/create-release/phoenix-rm/Dockerfile
@@ -21,7 +21,7 @@
 #
 # Includes:
 # * Java 8
-FROM ubuntu:18.04
+FROM ubuntu:22.04
 
 # Install extra needed repos and refresh.
 #
@@ -29,25 +29,39 @@ FROM ubuntu:18.04
 # the most current package versions (instead of potentially using old versions 
cached by docker).
 RUN DEBIAN_FRONTEND=noninteractive apt-get -qq -y update \
   && DEBIAN_FRONTEND=noninteractive apt-get -qq -y install 
--no-install-recommends \
-    curl='7.58.0-*' \
-    git='1:2.17.1-*' \
-    gnupg='2.2.4-*' \
-    libcurl4-openssl-dev='7.58.0-*' \
-    libxml2-dev='2.9.4+dfsg1-*' \
-    lsof='4.89+dfsg-*' \
-    maven='3.6.0-*' \
-    openjdk-8-jdk='8*' \
-    python-pip='9.0.1-*' \
-    python3-pip='9.0.1-*' \
-    subversion='1.9.7-*' \
-    wget='1.19.4-*' \
+    curl='7.81.0-*' \
+    git='1:2.34.1-*' \
+    gnupg='2.2.27-*' \
+    libcurl4-openssl-dev='7.81.0-*' \
+    libxml2-dev='2.9.13+dfsg-*' \
+    libxml2-utils='2.9.13+dfsg-*' \
+    lsof='4.93.2+dfsg-*' \
+    openjdk-8-jdk='8u*' \
+    python3='3.10.6-1~22.04' \
+    python2='2.7.18-3' \
+    python3-pip='22.0.2+dfsg-*' \
+    subversion='1.14.1-*' \
+    wget='1.21.2-*' \
+    patch='2.7.6-*' \
   && apt-get clean \
   && rm -rf /var/lib/apt/lists/* \
   && update-alternatives --set java 
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java \
-  && pip install \
-    python-dateutil==2.8.1 \
-  && pip3 install \
-    python-dateutil==2.8.1
+  && update-alternatives --install /usr/bin/python python /usr/bin/python2 1 \
+  && pip3 install --no-cache-dir python-dateutil==2.8.2 \
+  && pip install --no-cache-dir python-dateutil==2.8.2
+SHELL ["/bin/bash", "-o", "pipefail", "-c"]
+
+# Install maven
+ENV MAVEN_VERSION=3.8.6
+ARG 
MAVEN_URL="https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz";
+ARG 
MAVEN_SHA512="f790857f3b1f90ae8d16281f902c689e4f136ebe584aba45e4b1fa66c80cba826d3e0e52fdd04ed44b4c66f6d3fe3584a057c26dfcac544a60b301e6d0f91c26"
+RUN mkdir -p /opt/maven \
+  && curl -fsSL -o /tmp/apache-maven.tar.gz "${MAVEN_URL}" \
+  && echo "${MAVEN_SHA512}  /tmp/apache-maven.tar.gz" | sha512sum -c - \
+  && tar -xzf /tmp/apache-maven.tar.gz -C /opt/maven --strip-components=1 \
+  && rm -f /tmp/apache-maven.tar.gz \
+  && ln -s /opt/maven/bin/mvn /usr/bin/mvn
+
 # Install Apache Yetus
 ENV YETUS_VERSION 0.13.0
 SHELL ["/bin/bash", "-o", "pipefail", "-c"]
diff --git a/dev/create-release/release-util.sh 
b/dev/create-release/release-util.sh
index 4b199132fb..3fa276932d 100755
--- a/dev/create-release/release-util.sh
+++ b/dev/create-release/release-util.sh
@@ -147,7 +147,7 @@ function get_release_info {
   # Find the current version for the branch.
   # FIXME this only works with gitbox
   local version
-  version="$(curl -s 
"$ASF_REPO_WEBUI;a=blob_plain;f=pom.xml;hb=refs/heads/$GIT_BRANCH" |
+  version="$(curl -L -s 
"$ASF_REPO_WEBUI;a=blob_plain;f=pom.xml;hb=refs/heads/$GIT_BRANCH" |
     parse_version)"
   echo "Current branch VERSION is $version."
 

Reply via email to