-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ci): redeploy triggers #3677
Merged
Merged
Changes from 24 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
abc06c7
WIP fixing devnet redeploy triggers
spypsy 50b10fb
merge with master
spypsy b8b50b1
add dry_deploy capabilites to new script
spypsy 59ee799
redeploy l1-contracts
spypsy 8af11fe
use dry deploy on should_deploy [ci dry-deploy]
spypsy 8e53628
fixes [ci dry-deploy]
spypsy 36fae97
fix script file permissions
spypsy 2560ef3
[ci dry-deploy]
spypsy 6fcb3e5
export DRY_DEPLOY for use in setup_env [ci dry-deploy]
spypsy f7a8a36
no -auto-approve for tf plan
spypsy c2f62f1
[ci dry-deploy]
spypsy c53c46e
aztec-dev deploy tag on dry runs [ci dry-deploy]
spypsy 562a7f8
fix typo [ci dry-deploy]
spypsy 3f5f529
set DEPLOY_ENV to dev [ci dry-deploy]
spypsy c213ab3
fix deploy_tf_services args
spypsy 30a1a3f
add node/bootnode to build_manifest [ci dry-deploy]
spypsy 4928c54
script improvements [ci dry-deploy]
spypsy 63f3c58
extract PROJECT_NAME [ci dry-deploy]
spypsy 220c778
fix grep regex pattern [ci dry-deploy]
spypsy e100ede
Merge branch 'master' into spy/fix-redeploys
spypsy 3321ef5
[ci dry-deploy]
spypsy f8166f4
fix ecs naming + don't fail service script [ci dry-deploy]
spypsy d6c8f12
update TF_VARs
spypsy 3227d58
[ci dry-deploy]
spypsy ae135b3
add comments to new script
spypsy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env bash | ||
[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace | ||
set -eu | ||
|
||
PROJECT_DIR=$1 | ||
PROJECT_NAME=$(basename $PROJECT_DIR) | ||
CHECK_REBUILD_REPOSITORY=${2:-$PROJECT_NAME} | ||
SERVICE_NAMES=${3:-$PROJECT_NAME} | ||
TO_TAINT=${4:-} | ||
|
||
cd $PROJECT_DIR | ||
|
||
# Extract the repository name from the terraform directory. | ||
|
||
# Bail out if nothing changed. | ||
CONTENT_HASH=$(calculate_content_hash $CHECK_REBUILD_REPOSITORY) | ||
echo "Last successfully deployed commit: $CONTENT_HASH" | ||
if check_rebuild cache-$CONTENT_HASH-$DEPLOY_TAG-deployed $CHECK_REBUILD_REPOSITORY; then | ||
echo "No changes detected, skipping deployment." | ||
exit 0 | ||
fi | ||
|
||
deploy_terraform $PROJECT_NAME ./terraform/ "$TO_TAINT" | ||
|
||
# Restart services. | ||
for SERVICE in $SERVICE_NAMES; do | ||
deploy_service $SERVICE | ||
done | ||
|
||
# Tag the image as deployed. | ||
if [ "$DRY_DEPLOY" -eq 1 ]; then | ||
echo "DRY_DEPLOY: tag_remote_image $CHECK_REBUILD_REPOSITORY cache-$CONTENT_HASH cache-$CONTENT_HASH-$DEPLOY_TAG-deployed" | ||
else | ||
retry tag_remote_image $CHECK_REBUILD_REPOSITORY cache-$CONTENT_HASH cache-$CONTENT_HASH-$DEPLOY_TAG-deployed | ||
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# Append value to force redeploy | ||
1 | ||
3 |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forget but can't we specify all of the
TF_VAR
variables in CCI?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm so yes, these are CCI Env vars that get 'renamed' here for terraform. We could store these directly as
TF_VAR_$VAR
in CCI but not all of them as some are used in different scripts as well.I think for consistency it's better to have the regular names stored and convert what's needed for terraform