Fix process (#10571)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov
2026-02-28 20:11:26 +05:00
committed by GitHub
parent c3758432bf
commit c1b8e77e16
9 changed files with 153 additions and 45 deletions
+24
View File
@@ -247,6 +247,14 @@
"safeForSimultaneousRushProcesses": true,
"shellCommand": "./common/scripts/docker.sh"
},
{
"commandKind": "global",
"name": "docker:patch",
"summary": "Build and push docker images with a custom version",
"description": "Allows building and pushing docker images with a manually specified version tag. Usage: rush docker:patch --version <version> [rush-args]",
"safeForSimultaneousRushProcesses": true,
"shellCommand": "./common/scripts/docker_patch.sh"
},
{
"commandKind": "global",
"name": "docker-server",
@@ -424,6 +432,22 @@
"longName": "--branch",
"description": "Force formatting of branch",
"associatedCommands": ["fast-format"]
},
{
"parameterKind": "string",
"argumentName": "VERSION",
"required": false,
"longName": "--version",
"description": "The version tag to use for docker images",
"associatedCommands": ["docker:patch"]
},
{
"parameterKind": "string",
"argumentName": "PLATFORM",
"required": false,
"longName": "--platform",
"description": "The target platform for docker build (e.g., linux/amd64). Defaults to linux/amd64.",
"associatedCommands": ["docker:patch"]
}
// {
// /**
+1 -1
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
version=$(git rev-parse HEAD)
version=${DOCKER_VERSION:-$(git rev-parse HEAD)}
# Check for cleanup flag from environment
cleanup=false
+44
View File
@@ -0,0 +1,44 @@
#!/usr/bin/env bash
# This script allows building and pushing docker images with a custom version tag.
# It can be run interactively or with the --version flag.
VERSION=""
PLATFORM="linux/amd64"
REMAINING_ARGS=()
while [[ $# -gt 0 ]]; do
case $1 in
--version)
VERSION="$2"
shift 2
;;
--platform)
PLATFORM="$2"
shift 2
;;
*)
REMAINING_ARGS+=("$1")
shift
;;
esac
done
if [ -z "$VERSION" ]; then
read -p "Enter version tag for docker images: " VERSION
fi
if [ -z "$VERSION" ]; then
echo "Error: Version tag is required."
exit 1
fi
export DOCKER_VERSION="$VERSION"
export DOCKER_EXTRA="--platform=$PLATFORM"
echo "Starting docker build and push for version: $DOCKER_VERSION ($PLATFORM)"
# We use 'node common/scripts/install-run-rush.js' to ensure we use the right rush version
node "$(dirname "$0")/install-run-rush.js" docker:build "${REMAINING_ARGS[@]}"
node "$(dirname "$0")/install-run-rush.js" docker:push "${REMAINING_ARGS[@]}"
echo "Docker patch completed for version: $DOCKER_VERSION"
+1 -1
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
version=$(git describe --tags --abbrev=0)
version=${DOCKER_VERSION:-$(git describe --tags --abbrev=0)}
rev_version=$(git rev-parse HEAD)
if [ "x$2" = "xstaging" ]