snazy commented on code in PR #2156:
URL: https://github.com/apache/polaris/pull/2156#discussion_r2224570626


##########
releasey/libs/_log.sh:
##########
@@ -0,0 +1,68 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Common Logging Functions
+#
+
+# Colors for output
+RED='\033[0;31m'
+GREEN='\033[0;32m'
+YELLOW='\033[1;33m'
+BLUE='\033[0;34m'
+NC='\033[0m' # No Color
+
+function print_error() {
+  echo -e "${RED}ERROR: $*${NC}" >&2
+}
+
+function print_success() {
+  echo -e "${GREEN}SUCCESS: $*${NC}" >&2
+}
+
+function print_warning() {
+  echo -e "${YELLOW}WARNING: $*${NC}" >&2
+}
+
+function print_info() {
+  echo "INFO: $*" >&2
+}
+
+function print_command() {
+  # This function can be used to print the bash commands that are executed by a
+  # script.  It either prints its arguments as-is to file descriptor 3, if it
+  # is open, or prepends "DEBUG: " and prints them to stdout if it is unset.
+  #
+  # This allows the programmatic verification of all commands that are executed
+  # by a script, by running it as follows:
+  #
+  #   $ ./script.sh 3>/tmp/script.log
+  #   $ cat /tmp/script.log
+  #   ./gradlew clean build
+  #   rm -rf ./regtests/output

Review Comment:
   regtests?



##########
releasey/libs/_constants.sh:
##########
@@ -0,0 +1,43 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+libs_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+# GPG constants
+KEYS_URL=${KEYS_URL:-"https://downloads.apache.org/incubator/polaris/KEYS"}
+KEYSERVER=${KEYSERVER:-"hkps://keyserver.ubuntu.com"}

Review Comment:
   Why do we need the Ubuntu keyserver?



##########
releasey/libs/_docker.sh:
##########
@@ -0,0 +1,120 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Docker Setup Verification Script
+#
+# This script verifies that Docker is properly configured for Apache Polaris 
releases:
+# 1. Checks that Docker is installed and available in PATH
+# 2. Verifies that Docker daemon is running and accessible
+# 3. Confirms that Docker buildx is available for multi-platform builds
+# 4. Checks Docker Hub login status (optional)
+#
+# Returns non-zero exit code if any verification fails.
+#
+
+set -euo pipefail
+
+libs_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+# Source common logging functions and constants
+source "${libs_dir}/_log.sh"
+source "${libs_dir}/_constants.sh"
+source "${libs_dir}/_exec.sh"
+
+function ensure_docker_is_available() {
+  # Check if Docker is installed, return non-zero if not
+  print_info "Checking if Docker is available..."
+  if ! command -v docker >/dev/null 2>&1; then
+    print_error "Docker is not installed or not in PATH"
+    print_error "Please install Docker to build and publish Docker images"
+    return 1
+  fi
+  print_success "✓ Docker is installed"
+  return 0
+}
+
+function ensure_docker_daemon_is_accessible() {
+  # Check if Docker daemon is running and accessible, return non-zero if not
+  print_info "Checking if Docker daemon is accessible..."
+  if ! docker info >/dev/null 2>&1; then
+    print_error "Docker daemon is not running or not accessible"
+    print_error "Please start Docker daemon and ensure you have permissions to 
access it"
+    return 1
+  fi
+  print_success "✓ Docker daemon is accessible"
+  return 0
+}
+
+function ensure_docker_buildx_is_available() {
+  # Check if Docker buildx is available, return non-zero if not
+  print_info "Checking if Docker buildx is available..."
+  if ! docker buildx version >/dev/null 2>&1; then
+    print_error "Docker buildx is not available"
+    print_error "Please install Docker with buildx support for multi-platform 
builds"
+    return 1
+  fi
+  print_success "✓ Docker buildx is available"
+  return 0
+}
+
+function check_docker_hub_login_status() {
+  # Check if user is logged in to Docker Hub (optional check)
+  print_info "Checking Docker Hub login status..."
+  if docker info 2>/dev/null | grep -q "Username:"; then

Review Comment:
   Not sure this is technically correct. You can be "logged in" (correct: have 
credentials) to many repos simultaneously.
   
   This steps fails for me, although I've got all credentials setup, just via a 
credentials helper.



##########
releasey/06-build-and-stage-docker-images.sh:
##########
@@ -0,0 +1,137 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Build and Stage Docker Images Script
+#
+# Builds and publishes multi-platform Docker images to DockerHub for release 
candidates.
+# This script automates the "Build and staging Docker images" step from the 
release guide.
+#
+
+set -euo pipefail
+
+releases_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+libs_dir="${releases_dir}/libs"
+
+source "${libs_dir}/_log.sh"
+source "${libs_dir}/_constants.sh"
+source "${libs_dir}/_exec.sh"
+source "${libs_dir}/_files.sh"
+
+function usage() {
+  cat << EOF
+$(basename "$0") [--help | -h]
+
+  Builds and publishes multi-platform Docker images to DockerHub for release 
candidates.
+  The version is automatically determined from the current git tag. I.e. this 
script must
+  be run from a release tag.
+
+  Prerequisites:
+    - Docker with buildx support must be installed and configured
+    - DockerHub credentials must be configured (docker login)
+    - Must be run from a release tag (apache-polaris-x.y.z-incubating-rcN)
+
+  Options:
+    -h --help
+        Print usage information.
+
+  Examples:
+    $(basename "$0")
+
+EOF
+}
+
+ensure_cwd_is_project_root
+
+while [[ $# -gt 0 ]]; do
+  case $1 in
+    --help|-h)
+      usage
+      exit 0
+      ;;
+    *)
+      print_error "Unknown option/argument $1"
+      usage >&2
+      exit 1
+      ;;
+  esac
+done
+
+# Determine version from current git tag
+print_info "Determining version from current git tag..."
+
+if ! git_tag=$(git describe --tags --exact-match HEAD 2>/dev/null); then
+  print_error "Current HEAD is not on a release tag. Please checkout a release 
tag first."
+  print_error "Use: git checkout apache-polaris-x.y.z-incubating-rcN"
+  exit 1
+fi
+print_info "Found git tag: ${git_tag}"
+
+# Extract version components from git tag in one regex match
+git_tag_regex="^apache-polaris-([0-9]+)\.([0-9]+)\.([0-9]+)-incubating-rc([0-9]+)$"
+if [[ ! ${git_tag} =~ ${git_tag_regex} ]]; then
+  print_error "Invalid git tag format: ${git_tag}"
+  print_error "Expected format: apache-polaris-x.y.z-incubating-rcN"
+  exit 1
+fi
+
+# Extract version components from regex match
+major="${BASH_REMATCH[1]}"
+minor="${BASH_REMATCH[2]}"
+patch="${BASH_REMATCH[3]}"
+rc_number="${BASH_REMATCH[4]}"
+version="${major}.${minor}.${patch}-incubating"

Review Comment:
   Can you make `-incubating` a constant in `_constants.sh`?



##########
releasey/libs/_log.sh:
##########
@@ -0,0 +1,68 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Common Logging Functions
+#
+
+# Colors for output
+RED='\033[0;31m'
+GREEN='\033[0;32m'
+YELLOW='\033[1;33m'
+BLUE='\033[0;34m'

Review Comment:
   Honestly, I think those should not be overwritten to not interfere with 
personalized settings (standard settings ESC sequences can make text hardly 
unreadable - dark vs bright or even more colorful terminal profiles).



##########
releasey/06-build-and-stage-docker-images.sh:
##########
@@ -0,0 +1,137 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Build and Stage Docker Images Script
+#
+# Builds and publishes multi-platform Docker images to DockerHub for release 
candidates.
+# This script automates the "Build and staging Docker images" step from the 
release guide.
+#
+
+set -euo pipefail
+
+releases_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+libs_dir="${releases_dir}/libs"
+
+source "${libs_dir}/_log.sh"
+source "${libs_dir}/_constants.sh"
+source "${libs_dir}/_exec.sh"
+source "${libs_dir}/_files.sh"
+
+function usage() {
+  cat << EOF
+$(basename "$0") [--help | -h]
+
+  Builds and publishes multi-platform Docker images to DockerHub for release 
candidates.
+  The version is automatically determined from the current git tag. I.e. this 
script must
+  be run from a release tag.
+
+  Prerequisites:
+    - Docker with buildx support must be installed and configured
+    - DockerHub credentials must be configured (docker login)
+    - Must be run from a release tag (apache-polaris-x.y.z-incubating-rcN)
+
+  Options:
+    -h --help
+        Print usage information.
+
+  Examples:
+    $(basename "$0")
+
+EOF
+}
+
+ensure_cwd_is_project_root
+
+while [[ $# -gt 0 ]]; do
+  case $1 in
+    --help|-h)
+      usage
+      exit 0
+      ;;
+    *)
+      print_error "Unknown option/argument $1"
+      usage >&2
+      exit 1
+      ;;
+  esac
+done
+
+# Determine version from current git tag
+print_info "Determining version from current git tag..."
+
+if ! git_tag=$(git describe --tags --exact-match HEAD 2>/dev/null); then
+  print_error "Current HEAD is not on a release tag. Please checkout a release 
tag first."
+  print_error "Use: git checkout apache-polaris-x.y.z-incubating-rcN"
+  exit 1
+fi
+print_info "Found git tag: ${git_tag}"
+
+# Extract version components from git tag in one regex match
+git_tag_regex="^apache-polaris-([0-9]+)\.([0-9]+)\.([0-9]+)-incubating-rc([0-9]+)$"
+if [[ ! ${git_tag} =~ ${git_tag_regex} ]]; then
+  print_error "Invalid git tag format: ${git_tag}"
+  print_error "Expected format: apache-polaris-x.y.z-incubating-rcN"
+  exit 1
+fi
+
+# Extract version components from regex match
+major="${BASH_REMATCH[1]}"
+minor="${BASH_REMATCH[2]}"
+patch="${BASH_REMATCH[3]}"
+rc_number="${BASH_REMATCH[4]}"
+version="${major}.${minor}.${patch}-incubating"
+docker_tag="${version}-rc${rc_number}"
+
+print_info "Starting Docker image build and staging process..."
+print_info "Version: ${version}"
+print_info "RC number: ${rc_number}"
+print_info "Docker tag: ${docker_tag}"
+echo
+
+# Build and push polaris-server Docker image
+print_info "Building and pushing polaris-server Docker image..."
+exec_process ./gradlew :polaris-server:assemble 
:polaris-server:quarkusAppPartsBuild --rerun \
+  -Dquarkus.container-image.build=true \
+  -Dquarkus.container-image.push=true \
+  -Dquarkus.docker.buildx.platform="linux/amd64,linux/arm64" \
+  -Dquarkus.container-image.tag="${docker_tag}"
+
+# Build and push polaris-admin Docker image
+print_info "Building and pushing polaris-admin Docker image..."
+exec_process ./gradlew :polaris-admin:assemble 
:polaris-admin:quarkusAppPartsBuild --rerun \
+  -Dquarkus.container-image.build=true \
+  -Dquarkus.container-image.push=true \
+  -Dquarkus.docker.buildx.platform="linux/amd64,linux/arm64" \
+  -Dquarkus.container-image.tag="${docker_tag}"
+
+echo
+print_success "🎉 Docker images built and staged successfully!"
+echo
+print_info "Published Docker images:"
+print_info "- polaris-server: ${DOCKER_REGISTRY}/apache/polaris:${docker_tag}"
+print_info "- polaris-admin: 
${DOCKER_REGISTRY}/apache/polaris-admin-tool:${docker_tag}"
+echo
+print_info "Docker Hub links:"
+print_info "- ${DOCKER_HUB_URL}/r/apache/polaris/tags"
+print_info "- ${DOCKER_HUB_URL}/r/apache/polaris-admin-tool/tags"
+echo
+print_info "Next steps:"
+print_info "1. Start the vote thread"

Review Comment:
   I think it's worth to have a proposal for the subject and body of the email 
printed here.
   Actually, maybe even in it's own shell script.



##########
releasey/libs/_files.sh:
##########
@@ -0,0 +1,50 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Utility function for version.txt manipulation
+#
+
+libs_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+source "$libs_dir/_constants.sh"
+source "$libs_dir/_log.sh"
+
+function update_version {
+  local version="$1"
+  # This function is only there for dry-run support.  Because of the
+  # redirection, we cannot use exec_process with the exact command that will be
+  # executed.
+  if [[ ${DRY_RUN:-1} -ne 1 ]]; then
+    exec_process echo ${version} >$VERSION_FILE
+  else
+    exec_process "echo ${version} > $VERSION_FILE"
+  fi
+}
+
+function ensure_cwd_is_project_root() {

Review Comment:
   Actually, I don't think we need this one.
   The location of the `01...` scripts is well known, so you can infer the 
"project root directory":
   
   People would probably naively run it like this:
   ```bash
   cd releasy
   ./01-...
   ./02-...
   ```
   
   It's more convenient to let the scripts figure out what they can figure out.



##########
releasey/04-build-and-test.sh:
##########
@@ -0,0 +1,118 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Build and Test Script
+#
+# Builds Polaris completely and runs regression tests to verify the release.
+# Cloud-specific tests are disabled by default and require proper credentials
+# to be configured in the environment.
+#

Review Comment:
   Strictly speaking, these tests shouldn't be necessary, because a release 
should never be created from a Git commit that's not verified by CI.
   
   Note: there's a [GH API 
endpoint](https://docs.github.com/en/rest/commits/statuses?apiVersion=2022-11-28#get-the-combined-status-for-a-specific-reference)
 to check the combined status.
   
   I'd prefer a "commit status check" over mirroring what the CI workflows do.



##########
releasey/libs/_nexus.sh:
##########
@@ -0,0 +1,96 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Maven/Gradle Credentials Verification Script
+#
+# This script verifies that Maven/Gradle credentials are properly configured 
for Apache Polaris releases:
+# 1. Checks if Apache credentials are configured in ~/.gradle/gradle.properties
+# 2. Checks if Apache credentials are configured via environment variables
+# 3. Validates that at least one method is configured
+# 4. Attempts to verify credentials against Apache Nexus repository
+#
+# Returns non-zero exit code if any verification fails.
+#
+
+set -euo pipefail
+
+libs_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+# Source common logging functions and constants
+source "${libs_dir}/_log.sh"
+source "${libs_dir}/_constants.sh"
+source "${libs_dir}/_exec.sh"
+
+function check_apache_credentials_are_set_in_gradle_properties() {
+  # Check if Apache credentials are configured in ~/.gradle/gradle.properties, 
return non-zero if not
+  print_info "Checking for Apache credentials in ${GRADLE_PROPERTIES_FILE}..."
+
+  if [[ ! -f "${GRADLE_PROPERTIES_FILE}" ]]; then
+    print_warning "Gradle properties file not found: ${GRADLE_PROPERTIES_FILE}"
+    return 1
+  fi
+
+  if grep -q "^apacheUsername=" "${GRADLE_PROPERTIES_FILE}" 2>/dev/null &&
+     grep -q "^apachePassword=" "${GRADLE_PROPERTIES_FILE}" 2>/dev/null; then
+    print_success "Found Apache credentials in gradle.properties"
+    return 0
+  else
+    print_warning "Apache credentials not found in ${GRADLE_PROPERTIES_FILE}"
+    return 1
+  fi
+}
+
+function check_apache_credentials_are_set_in_environment_variables() {
+  # Check if Apache credentials are configured via environment variables, 
return non-zero if not
+  print_info "Checking for Apache credentials in environment variables..."
+
+  if [[ -n "${ORG_GRADLE_PROJECT_apacheUsername:-}" &&
+        -n "${ORG_GRADLE_PROJECT_apachePassword:-}" ]]; then
+    print_success "Found Apache credentials in environment variables"
+    return 0
+  else
+    print_warning "Apache credentials not found in environment variables"
+    return 1
+  fi
+}
+
+function ensure_credentials_are_configured() {
+  # Ensure that Apache credentials are configured in either gradle.properties 
or environment variables, return non-zero if not
+  print_info "Checking Apache credentials configuration..."
+  
+  if check_apache_credentials_are_set_in_gradle_properties; then
+    print_success "All Maven/Gradle credential checks passed! Your Apache 
credentials are properly configured for releases."
+    return 0
+  fi

Review Comment:
   I'd leave out this step entirely and require those to be environment 
variables.



##########
releasey/libs/_log.sh:
##########
@@ -0,0 +1,68 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Common Logging Functions
+#
+
+# Colors for output
+RED='\033[0;31m'
+GREEN='\033[0;32m'
+YELLOW='\033[1;33m'
+BLUE='\033[0;34m'
+NC='\033[0m' # No Color

Review Comment:
   Isn't the common name for this `RESET`?



##########
releasey/03-create-release-tag.sh:
##########
@@ -0,0 +1,150 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Create Release Tag Script
+#
+# Automates the "Create release tag" section of the release guide.
+#
+
+set -euo pipefail
+
+releases_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+libs_dir="${releases_dir}/libs"
+
+source "${libs_dir}/_log.sh"
+source "${libs_dir}/_constants.sh"
+source "${libs_dir}/_exec.sh"
+source "${libs_dir}/_files.sh"
+
+function usage() {
+  cat << EOF
+$(basename "$0") --version VERSION [--help | -h]
+
+  Creates a release tag for a release candidate.
+
+  Options:
+    --version VERSION
+        The release version in format x.y.z-incubating-rcN where N is the RC 
number
+    -h --help
+        Print usage information.
+
+  Examples:
+    $(basename "$0") --version 1.0.0-incubating-rc1

Review Comment:
   I'd prefer to split version and rc numbers and make those separate 
parameters.
   `-incubating` _must_ be present, so it can be a constant.



##########
releasey/03-create-release-tag.sh:
##########
@@ -0,0 +1,150 @@
+#!/bin/bash

Review Comment:
   Strictly speaking the it's `03-create-release-candidate-tag.sh`.



##########
releasey/libs/_constants.sh:
##########
@@ -0,0 +1,43 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+libs_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+# GPG constants
+KEYS_URL=${KEYS_URL:-"https://downloads.apache.org/incubator/polaris/KEYS"}
+KEYSERVER=${KEYSERVER:-"hkps://keyserver.ubuntu.com"}
+
+# Git/SVN repository constants
+APACHE_REMOTE_NAME=${APACHE_REMOTE_NAME:-"apache"}

Review Comment:
   Hm, the remote name is by default (Github workflows) `origin`.



##########
releasey/03-create-release-tag.sh:
##########
@@ -0,0 +1,150 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Create Release Tag Script
+#
+# Automates the "Create release tag" section of the release guide.

Review Comment:
   "release candidate", and some occurrences below



##########
releasey/06-build-and-stage-docker-images.sh:
##########
@@ -0,0 +1,137 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Build and Stage Docker Images Script
+#
+# Builds and publishes multi-platform Docker images to DockerHub for release 
candidates.
+# This script automates the "Build and staging Docker images" step from the 
release guide.
+#
+
+set -euo pipefail
+
+releases_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+libs_dir="${releases_dir}/libs"
+
+source "${libs_dir}/_log.sh"
+source "${libs_dir}/_constants.sh"
+source "${libs_dir}/_exec.sh"
+source "${libs_dir}/_files.sh"
+
+function usage() {
+  cat << EOF
+$(basename "$0") [--help | -h]
+
+  Builds and publishes multi-platform Docker images to DockerHub for release 
candidates.
+  The version is automatically determined from the current git tag. I.e. this 
script must
+  be run from a release tag.
+
+  Prerequisites:
+    - Docker with buildx support must be installed and configured
+    - DockerHub credentials must be configured (docker login)
+    - Must be run from a release tag (apache-polaris-x.y.z-incubating-rcN)
+
+  Options:
+    -h --help
+        Print usage information.
+
+  Examples:
+    $(basename "$0")
+
+EOF
+}
+
+ensure_cwd_is_project_root
+
+while [[ $# -gt 0 ]]; do
+  case $1 in
+    --help|-h)
+      usage
+      exit 0
+      ;;
+    *)
+      print_error "Unknown option/argument $1"
+      usage >&2
+      exit 1
+      ;;
+  esac
+done
+
+# Determine version from current git tag
+print_info "Determining version from current git tag..."
+
+if ! git_tag=$(git describe --tags --exact-match HEAD 2>/dev/null); then
+  print_error "Current HEAD is not on a release tag. Please checkout a release 
tag first."
+  print_error "Use: git checkout apache-polaris-x.y.z-incubating-rcN"
+  exit 1
+fi
+print_info "Found git tag: ${git_tag}"
+
+# Extract version components from git tag in one regex match
+git_tag_regex="^apache-polaris-([0-9]+)\.([0-9]+)\.([0-9]+)-incubating-rc([0-9]+)$"
+if [[ ! ${git_tag} =~ ${git_tag_regex} ]]; then
+  print_error "Invalid git tag format: ${git_tag}"
+  print_error "Expected format: apache-polaris-x.y.z-incubating-rcN"
+  exit 1
+fi
+
+# Extract version components from regex match

Review Comment:
   Looks identical to what's in `05-...`. Worth unifying?



##########
releasey/libs/_files.sh:
##########
@@ -0,0 +1,50 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Utility function for version.txt manipulation
+#
+
+libs_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+source "$libs_dir/_constants.sh"
+source "$libs_dir/_log.sh"
+
+function update_version {
+  local version="$1"
+  # This function is only there for dry-run support.  Because of the
+  # redirection, we cannot use exec_process with the exact command that will be
+  # executed.
+  if [[ ${DRY_RUN:-1} -ne 1 ]]; then
+    exec_process echo ${version} >$VERSION_FILE
+  else
+    exec_process "echo ${version} > $VERSION_FILE"
+  fi
+}
+
+function ensure_cwd_is_project_root() {
+  # This function verifies that the script is executed from the project root
+  # directory and that the gradle wrapper script is present.
+  if [[ ! -f "gradlew" ]] || [[ ! -d ".git" ]]; then

Review Comment:
   `.git` doesn't need to be a directory, it's a file for Git worktrees.



##########
releasey/04-build-and-test.sh:
##########
@@ -0,0 +1,118 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Build and Test Script
+#
+# Builds Polaris completely and runs regression tests to verify the release.
+# Cloud-specific tests are disabled by default and require proper credentials
+# to be configured in the environment.
+#
+
+set -euo pipefail
+
+releases_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+libs_dir="${releases_dir}/libs"
+
+source "${libs_dir}/_log.sh"
+source "${libs_dir}/_constants.sh"
+source "${libs_dir}/_exec.sh"
+source "${libs_dir}/_files.sh"
+
+function usage() {
+  cat << EOF
+$(basename "$0") [--help | -h]
+
+  Builds Polaris completely and runs regression tests to verify the release.
+
+  Options:
+    -h --help
+        Print usage information.
+
+  Examples:
+    $(basename "$0")
+
+EOF
+}
+
+ensure_cwd_is_project_root
+
+while [[ $# -gt 0 ]]; do
+  case $1 in
+    --help|-h)
+      usage
+      exit 0
+      ;;
+    *)
+      print_error "Unknown option/argument $1"
+      usage >&2
+      exit 1
+      ;;
+  esac
+done
+
+print_info "Starting build and test process..."
+echo
+
+# Clean and build Polaris
+print_info "Building Polaris..."
+exec_process ./gradlew clean build

Review Comment:
   Note: you need neither the `gradlew clean` nor the `git clean...` in GH 
workflows.



##########
releasey/libs/_nexus.sh:
##########
@@ -0,0 +1,96 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Maven/Gradle Credentials Verification Script
+#
+# This script verifies that Maven/Gradle credentials are properly configured 
for Apache Polaris releases:
+# 1. Checks if Apache credentials are configured in ~/.gradle/gradle.properties
+# 2. Checks if Apache credentials are configured via environment variables
+# 3. Validates that at least one method is configured
+# 4. Attempts to verify credentials against Apache Nexus repository
+#
+# Returns non-zero exit code if any verification fails.
+#
+
+set -euo pipefail
+
+libs_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+
+# Source common logging functions and constants
+source "${libs_dir}/_log.sh"
+source "${libs_dir}/_constants.sh"
+source "${libs_dir}/_exec.sh"
+
+function check_apache_credentials_are_set_in_gradle_properties() {
+  # Check if Apache credentials are configured in ~/.gradle/gradle.properties, 
return non-zero if not
+  print_info "Checking for Apache credentials in ${GRADLE_PROPERTIES_FILE}..."
+
+  if [[ ! -f "${GRADLE_PROPERTIES_FILE}" ]]; then
+    print_warning "Gradle properties file not found: ${GRADLE_PROPERTIES_FILE}"
+    return 1
+  fi
+
+  if grep -q "^apacheUsername=" "${GRADLE_PROPERTIES_FILE}" 2>/dev/null &&
+     grep -q "^apachePassword=" "${GRADLE_PROPERTIES_FILE}" 2>/dev/null; then

Review Comment:
   Actually, you should not put clear text credentials in a plain text file 
(`~/.gradle/gradle.properties`).
   
   In CI we'd have environment variables populated from GitHub secrets.



##########
releasey/04-build-and-test.sh:
##########
@@ -0,0 +1,118 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Build and Test Script
+#
+# Builds Polaris completely and runs regression tests to verify the release.
+# Cloud-specific tests are disabled by default and require proper credentials
+# to be configured in the environment.
+#
+
+set -euo pipefail
+
+releases_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+libs_dir="${releases_dir}/libs"
+
+source "${libs_dir}/_log.sh"
+source "${libs_dir}/_constants.sh"
+source "${libs_dir}/_exec.sh"
+source "${libs_dir}/_files.sh"
+
+function usage() {
+  cat << EOF
+$(basename "$0") [--help | -h]
+
+  Builds Polaris completely and runs regression tests to verify the release.
+
+  Options:
+    -h --help
+        Print usage information.
+
+  Examples:
+    $(basename "$0")
+
+EOF
+}
+
+ensure_cwd_is_project_root
+
+while [[ $# -gt 0 ]]; do
+  case $1 in
+    --help|-h)
+      usage
+      exit 0
+      ;;
+    *)
+      print_error "Unknown option/argument $1"
+      usage >&2
+      exit 1
+      ;;
+  esac
+done
+
+print_info "Starting build and test process..."
+echo
+
+# Clean and build Polaris
+print_info "Building Polaris..."
+exec_process ./gradlew clean build

Review Comment:
   If you want a really clean working directory, you'd need the `git clean 
-xdf` hammer.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to