-
Notifications
You must be signed in to change notification settings - Fork 13
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 #2158 from eseiker/thor-toolchain
Add thor to github workflows and scripts
- Loading branch information
Showing
16 changed files
with
132 additions
and
108 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,12 +8,13 @@ on: | |
default: 'odin' | ||
type: choice | ||
options: | ||
- internal-all | ||
- odin | ||
- heimdall | ||
- thor | ||
- preview-all | ||
- odin-preview | ||
- heimdall-preview | ||
- internal-all | ||
- preview-all | ||
|
||
concurrency: | ||
group: release | ||
|
@@ -51,6 +52,22 @@ jobs: | |
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} | ||
|
||
release-thor: | ||
if: ${{ github.event.inputs.chain == 'thor' || github.event.inputs.chain == 'internal-all' }} | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: internal | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: reset internal snapshot | ||
run: | | ||
echo "y" | bash .github/scripts/reset-snapshot.sh thor | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} | ||
|
||
release-odin-preview: | ||
if: ${{ github.event.inputs.chain == 'odin-preview' || github.event.inputs.chain == 'preview-all' }} | ||
runs-on: ubuntu-latest | ||
|
@@ -83,7 +100,7 @@ jobs: | |
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} | ||
|
||
reset-bridge-service: | ||
reset-bridge-service-heimdall: | ||
if: ${{ github.event.inputs.chain == 'internal-all' || github.event.inputs.chain == 'odin' || github.event.inputs.chain == 'heimdall' }} | ||
runs-on: ubuntu-latest | ||
needs: [release-odin, release-heimdall] | ||
|
@@ -128,6 +145,51 @@ jobs: | |
env: | ||
GITHUB_TOKEN: ${{ secrets.P_GITHUB_TOKEN }} | ||
|
||
reset-bridge-service-thor: | ||
if: ${{ github.event.inputs.chain == 'internal-all' || github.event.inputs.chain == 'odin' || github.event.inputs.chain == 'thor' }} | ||
runs-on: ubuntu-latest | ||
needs: [release-odin, release-thor] | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
- name: Set up kubectl | ||
uses: azure/setup-kubectl@v1 | ||
with: | ||
version: 'v1.29.0' | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y jq | ||
- uses: actions-hub/kubectl@master | ||
env: | ||
KUBE_CONFIG: ${{ secrets.KUBECONFIG }} | ||
with: | ||
args: scale --replicas=0 statefulset/bridge-service -n thor | ||
- uses: actions-hub/kubectl@master | ||
env: | ||
KUBE_CONFIG: ${{ secrets.KUBECONFIG }} | ||
with: | ||
args: scale --replicas=0 statefulset/bridge-service-db -n thor | ||
- uses: actions-hub/kubectl@master | ||
env: | ||
KUBE_CONFIG: ${{ secrets.KUBECONFIG }} | ||
with: | ||
args: delete pvc/bridge-service-db-data-bridge-service-db-0 --namespace=thor | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: 3.10.13 | ||
- run: | | ||
python -m pip install -r requirements.txt | ||
flit install | ||
name: install dependencies | ||
working-directory: ./scripts | ||
- name: Update 'bridgeService.rdb.defaultStartBlockIndex' | ||
run: | | ||
python cli.py update-bridge-service 9c-internal thor | ||
working-directory: ./scripts | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.P_GITHUB_TOKEN }} | ||
|
||
reset-bridge-service-preview: | ||
if: ${{ github.event.inputs.chain == 'preview-all' || github.event.inputs.chain == 'odin-preview' || github.event.inputs.chain == 'heimdall-preview' }} | ||
runs-on: ubuntu-latest | ||
|
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 was deleted.
Oops, something went wrong.
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.