-
Notifications
You must be signed in to change notification settings - Fork 4
chore: get workflows up to standards #307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 5 commits
bb94986
6693fb5
5d7f75a
3dd0c23
33d0c07
a0bd034
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| #!/usr/bin/env bash | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Deploys Solo Falcon one-shot on Kind. Expects repo root as cwd and Kind tooling | ||
| # already installed (e.g. via helm/kind-action). Writes deployment_name and | ||
| # namespace to GITHUB_OUTPUT when set (GitHub Actions). | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| NETWORK_TAG="${NETWORK_TAG:-v0.72.0}" | ||
| MIRROR_TAG="${MIRROR_TAG:-v0.151.0}" | ||
| RELAY_TAG="${RELAY_TAG:-0.76.2}" | ||
| SOLO_VERSION="${SOLO_VERSION:-0.72.0}" | ||
| EXTERNAL_ADDRESS="${EXTERNAL_ADDRESS:-127.0.0.1}" | ||
|
|
||
| mkdir -p .github | ||
|
PavelSBorisov marked this conversation as resolved.
Outdated
|
||
|
|
||
| cat >.github/falcon.yml <<EOF | ||
| network: | ||
| --release-tag: "${NETWORK_TAG}" | ||
| setup: | ||
| --release-tag: "${NETWORK_TAG}" | ||
| consensusNode: | ||
| --force-port-forward: true | ||
| --node-aliases: "node1" | ||
| mirrorNode: | ||
| --enable-ingress: true | ||
| --pinger: true | ||
| --mirror-node-version: "${MIRROR_TAG}" | ||
| --values-file: .github/mirror-node-values.yaml | ||
| --force-port-forward: true | ||
| relayNode: | ||
| --relay-release: "${RELAY_TAG}" | ||
| --node-aliases: "node1" | ||
| --force-port-forward: true | ||
| EOF | ||
|
|
||
| NS_BASE="sc-${GITHUB_RUN_ID:-local}-${GITHUB_RUN_ATTEMPT:-1}-${GITHUB_JOB:-solo}" | ||
| SOLO_NS="$(echo "${NS_BASE}" | tr '[:upper:]_' '[:lower:]-' | cut -c1-63)" | ||
| SOLO_DEPLOYMENT="${SOLO_NS}" | ||
|
|
||
| if [[ -n "${GITHUB_OUTPUT:-}" ]]; then | ||
| { | ||
| echo "deployment_name=${SOLO_DEPLOYMENT}" | ||
| echo "namespace=${SOLO_NS}" | ||
| } >>"${GITHUB_OUTPUT}" | ||
| fi | ||
|
|
||
| npx "@hashgraph/solo@${SOLO_VERSION}" one-shot falcon deploy \ | ||
| --values-file .github/falcon.yml \ | ||
| --dev \ | ||
| --deploy-explorer=false \ | ||
| --deployment "${SOLO_DEPLOYMENT}" \ | ||
| --namespace "${SOLO_NS}" \ | ||
| --external-address "${EXTERNAL_ADDRESS}" | ||
|
|
||
| echo "Waiting for mirror node REST API..." | ||
| for i in $(seq 1 30); do | ||
| response=$(curl -sf http://localhost:38081/api/v1/accounts 2>/dev/null || true) | ||
| if echo "${response}" | grep -q '"accounts"'; then | ||
| echo "Mirror REST API is up." | ||
| exit 0 | ||
| fi | ||
| echo "Attempt ${i}/30: not ready, retrying in 10s..." | ||
| sleep 10 | ||
| done | ||
|
|
||
| echo "ERROR: Mirror REST API did not become available." | ||
| exit 1 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| #!/usr/bin/env bash | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Starts background kubectl port-forward processes so localhost matches the | ||
| # expectations of `@hashgraph/sdk` local-node consumers (127.0.0.1:50211 → | ||
| # consensus via HAProxy) and the mirror Web3 endpoint (127.0.0.1:8545 → | ||
| # svc/mirror-1-web3), consistent with hiero-sdk-js solo-lib.js. | ||
| # | ||
| # Required environment: | ||
| # SOLO_NAMESPACE — Kubernetes namespace from the Solo deploy step | ||
| # (e.g. steps.<id>.outputs.namespace). | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| NS="${SOLO_NAMESPACE:?SOLO_NAMESPACE is required}" | ||
|
|
||
| kubectl get svc haproxy-node1-svc -n "${NS}" | ||
| kubectl port-forward -n "${NS}" svc/haproxy-node1-svc 50211:50211 & | ||
| echo "Forwarding svc/haproxy-node1-svc -> localhost:50211 (consensus gRPC for local-node)" | ||
|
|
||
| if kubectl get svc mirror-1-web3 -n "${NS}" &>/dev/null; then | ||
| kubectl port-forward -n "${NS}" svc/mirror-1-web3 8545:80 & | ||
| echo "Forwarding svc/mirror-1-web3 -> localhost:8545 (mirror Web3)" | ||
| else | ||
| echo "::warning::svc/mirror-1-web3 not found in ${NS}; skipping 8545 forward" | ||
| fi | ||
|
|
||
| sleep 3 |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should update to node 24
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Node 24 seems to break some things, I tried a direct bump but got consistent failures in CI - https://github.com/hashgraph/hedera-forking/actions/runs/25926032257/job/76504944946 |
Uh oh!
There was an error while loading. Please reload this page.