From 00f1065ebc674c705cadabfa5fc1b5a314ec1ddb Mon Sep 17 00:00:00 2001 From: Gerald Iakobinyi-Pich Date: Tue, 23 Aug 2022 15:54:30 +0000 Subject: [PATCH 1/3] feat(infra): gh action for deploying ceramic to production --- .../workflows/ceramic-promote-production.yml | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/ceramic-promote-production.yml diff --git a/.github/workflows/ceramic-promote-production.yml b/.github/workflows/ceramic-promote-production.yml new file mode 100644 index 0000000000..a1a4864dec --- /dev/null +++ b/.github/workflows/ceramic-promote-production.yml @@ -0,0 +1,40 @@ +name: Deploy Ceramic Node to Production + +on: + workflow_dispatch: + inputs: + commit: + description: "Commit ref" + required: true + type: string + +jobs: + deploy-production: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Use Node.js + uses: actions/setup-node@v2 + with: + cache: "yarn" + cache-dependency-path: infra/ceramic-mainnet/package-lock.json + # Update the pulumi stack with new image + - run: | + npm install + pulumi stack select -c gitcoin/ceramic/mainnet-node + pulumi config -s gitcoin/ceramic/mainnet-node set aws:region us-east-1 --non-interactive + working-directory: infra/ceramic-mainnet + env: + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + - uses: pulumi/actions@v3 + id: pulumi + with: + command: up + stack-name: gitcoin/ceramic/mainnet-node + + upsert: false + work-dir: infra/ceramic-mainnet + env: + ROUTE_53_ZONE: ${{ secrets.ROUTE53_ZONE_ID_PRODUCTION }} + DOMAIN: passport-iam.gitcoin.co + RPC_URL: ${{ MAINNET_RPC_URL }} From e9a58b5139e18fefe253145ef7d76ae9bff604ce Mon Sep 17 00:00:00 2001 From: Gerald Iakobinyi-Pich Date: Wed, 24 Aug 2022 12:39:47 +0000 Subject: [PATCH 2/3] feat(infra): gh action for deploying ceramic to production & staging - reworked the workflow for provisioning the ceramic staging environment --- .github/workflows/ceramic-promote-production.yml | 2 +- ...ic-testnet-node.yml => ceramic-promote-staging.yml} | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) rename .github/workflows/{deploy-ceramic-testnet-node.yml => ceramic-promote-staging.yml} (77%) diff --git a/.github/workflows/ceramic-promote-production.yml b/.github/workflows/ceramic-promote-production.yml index a1a4864dec..a4eff65117 100644 --- a/.github/workflows/ceramic-promote-production.yml +++ b/.github/workflows/ceramic-promote-production.yml @@ -36,5 +36,5 @@ jobs: work-dir: infra/ceramic-mainnet env: ROUTE_53_ZONE: ${{ secrets.ROUTE53_ZONE_ID_PRODUCTION }} - DOMAIN: passport-iam.gitcoin.co + DOMAIN: ${{ secrets.DOMAIN }} RPC_URL: ${{ MAINNET_RPC_URL }} diff --git a/.github/workflows/deploy-ceramic-testnet-node.yml b/.github/workflows/ceramic-promote-staging.yml similarity index 77% rename from .github/workflows/deploy-ceramic-testnet-node.yml rename to .github/workflows/ceramic-promote-staging.yml index 0d331db418..49f17e0585 100644 --- a/.github/workflows/deploy-ceramic-testnet-node.yml +++ b/.github/workflows/ceramic-promote-staging.yml @@ -2,6 +2,11 @@ name: Deploy Ceramic Testnet Node on: workflow_dispatch: + inputs: + commit: + description: "Commit ref" + required: true + type: string jobs: deploy-ceramic-testnet: @@ -29,8 +34,5 @@ jobs: upsert: false work-dir: infra/ceramic-testnet env: - PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_STAGING }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_STAGING }} - ROUTE_53_ZONE: ${{ secrets.ROUTE53_ZONE_ID_STAGING }} + ROUTE_53_ZONE: ${{ secrets.ROUTE53_ZONE_ID_PRODUCTION }} DOMAIN: ${{ secrets.DOMAIN }} From a4352b109eda2f23e35ce468f4ee285783171336 Mon Sep 17 00:00:00 2001 From: Gerald Iakobinyi-Pich Date: Wed, 24 Aug 2022 12:42:48 +0000 Subject: [PATCH 3/3] feat(infra): renaming gh action to deploy ceramic to production --- .github/workflows/ceramic-promote-production.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ceramic-promote-production.yml b/.github/workflows/ceramic-promote-production.yml index a4eff65117..e0e130f231 100644 --- a/.github/workflows/ceramic-promote-production.yml +++ b/.github/workflows/ceramic-promote-production.yml @@ -1,4 +1,4 @@ -name: Deploy Ceramic Node to Production +name: Deploy Ceramic Mainnet Node on: workflow_dispatch: