-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Set correct version of RPC & Sandbox when deploying tagged commit (
#1914) fixes #1892 Also add `get-node-info` command to CLI which fetches the AztecRPC information via `getNodeInfo()`
- Loading branch information
Showing
12 changed files
with
154 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/bash | ||
# | ||
# This script forces a build if we're in a deployment run, otherwise runs `build` as usual | ||
# | ||
# usage: ./deploy_force_build <repository> | ||
# example: ./deploy_force_build aztec-sandbox | ||
set -e | ||
|
||
REPOSITORY=$1 | ||
FORCE_BUILD=${2:-"false"} | ||
|
||
# if FORCE_BUILD is already set, just continue with it | ||
if [[ $FORCE_BUILD == 'true' ]]; then | ||
build $REPOSITORY true | ||
exit 0 | ||
fi | ||
|
||
# Check if there's a commit TAG | ||
if [[ -n "$COMMIT_TAG" ]]; then | ||
# Check if it's a repo-specific tag | ||
if [[ "$COMMIT_TAG" == *"/"* ]]; then | ||
REPO_NAME="${COMMIT_TAG%%/*}" | ||
COMMIT_TAG_VERSION="${COMMIT_TAG#*/}" | ||
echo "Tag was made for: $REPO_NAME" | ||
echo "Version: $COMMIT_TAG_VERSION" | ||
|
||
# Check if REPO_NAME is equal to REPOSITORY | ||
if [ "$REPO_NAME" != "$REPOSITORY" ]; then | ||
echo "REPO_NAME ($REPO_NAME) does not match REPOSITORY ($REPOSITORY). Ignoring..." | ||
COMMIT_TAG_VERSION="" | ||
fi | ||
else | ||
COMMIT_TAG_VERSION=$COMMIT_TAG | ||
fi | ||
|
||
# We are building a tagged commit. Check it's a valid semver. | ||
VERSION=$(npx semver $COMMIT_TAG_VERSION) | ||
if [ -z "$VERSION" ]; then | ||
# Not a version tag, build normally | ||
build $REPOSITORY | ||
else | ||
# Force build | ||
build $REPOSITORY true | ||
fi | ||
else | ||
# Not a tagged commit, build normally | ||
build $REPOSITORY | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,34 @@ | ||
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/yarn-project-base AS builder | ||
|
||
ARG DOCKER_TAG | ||
|
||
# Remove SRS files (currently not producing proofs) | ||
RUN rm -rf /usr/src/circuits/cpp/barretenberg/cpp/srs_db/ignition/monomial | ||
COPY . . | ||
|
||
# Update aztec-rpc version if DOCKER_TAG has been used | ||
WORKDIR /usr/src/yarn-project/aztec-rpc | ||
RUN if [[ -n "${DOCKER_TAG}" ]]; then \ | ||
jq --arg v ${DOCKER_TAG} '.version = $v' package.json > _temp && mv _temp package.json; \ | ||
fi | ||
|
||
WORKDIR /usr/src/yarn-project/aztec-sandbox | ||
RUN yarn build | ||
# && yarn formatting && yarn test | ||
RUN ls | ||
RUN if [[ -n "${DOCKER_TAG}" ]]; then \ | ||
jq --arg v ${DOCKER_TAG} '.version = $v' package.json > _temp && mv _temp package.json; \ | ||
fi | ||
|
||
RUN yarn build && yarn formatting && yarn test | ||
|
||
# Prune dev dependencies. See comment in base image. | ||
RUN yarn cache clean | ||
RUN yarn workspaces focus --production > /dev/null | ||
|
||
FROM node:18-alpine | ||
|
||
COPY --from=builder /usr/src/ /usr/src/ | ||
WORKDIR /usr/src/yarn-project/aztec-sandbox | ||
|
||
ENTRYPOINT ["yarn"] | ||
CMD [ "start" ] | ||
EXPOSE 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters