Skip to content
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

fix: add devcoin to faucet after deployment #10903

Merged
merged 1 commit into from
Dec 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 18 additions & 13 deletions .github/workflows/devnet-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,13 @@ jobs:
run: |
set -eu -o pipefail

pxe_port_forward_pid=""
ethereum_port_forward_pid=""
port_forward_pids=()

cleanup() {
echo "Cleaning up port-forward processes..."
if [ -n "$pxe_port_forward_pid" ]; then
kill $pxe_port_forward_pid 2>/dev/null || true
fi
if [ -n "$ethereum_port_forward_pid" ]; then
kill $ethereum_port_forward_pid 2>/dev/null || true
fi
echo "Cleaning up port-forwards..."
for pid in "${port_forward_pids[@]}"; do
kill $pid 2>/dev/null
done
}

trap cleanup EXIT
Expand All @@ -108,6 +104,7 @@ jobs:
helm get values $NAMESPACE -n $NAMESPACE -o json --all > helm_values.json

PXE_PORT="$(jq -r .pxe.service.nodePort helm_values.json)"
FAUCET_PORT="$(jq -r .faucet.apiServerPort helm_values.json)"
ETHEREUM_PORT="$(jq -r .ethereum.service.port helm_values.json)"
L1_CHAIN_ID="$(jq -r .ethereum.chainId helm_values.json)"

Expand All @@ -116,13 +113,16 @@ jobs:

rm helm_values.json

kubectl port-forward -n $NAMESPACE svc/$NAMESPACE-aztec-network-pxe $PXE_PORT &
pxe_port_forward_pid=$!
kubectl port-forward -n $NAMESPACE svc/$NAMESPACE-aztec-network-pxe $PXE_PORT &>/dev/null &
port_forward_pids+=($!)

kubectl port-forward -n $NAMESPACE svc/$NAMESPACE-aztec-network-faucet-api $FAUCET_PORT &>/dev/null &
port_forward_pids+=($!)

# port-forward directly to the pod because the Eth node does not have a service definition
ETH_POD_NAME=$(kubectl get pods -n $NAMESPACE -l app=ethereum -o jsonpath='{.items[0].metadata.name}')
kubectl port-forward -n $NAMESPACE pod/$ETH_POD_NAME $ETHEREUM_PORT &
ethereum_port_forward_pid=$!
kubectl port-forward -n $NAMESPACE pod/$ETH_POD_NAME $ETHEREUM_PORT &>/dev/null &
port_forward_pids+=($!)

# wait for port-forwards to establish
sleep 5
Expand All @@ -135,3 +135,8 @@ jobs:
--json | tee ./basic_contracts.json

aws s3 cp ./basic_contracts.json ${{ env.CONTRACT_S3_BUCKET }}/devnet/basic_contracts.json

DEVCOIN_L1_ADDRESS=$(jq -r .devCoinL1 ./basic_contracts.json)
DEVCOIN_DRIP_AMOUNT=1000000000
curl -X POST -d address=$DEVCOIN_L1_ADDRESS -d amount=$DEVCOIN_DRIP_AMOUNT \
http://127.0.0.1:$FAUCET_PORT/l1-asset
Loading