forked from ChainSafe/ChainBridge
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #159 from Cerebellum-Network/dev-cere
Sync Workflows: Dev, Stage, Enable and Disable Realyers
- Loading branch information
Showing
35 changed files
with
779 additions
and
160 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,26 +8,17 @@ on: | |
- dev-cere | ||
workflow_dispatch: | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
uses: Cerebellum-Network/reusable-workflows/.github/workflows/build-and-push-docker.yaml@1.0.0 | ||
uses: Cerebellum-Network/reusable-workflows/.github/workflows/deploy-to-ecr.yaml@master | ||
with: | ||
runs-on: '["self-hosted", "cere-network-large-workers"]' | ||
org: cerebellumnetwork | ||
runs-on: '["self-hosted", "cere-network-large"]' | ||
environment: dev | ||
image: crb-${{ github.event.repository.name }} | ||
repository: crb-${{ github.event.repository.name }} | ||
aws_account_id: ${{ vars.DEV_NETWORK_AWS_ACCOUNT_ID }} | ||
repository: network-relayer | ||
file: ./Dockerfile | ||
secrets: inherit | ||
|
||
deploy: | ||
uses: Cerebellum-Network/reusable-workflows/.github/workflows/[email protected] | ||
needs: build | ||
with: | ||
runs-on: '["self-hosted", "cere-network-dev-deployer"]' | ||
helm-repo-path: network/network-relayer | ||
helm-release: network-relayer | ||
namespace: network | ||
tag: ${{ needs.build.outputs.version }} | ||
environment: dev | ||
secrets: inherit |
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,25 @@ | ||
name: Disable Relayers | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
disable-relayers: | ||
runs-on: [ "self-hosted", "cere-network-prd-deployer" ] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Setup kubectl | ||
uses: azure/setup-kubectl@v1 | ||
with: | ||
version: ${{ secrets.KUBECTL_VERSION }} | ||
- name: Set replicas to 0 for relayers | ||
run: | | ||
# Get a list of network-relayers | ||
deployments=$(kubectl get deployment -n network | grep '^network-relayer' | awk '{print $1}') | ||
# Iterate over the deployments and scale each one to 0 replicas | ||
for deployment in $deployments; do | ||
kubectl scale deployment -n network --replicas=0 $deployment | ||
done | ||
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,25 @@ | ||
name: Enable Relayers | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
enable-relayers: | ||
runs-on: [ "self-hosted", "cere-network-prd-deployer" ] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Setup kubectl | ||
uses: azure/setup-kubectl@v1 | ||
with: | ||
version: ${{ secrets.KUBECTL_VERSION }} | ||
- name: Set replicas to 1 for relayers | ||
run: | | ||
# Get a list of network-relayers | ||
deployments=$(kubectl get deployment -n network | grep '^network-relayer' | awk '{print $1}') | ||
# Iterate over the deployments and scale each one to 1 replicas | ||
for deployment in $deployments; do | ||
kubectl scale deployment -n network --replicas=1 $deployment | ||
done | ||
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 |
---|---|---|
|
@@ -9,26 +9,17 @@ on: | |
- 'hotfix/**' | ||
workflow_dispatch: | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
uses: Cerebellum-Network/reusable-workflows/.github/workflows/build-and-push-docker.yaml@1.0.0 | ||
uses: Cerebellum-Network/reusable-workflows/.github/workflows/deploy-to-ecr.yaml@master | ||
with: | ||
runs-on: '["self-hosted", "cere-network-large-workers"]' | ||
org: cerebellumnetwork | ||
environment: stage | ||
image: crb-${{ github.event.repository.name }} | ||
repository: crb-${{ github.event.repository.name }} | ||
runs-on: '["self-hosted", "cere-network-large"]' | ||
environment: stg | ||
aws_account_id: ${{ vars.DEV_NETWORK_AWS_ACCOUNT_ID }} | ||
repository: network-relayer | ||
file: ./Dockerfile | ||
secrets: inherit | ||
|
||
deploy: | ||
uses: Cerebellum-Network/reusable-workflows/.github/workflows/[email protected] | ||
needs: build | ||
with: | ||
runs-on: '["self-hosted", "cere-network-stg-deployer"]' | ||
helm-repo-path: network/network-relayer | ||
helm-release: network-relayer | ||
namespace: network | ||
tag: ${{ needs.build.outputs.version }} | ||
environment: stage | ||
secrets: inherit |
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
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
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
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
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
Oops, something went wrong.