yuqi1129 commented on code in PR #10233: URL: https://github.com/apache/gravitino/pull/10233#discussion_r2917828504
########## dev/release/publish_docker.sh: ########## @@ -0,0 +1,211 @@ +#!/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 publish Gravitino Docker images via GitHub Actions +# +# Usage: ./publish_docker.sh <tag|branch> --docker-version <version> [--trino-version <version>] [--dry-run] +# +# Arguments: +# <tag> A Git tag, typically a release candidate (e.g., v1.2.0-rc5). +# The tag must already exist locally or be fetched via: +# git fetch --tags origin +# <branch> A Git branch name (e.g., main, branch-1.2). The workflow will +# build from the latest commit on that branch. +# --docker-version <ver> Docker image version tag to publish (e.g., 1.2.0-rc5). Required. +# This is used as the image tag, independent of the Git tag/branch. +# --trino-version <ver> Trino version used for the playground image (e.g., 478). +# Defaults to 478. The playground image tag will be: +# <ver>-gravitino-<docker-version> +# --dry-run Print the workflow commands that would be triggered without +# actually running them. Useful for previewing before publishing. +# +# Examples: +# ./publish_docker.sh v1.2.0-rc5 --docker-version 1.2.0-rc5 --trino-version 478 --dry-run +# ./publish_docker.sh v1.2.0-rc5 --docker-version 1.2.0-rc5 --trino-version 478 +# +# Environment variables required (set in env file or shell profile): +# DOCKER_USERNAME - Docker Hub username +# PUBLISH_DOCKER_TOKEN - Docker Hub access token with push permission +# GH_TOKEN - GitHub personal access token with repo and workflow scopes +# +# This script triggers the docker-image.yml workflow for the following images: +# - apache/gravitino:<docker-version> +# - apache/gravitino-iceberg-rest-server:<docker-version> +# - apache/gravitino-lance-rest-server:<docker-version> +# - apache/gravitino-mcp-server:<docker-version> +# - apache/gravitino-playground:<trino-version>-gravitino-<docker-version> +# + +set -e + Review Comment: `gh` and `git` are required by this script, but there is no upfront dependency check. If either is missing, the script fails later with a less actionable error.\n\nCan we add a `command -v` precheck (same style as other scripts under `dev/release/`)? -- 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]
