From 72131e5285a41004cd045209ee81bd8e0b07d127 Mon Sep 17 00:00:00 2001 From: Nicholas Molnar <65710+neekolas@users.noreply.github.com> Date: Wed, 18 Dec 2024 19:52:46 -0300 Subject: [PATCH] Deploy to testnet-staging (#337) ## tl;dr Auto deploy to testnet staging ## Summary by CodeRabbit - **Chores** - Updated the deployment workflow to change the Terraform workspace to `testnet-staging`. - Adjusted formatting for consistency in the variable declaration within the deployment workflow. - Changed dependency management command from `forge soldeer update` to `forge soldeer install` in multiple deployment scripts. --- .github/workflows/build-xmtpd.yml | 6 ++---- dev/contracts/deploy-ephemeral | 2 +- dev/contracts/deploy-local | 2 +- dev/contracts/deploy-testnet | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-xmtpd.yml b/.github/workflows/build-xmtpd.yml index 845efe91..2ff5e4ad 100644 --- a/.github/workflows/build-xmtpd.yml +++ b/.github/workflows/build-xmtpd.yml @@ -8,7 +8,6 @@ on: workflow_dispatch: jobs: - push_to_registry: strategy: matrix: @@ -70,7 +69,6 @@ jobs: id: set_xmtpd_digest run: echo "digest=${{ steps.push.outputs.digest }}" >> $GITHUB_OUTPUT - deploy: name: Deploy new images to infra runs-on: ubuntu-latest @@ -86,7 +84,7 @@ jobs: timeout: 45m terraform-token: ${{ secrets.TERRAFORM_TOKEN }} terraform-org: xmtp - terraform-workspace: testnet + terraform-workspace: testnet-staging variable-name: xmtpd_server_docker_image variable-value: "ghcr.io/xmtp/xmtpd@${{ needs.push_to_registry.outputs.xmtpd_digest }}" - variable-value-required-prefix: "ghcr.io/xmtp/xmtpd@sha256:" \ No newline at end of file + variable-value-required-prefix: "ghcr.io/xmtp/xmtpd@sha256:" diff --git a/dev/contracts/deploy-ephemeral b/dev/contracts/deploy-ephemeral index 74f9ce17..5bef356e 100755 --- a/dev/contracts/deploy-ephemeral +++ b/dev/contracts/deploy-ephemeral @@ -6,6 +6,6 @@ source dev/contracts/.env cd ./contracts # Update depencencies -forge soldeer update +forge soldeer install forge create --legacy --json --broadcast --rpc-url $DOCKER_RPC_URL --private-key $PRIVATE_KEY "$1:$2" \ No newline at end of file diff --git a/dev/contracts/deploy-local b/dev/contracts/deploy-local index daa455fb..ce778651 100755 --- a/dev/contracts/deploy-local +++ b/dev/contracts/deploy-local @@ -11,7 +11,7 @@ mkdir -p ./build cd ./contracts # Update depencencies -forge soldeer update +forge soldeer install # Deploy a contract and save the output (which includes the contract address) to a JSON file to be used in tests function deploy_contract() { diff --git a/dev/contracts/deploy-testnet b/dev/contracts/deploy-testnet index 97882a17..a0e98827 100755 --- a/dev/contracts/deploy-testnet +++ b/dev/contracts/deploy-testnet @@ -5,7 +5,7 @@ set -euo cd ./contracts # Update depencencies -forge soldeer update +forge soldeer install # Deploy the contract to the chain with the specified RPC URL and attempt to verify the SC code function deploy_contract() {