Skip to content

Commit fb4d425

Browse files
committed
format/remove dust and document
1 parent 14ef727 commit fb4d425

File tree

2 files changed

+35
-3
lines changed

2 files changed

+35
-3
lines changed

buildkite/scripts/release/manager.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
#!/usr/bin/env bash
22

3+
# Mina Protocol Release Manager Script
4+
#
5+
# This script provides comprehensive release management functionality for the Mina Protocol project.
6+
# It handles the complete lifecycle of build artifacts including publishing, promotion, verification,
7+
# and maintenance of packages across different channels and platforms.
8+
#
9+
# Main capabilities:
10+
# - PUBLISH: Publish build artifacts from cache to Debian repositories and Docker registries
11+
# - PROMOTE: Promote artifacts from one channel/registry to another (e.g., unstable -> stable)
12+
# - VERIFY: Verify that artifacts are correctly published in target channels/registries
13+
# - FIX: Repair Debian repository manifests when needed
14+
# - PERSIST: Archive artifacts to long-term storage backends
15+
#
16+
# Supported artifacts: mina-daemon, mina-archive, mina-rosetta, mina-logproc
17+
# Supported networks: devnet, mainnet
18+
# Supported platforms: Debian (bullseye, focal), Docker (GCR, Docker.io)
19+
# Supported channels: unstable, alpha, beta, stable
20+
# Supported backends: Google Cloud Storage (gs), Hetzner, local filesystem
21+
#
22+
# Usage examples:
23+
# ./manager.sh publish --buildkite-build-id 12345 --source-version 1.0.0 --target-version 1.0.1 --channel stable
24+
# ./manager.sh promote --source-version 1.0.0 --target-version 1.0.1 --source-channel alpha --target-channel beta
25+
# ./manager.sh verify --version 1.0.1 --channel stable --artifacts mina-daemon,mina-archive
26+
#
27+
# For detailed help on any command, use: ./manager.sh [command] --help
28+
329
# bash strict mode
430
set -T # inherit DEBUG and RETURN trap for functions
531
set -C # prevent file overwrite by > &> <>

scripts/docker/verify.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/usr/bin/env bash
2-
set -x
2+
3+
# Verify that the Docker image for a given package and version is working correctly.
4+
# This script pulls the Docker image and runs a set of simplest commands (fetch help and version)
5+
# to ensure that the package dependencies are correctly resolved.
6+
# Usage: ./scripts/docker/verify.sh -p <package> -c <codename> [-s <suffix>] [-r <repo>] [-v <version>]
37

48
set -eo pipefail
59

@@ -27,7 +31,7 @@ esac
2731

2832
DOCKER_IMAGE="$REPO/$PACKAGE:$VERSION-${CODENAME}${SUFFIX}"
2933

30-
if ! docker pull $DOCKER_IMAGE ; then
34+
if ! docker pull "$DOCKER_IMAGE" ; then
3135
echo "❌ Docker verification for $CODENAME $PACKAGE failed"
3236
echo "❌ Please check if the image $DOCKER_IMAGE exists."
3337
exit 1
@@ -36,7 +40,9 @@ fi
3640
for APP in "${APPS[@]}"; do
3741
for COMMAND in "${COMMANDS[@]}"; do
3842
echo "📋 Testing $APP $COMMAND in $DOCKER_IMAGE"
39-
if ! docker run --entrypoint $APP --rm $DOCKER_IMAGE $COMMAND; then
43+
# Do not quote $COMMAND, because it may contain spaces or other special characters
44+
# shellcheck disable=SC2086
45+
if ! docker run --entrypoint "$APP" --rm "$DOCKER_IMAGE" $COMMAND; then
4046
echo "❌ KO: ERROR running $APP $COMMAND"
4147
exit 1
4248
fi

0 commit comments

Comments
 (0)