Skip to content

Commit

Permalink
Revert deployment pipeline to previous dispatch setup (PR #1517)
Browse files Browse the repository at this point in the history
  • Loading branch information
NetherBob authored Dec 5, 2023
1 parent 4ef39fd commit 3ec3bce
Showing 1 changed file with 62 additions and 30 deletions.
92 changes: 62 additions & 30 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,31 @@ jobs:
platforms: 'linux/amd64'
push: true
tags: nethermindeth/juno:${{ env.DOCKER_IMAGE_TAG }}


deploy_to_dev:
permissions:
id-token: write
contents: write
needs: [docker_build_and_publish]
uses: NethermindEth/argo/.github/workflows/TagAndDeploy.yml@juno_main
with:
environment: Development
IMAGE_TAG: ${{ needs.docker_build_and_publish.outputs.IMAGE_TAG }}
GOERLI: apps/juno-dev/overlays/dev-goerli-1/config.yaml
INTEGRATION: apps/juno-dev/overlays/dev-integration/config.yaml
MAINNET: apps/juno-dev/overlays/dev-mainnet/config.yaml

runs-on: ubuntu-latest
environment:
name: Development
steps:
- name: Repository Dispatch Dev
env:
EVENT_NAME: juno-dev
IMAGE_TAG: ${{ needs.docker_build_and_publish.outputs.IMAGE_TAG }}
GOERLI: apps/juno-dev/overlays/dev-goerli-1/config.yaml
INTEGRATION: apps/juno-dev/overlays/dev-integration/config.yaml
MAINNET: apps/juno-dev/overlays/dev-mainnet/config.yaml
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token ${{ secrets.ACCESS_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/NethermindEth/argo/dispatches \
-d '{"event_type": "${{ env.EVENT_NAME }}", "client_payload":{"name": "${{ env.EVENT_NAME }}", "goerli_config": "${{ env.GOERLI }}", "integration_config": "${{ env.INTEGRATION }}", "mainnet_config": "${{ env.MAINNET }}", "tag": "${{ env.IMAGE_TAG }}"}}'
dev-starknet-rs-tests:
needs: [deploy_to_dev]
uses: ./.github/workflows/starknet-rs-tests.yml
Expand All @@ -71,16 +84,25 @@ jobs:

deploy_to_staging:
needs: [docker_build_and_publish, deploy_to_dev]
uses: NethermindEth/argo/.github/workflows/TagAndDeploy.yml@juno_main
with:
environment: Staging
IMAGE_TAG: ${{ needs.docker_build_and_publish.outputs.IMAGE_TAG }}
GOERLI: apps/juno-staging/overlays/staging-goerli-1/config.yaml
INTEGRATION: apps/juno-staging/overlays/staging-integration/config.yaml
MAINNET: apps/juno-staging/overlays/staging-mainnet/config.yaml
SEPOLIA: apps/juno-staging/overlays/staging-sepolia/config.yaml
SEPOLIA-INTEGRATION: apps/juno-staging/overlays/staging-sepolia-integration/config.yaml

runs-on: ubuntu-latest
environment:
name: Staging
steps:
- name: Repository Dispatch Staging
env:
EVENT_NAME: juno-staging
IMAGE_TAG: ${{ needs.docker_build_and_publish.outputs.IMAGE_TAG }}
GOERLI: apps/juno-staging/overlays/staging-goerli-1/config.yaml
INTEGRATION: apps/juno-staging/overlays/staging-integration/config.yaml
MAINNET: apps/juno-staging/overlays/staging-mainnet/config.yaml
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token ${{ secrets.ACCESS_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/NethermindEth/argo/dispatches \
-d '{"event_type": "${{ env.EVENT_NAME }}", "client_payload":{"name": "${{ env.EVENT_NAME }}", "goerli_config": "${{ env.GOERLI }}", "integration_config": "${{ env.INTEGRATION }}", "mainnet_config": "${{ env.MAINNET }}", "tag": "${{ env.IMAGE_TAG }}"}}'
staging-starknet-rs-tests:
needs: [deploy_to_staging]
uses: ./.github/workflows/starknet-rs-tests.yml
Expand All @@ -97,16 +119,26 @@ jobs:

deploy_to_production:
needs: [docker_build_and_publish, deploy_to_staging]
uses: NethermindEth/argo/.github/workflows/TagAndDeploy.yml@juno_main
with:
environment: Production
IMAGE_TAG: ${{ needs.docker_build_and_publish.outputs.IMAGE_TAG }}
GOERLI: apps/juno-prod/overlays/prod-goerli-1/config.yaml
INTEGRATION: apps/juno-prod/overlays/prod-integration/config.yaml
MAINNET: apps/juno-prod/overlays/prod-mainnet/config.yaml
SEPOLIA: apps/juno-staging/overlays/prod-sepolia/config.yaml
SEPOLIA-INTEGRATION: apps/juno-staging/overlays/prod-sepolia-integration/config.yaml

runs-on: ubuntu-latest
environment:
name: Production
steps:
- name: Repository Dispatch Prod
env:
EVENT_NAME: juno-prod
IMAGE_TAG: ${{ needs.docker_build_and_publish.outputs.IMAGE_TAG }}
GOERLI: apps/juno-prod/overlays/prod-goerli-1/config.yaml
INTEGRATION: apps/juno-prod/overlays/prod-integration/config.yaml
MAINNET: apps/juno-prod/overlays/prod-mainnet/config.yaml
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token ${{ secrets.ACCESS_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/NethermindEth/argo/dispatches \
-d '{"event_type": "${{ env.EVENT_NAME }}", "client_payload":{"name": "${{ env.EVENT_NAME }}", "goerli_config": "${{ env.GOERLI }}", "integration_config": "${{ env.INTEGRATION }}", "mainnet_config": "${{ env.MAINNET }}", "tag": "${{ env.IMAGE_TAG }}"}}'
prod-starknet-rs-tests:
needs: [deploy_to_production]
uses: ./.github/workflows/starknet-rs-tests.yml
Expand All @@ -119,4 +151,4 @@ jobs:
secrets:
TEST_RPC_URL: ${{ secrets.PROD_GOERLI_URL }}/v0_5
TEST_ACCOUNT_ADDRESS: ${{ secrets.GOERLI_TEST_ACCOUNT_ADDRESS }}
TEST_ACCOUNT_PRIVATE_KEY: ${{ secrets.GOERLI_TEST_ACCOUNT_PRIVATE_KEY }}
TEST_ACCOUNT_PRIVATE_KEY: ${{ secrets.GOERLI_TEST_ACCOUNT_PRIVATE_KEY }}

0 comments on commit 3ec3bce

Please sign in to comment.