Skip to content

Commit 930557b

Browse files
authored
deploy-validator.sh uses release images. (#3107)
## Motivation The existing `deploy_validator.sh` script uses `linera:$BRANCH_NAME` tag. Our existing CI machinery tags every image with the branch name - indicating that it is the latest commit for that branch. More granular control is required on which images are used for release, which is why we're adding the `release` suffix. ## Proposal Add the `_release` suffix to the image tag. ## Test plan Tested manually.
1 parent 31e2180 commit 930557b

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

scripts/deploy-validator.sh

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,11 @@ docker_compose_plugin_installed() {
1414
docker compose version >/dev/null 2>&1
1515
}
1616

17-
if ! command_exists cargo; then
18-
echo "Error: Cargo is not installed. Please install Cargo (Rust) before running this script."
19-
exit 1
20-
fi
21-
2217
if ! command_exists docker; then
2318
echo "Error: Docker is not installed. Please install Docker before running this script."
2419
exit 1
2520
fi
2621

27-
if ! command_exists protoc; then
28-
echo "Error: Protoc is not installed. Please refer to the Linera documentation for installation instructions."
29-
exit 1
30-
fi
31-
3222
if ! docker_compose_plugin_installed; then
3323
echo "Error: Docker Compose is not installed. Please install Docker Compose before running this script."
3424
exit 1
@@ -62,14 +52,12 @@ GENESIS_URL="https://storage.googleapis.com/linera-io-dev-public/$FORMATTED_BRAN
6252
VALIDATOR_CONFIG="docker/validator-config.toml"
6353
GENESIS_CONFIG="docker/genesis.json"
6454

65-
echo "Building Linera binaries"
66-
cargo install --locked --path linera-service
67-
6855
if [ -z "$REMOTE_IMAGE" ]; then
6956
echo "Building local image from commit $GIT_COMMIT..."
7057
docker build --build-arg git_commit="$GIT_COMMIT" -f docker/Dockerfile . -t linera
58+
export LINERA_IMAGE=linera
7159
else
72-
export LINERA_IMAGE="us-docker.pkg.dev/linera-io-dev/linera-public-registry/linera:$BRANCH_NAME"
60+
export LINERA_IMAGE="us-docker.pkg.dev/linera-io-dev/linera-public-registry/linera:${BRANCH_NAME}_release"
7361
echo "Using remote image $LINERA_IMAGE..."
7462
fi
7563

@@ -121,7 +109,7 @@ cd docker
121109

122110
# Generate validator keys
123111
echo "Generating validator keys..."
124-
PUBLIC_KEY=$(linera-server generate --validators validator-config.toml)
112+
PUBLIC_KEY=$(docker run --rm -v "$(pwd):/config" -w /config $LINERA_IMAGE /linera-server generate --validators validator-config.toml)
125113

126114
echo "Validator setup completed successfully."
127115
echo "Starting docker compose..."

0 commit comments

Comments
 (0)