Skip to content

Commit

Permalink
Feature: Align rollup-testnet environment naming MGX-944 (#691)
Browse files Browse the repository at this point in the history
  • Loading branch information
tenequm authored Feb 14, 2024
1 parent 21e135d commit 5c9f0eb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/branch-eth-rollup-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ jobs:
skipBuild: 'false'
globalVersion: ${{ needs.init.outputs.GLOBAL_VERSION }}

deploy-eigen-mococo:
name: Deploy to eigen-mococo on merge to `eth-rollup-develop` branch
deploy-rollup-testnet:
name: Deploy to rollup-testnet on merge to `eth-rollup-develop` branch
needs: [init, build-and-test]
if: startsWith(github.head_ref, 'eth-rollup-develop')
uses: ./.github/workflows/reusable-deploy-eigen-mococo.yml
uses: ./.github/workflows/reusable-deploy-rollup-testnet.yml
secrets: inherit
with:
version: ${{ needs.init.outputs.GLOBAL_VERSION }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy mangata-node to `eigen-mococo`
name: Deploy mangata-node to `rollup-testnet`

on:
workflow_dispatch:
Expand All @@ -14,12 +14,12 @@ on:
required: true
type: string

concurrency: eigen-mococo-environment
concurrency: rollup-testnet-environment

jobs:
deploy-eigen-mococo:
deploy-rollup-testnet:
runs-on: ubuntu-latest
environment: eigen-mococo
environment: rollup-testnet
env:
GH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
steps:
Expand All @@ -30,29 +30,27 @@ jobs:
uses: actions/checkout@v4
with:
repository: mangata-finance/gitops
# TODO: Has to be changed to main once everything will be checked
ref: feat/deploy-eigen-layer-collators-env-MGX-878
# ref: main
ref: main
token: ${{ secrets.BOT_GITHUB_TOKEN }}

- name: Push updated version to `gitops` repository
id: version
run: |
echo -n '${{ inputs.version }}' > helmfiles/eigen-mococo/.version
echo -n '${{ inputs.version }}' > helmfiles/rollup-testnet/.version
git config user.name mangatafinance
git config user.email [email protected]
git add .
git commit -m 'chore: deploy ${{ inputs.version }} to eigen-mococo environment' || \
git commit -m 'chore: deploy ${{ inputs.version }} to rollup-testnet environment' || \
echo "changed=false" >> $GITHUB_OUTPUT
git push
- name: Watch deployment workflow run
run: |
# Rerun previous workflow if version didn't change
[ -n '${{ steps.version.outputs.changed }}' ] && gh run rerun $(gh run list -w deploy-eigen-mococo.yml -L1 --json databaseId --jq '.[].databaseId')
[ -n '${{ steps.version.outputs.changed }}' ] && gh run rerun $(gh run list -w deploy-rollup-testnet.yml -L1 --json databaseId --jq '.[].databaseId')
sleep 5 && gh run list -L10 -w deploy-eigen-mococo.yml
export RUN_ID=$(gh run list -w deploy-eigen-mococo.yml -L1 --json databaseId --jq '.[].databaseId')
sleep 5 && gh run list -L10 -w deploy-rollup-testnet.yml
export RUN_ID=$(gh run list -w deploy-rollup-testnet.yml -L1 --json databaseId --jq '.[].databaseId')
if [[ ($(gh run view "$RUN_ID" --json headSha --jq '.headSha') != $(git rev-parse HEAD)) && -z '${{ steps.version.outputs.changed }}' ]]; then
echo "Commited git SHA doesn't match with the SHA of the retrieved Run ID"
Expand Down

0 comments on commit 5c9f0eb

Please sign in to comment.