-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #2994 Closes #2998 Closes #2999 Closes #3130 - Create a pipeline to deploy not just our versioned releases, but all merges to `master` to Dockerhub, under `aztec-dev` tag - Run terraforms to deploy 2 aztec node instances, 2 p2p bootstrap nodes + a faucet - Deploys L1 contracts to our new mainnet fork. # Checklist: Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge. - [ ] If the pull request requires a cryptography review (e.g. cryptographic algorithm implementations) I have added the 'crypto' tag. - [ ] I have reviewed my diff in github, line by line and removed unexpected formatting changes, testing logs, or commented-out code. - [ ] Every change is related to the PR description. - [ ] I have [linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) this pull request to relevant issues (if any exist). --------- Co-authored-by: PhilWindle <60546371+PhilWindle@users.noreply.github.com> Co-authored-by: PhilWindle <philip.windle@gmail.com>
- Loading branch information
1 parent
8e9f103
commit 97c40c2
Showing
23 changed files
with
492 additions
and
666 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
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,7 +1,15 @@ | ||
#!/bin/bash | ||
# Retuns success if we are expected to do a deploy. | ||
# At present this is only if we have a commit tag. | ||
# Once we are doing master deployments to devnet, we'll want to check if BRANCH is master. | ||
# Returns success if we are expected to do a deployment. | ||
# This is if we have a commit tag (release) or if we're on `master` branch (devnet deployment). | ||
|
||
set -eu | ||
|
||
[ -n "$COMMIT_TAG" ] | ||
# This is when we only want to deploy on master, not release with new COMMIT_TAG. | ||
# Specifically for deploying devnet. | ||
RELEASE=${1:-1} | ||
|
||
if [ -n "$COMMIT_TAG" ] && [ "$RELEASE" != "0" ] || [ "$BRANCH" = "master" ]; then | ||
exit 0 | ||
else | ||
exit 1 | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,7 @@ lcov.info | |
.foundry | ||
|
||
# Yarn lockfile | ||
yarn.lock | ||
yarn.lock | ||
|
||
# 'deploy_contracts' script output | ||
serve/ |
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,28 @@ | ||
#!/bin/bash | ||
|
||
FORCE_DEPLOY=${2:-"false"} | ||
|
||
export ETHEREUM_HOST=$DEPLOY_TAG-mainnet-fork.aztec.network:8545/$API_KEY | ||
|
||
# If we have previously successful commit, we can early out if nothing relevant has changed since. | ||
if [[ $FORCE_DEPLOY == 'false' ]] && check_rebuild cache-"$CONTENT_HASH" $REPOSITORY; then | ||
echo "No contract deploy necessary." | ||
exit 0 | ||
fi | ||
|
||
mkdir -p serve | ||
# Contract addresses will be mounted in the serve directory | ||
docker run \ | ||
-v $(pwd)/serve:/usr/src/contracts/serve \ | ||
-e ETHEREUM_HOST=$ETHEREUM_HOST -e PRIVATE_KEY=$CONTRACT_PUBLISHER_PRIVATE_KEY \ | ||
aztecprotocol/l1-contracts:$DEPLOY_TAG \ | ||
./scripts/deploy_contracts.sh | ||
|
||
# Write the contract addresses as terraform variables | ||
for KEY in ROLLUP_CONTRACT_ADDRESS REGISTRY_CONTRACT_ADDRESS INBOX_CONTRACT_ADDRESS OUTBOX_CONTRACT_ADDRESS; do | ||
VALUE=$(jq -r .$KEY ./serve/contract_addresses.json) | ||
export TF_VAR_$KEY=$VALUE | ||
done | ||
|
||
# Write TF state variables | ||
deploy_terraform l1-contracts ./terraform |
Oops, something went wrong.