Skip to content

Commit

Permalink
[GHAction] Reorder Deploy L2 jobs (#1758)
Browse files Browse the repository at this point in the history
Reorder Deploy L2 jobs, loadbalancer must follow check-obscuro-is-healthy
  • Loading branch information
anixon604 authored Jan 26, 2024
2 parents 0789f26 + 0501a2c commit 26d7db4
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 32 deletions.
58 changes: 28 additions & 30 deletions .github/workflows/manual-deploy-testnet-l2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,36 +251,6 @@ jobs:
-l1_chain_id=${{ vars.L1_CHAIN_ID }} \
start'
update-loadbalancer:
needs:
- build
- deploy
runs-on: ubuntu-latest
environment:
name: ${{ github.event.inputs.testnet_type }}
steps:
- uses: actions/checkout@v3

- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: 'Remove existing backend nodes from the load balancer'
run: ./.github/workflows/runner-scripts/testnet-clear-loadbalancer.sh ${{ github.event.inputs.testnet_type }}

- name: 'Add load balancer address pool to the IP configuration'
uses: azure/CLI@v1
with:
inlineScript: |
az network nic ip-config address-pool add \
--address-pool ${{ github.event.inputs.testnet_type }}-backend-pool \
--ip-config-name ipconfig${{ vars.AZURE_RESOURCE_PREFIX }}-1-${{ GITHUB.RUN_NUMBER }} \
--nic-name ${{ vars.AZURE_RESOURCE_PREFIX }}-1-${{ GITHUB.RUN_NUMBER }}VMNic \
--resource-group Testnet \
--lb-name ${{ github.event.inputs.testnet_type }}-loadbalancer
check-obscuro-is-healthy:
needs:
- build
Expand Down Expand Up @@ -337,6 +307,34 @@ jobs:
deploy-l2-contracts.out
retention-days: 7

update-loadbalancer:
needs:
- check-obscuro-is-healthy
runs-on: ubuntu-latest
environment:
name: ${{ github.event.inputs.testnet_type }}
steps:
- uses: actions/checkout@v3

- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: 'Remove existing backend nodes from the load balancer'
run: ./.github/workflows/runner-scripts/testnet-clear-loadbalancer.sh ${{ github.event.inputs.testnet_type }}

- name: 'Add load balancer address pool to the IP configuration'
uses: azure/CLI@v1
with:
inlineScript: |
az network nic ip-config address-pool add \
--address-pool ${{ github.event.inputs.testnet_type }}-backend-pool \
--ip-config-name ipconfig${{ vars.AZURE_RESOURCE_PREFIX }}-1-${{ GITHUB.RUN_NUMBER }} \
--nic-name ${{ vars.AZURE_RESOURCE_PREFIX }}-1-${{ GITHUB.RUN_NUMBER }}VMNic \
--resource-group Testnet \
--lb-name ${{ github.event.inputs.testnet_type }}-loadbalancer
deploy-faucet:
name: 'Trigger Faucet deployment for dev- / testnet on a new deployment'
uses: ./.github/workflows/manual-deploy-testnet-faucet.yml
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/manual-deploy-testnet-validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,7 @@ jobs:
#
# update-loadbalancer:
# needs:
# - build
# - deploy
# - check-obscuro-is-healthy
# runs-on: ubuntu-latest
# environment:
# name: ${{ github.event.inputs.testnet_type }}
Expand Down

0 comments on commit 26d7db4

Please sign in to comment.