-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(guardian-prover-health-check-ui): switch to address routes inste…
…ad of id (#16846) Co-authored-by: jeff <113397187+cyberhorsey@users.noreply.github.com>
- Loading branch information
1 parent
00cf125
commit ece4374
Showing
14 changed files
with
145 additions
and
102 deletions.
There are no files selected for viewing
33 changes: 0 additions & 33 deletions
33
.github/workflows/guardian-prover-health-check-ui-preview.yml
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
.github/workflows/guardian-prover-health-check-ui-production.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Build and Deploy Guardians UI to Vercel | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
environment: | ||
type: string | ||
required: true | ||
flags: | ||
type: string | ||
required: true | ||
vercel_org_id: | ||
type: string | ||
required: true | ||
vercel_project_id: | ||
type: string | ||
required: true | ||
|
||
env: | ||
VERCEL_ORG_ID: ${{ inputs.vercel_org_id }} | ||
VERCEL_PROJECT_ID: ${{ inputs.vercel_project_id }} | ||
|
||
jobs: | ||
build-deploy: | ||
runs-on: [taiko-runner] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install pnpm dependencies | ||
uses: ./.github/actions/install-pnpm-dependencies | ||
|
||
- name: Install Vercel CLI | ||
run: pnpm add --global vercel@latest | ||
|
||
- name: Pull Vercel Environment Information | ||
run: vercel pull --yes --environment=${{ inputs.environment }} --token=${{ secrets.VERCEL_TOKEN }} | ||
|
||
- name: Build Project Artifacts | ||
run: vercel build ${{ inputs.flags }} --token=${{ secrets.VERCEL_TOKEN }} | ||
|
||
- name: Deploy Project Artifacts to Vercel | ||
run: vercel deploy --prebuilt ${{ inputs.flags }} --token=${{ secrets.VERCEL_TOKEN }} |
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,37 @@ | ||
name: Guardian UI CI/CD | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- release-please-* | ||
paths: | ||
- "packages/guardian-prover-health-check-ui/**" | ||
|
||
jobs: | ||
# Deployment name follow the pattern: deploy_<appname(bridge-ui)>_<network(devnet|hekla|mainnet)>_<environment(preview|production)> | ||
deploy_guardian-ui_hekla_preview: | ||
if: ${{ !github.ref_name == 'main' }} | ||
uses: ./.github/workflows/guardian-ui-deploy.yml | ||
with: | ||
environment: "preview" | ||
flags: "" | ||
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }} | ||
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_GUARDIAN_PROVER_HEALTH_CHECK_UI_HEKLA }} | ||
|
||
deploy_guardian-ui_devnet_preview: | ||
if: ${{ !github.ref_name == 'main' }} | ||
uses: ./.github/workflows/guardian-ui-deploy.yml | ||
with: | ||
environment: "preview" | ||
flags: "" | ||
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }} | ||
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_GUARDIAN_PROVER_HEALTH_CHECK_UI_INTERNAL }} | ||
|
||
deploy_guardian-ui_hekla_production: | ||
if: ${{ github.ref_name == 'main' && startsWith(github.ref, 'refs/tags/guardian-prover-health-check-ui-') }} | ||
uses: ./.github/workflows/guardian-ui-deploy.yml | ||
with: | ||
environment: "production" | ||
flags: "--prod" | ||
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }} | ||
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_GUARDIAN_PROVER_HEALTH_CHECK_UI_HEKLA }} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export const configuredNetworks = ['hekla', 'devnet'] |
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
22 changes: 13 additions & 9 deletions
22
packages/guardian-prover-health-check-ui/src/lib/guardianProver/loadConfiguredGuardians.ts
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 |
---|---|---|
@@ -1,11 +1,15 @@ | ||
import { configuredNetworks } from "$config"; | ||
|
||
export async function loadGuardians(): Promise<{ [address: string]: string }> { | ||
const network = import.meta.env.VITE_NETWORK_CONFIG; | ||
if (!network) | ||
throw new Error('Network not configured. Please set VITE_NETWORK_CONFIG in .env file.'); | ||
const path = `/config/${network}/guardians.json`; | ||
const response = await fetch(path); | ||
if (!response.ok) { | ||
throw new Error(`Failed to load ${path}: ${response.statusText}`); | ||
} | ||
return response.json(); | ||
const network = import.meta.env.VITE_NETWORK_CONFIG; | ||
if (!network) { | ||
throw new Error('Network not configured. Please set VITE_NETWORK_CONFIG in .env file. Currently supported networks: ' + configuredNetworks.join(', ')); | ||
} | ||
const path = `/config/${network}/guardians.json`; | ||
const response = await fetch(path); | ||
if (!response.ok) { | ||
throw new Error(`Failed to load ${path}: ${response.statusText}`); | ||
} | ||
return response.json(); | ||
} | ||
|
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.