Skip to content

Commit

Permalink
[pipelines] fix wrong claim type way
Browse files Browse the repository at this point in the history
  • Loading branch information
ochaloup committed Sep 3, 2024
1 parent 305e460 commit 92f45b2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .buildkite/claim-settlements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ steps:
- label: ":black_nib: Find Discord webhook"
commands:
- |
discord_webhook="$(buildkite-agent meta-data get discord_webhook || echo '')"
discord_webhook=$(buildkite-agent meta-data get discord_webhook) || true
if [[ -z "$$discord_webhook" ]]; then
# env defined by job definition
discord_webhook="${DISCORD_WEBHOOK}"
Expand Down
24 changes: 14 additions & 10 deletions .buildkite/fund-settlements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@ steps:

- wait: ~

- label: ":black_nib: Env variables setup"
- label: ":black_nib: Env variables setup: Fund Settlements"
commands:
- |
claim_type=${CLAIM_TYPE:-$(buildkite-agent meta-data get claim_type || "")}
buildkite-agent meta-data set claim_type "$$claim_type"
- |
epoch=${EPOCH:-$(buildkite-agent meta-data get epoch || "")}
buildkite-agent meta-data set epoch "$$epoch"
claim_type=${CLAIM_TYPE:-"$($(buildkite-agent meta-data get claim_type) || true)"}
if [[ -n "$$claim_type" ]]; then
buildkite-agent meta-data set claim_type "$$claim_type"
fi
- |
epoch=${EPOCH:-"$($(buildkite-agent meta-data get epoch) || true)"}
if [[ -n "$$epoch" ]]; then
buildkite-agent meta-data set epoch "$$epoch"
fi
- wait: ~

Expand All @@ -30,7 +34,7 @@ steps:
artifact_paths:
- target/release/fund-settlement

- label: " Loading json settlements data"
- label: ":surfer: Loading JSON settlements data"
env:
past_epochs_to_load: 3
# epoch when the contract v2 was deployed, using different structure of merkle tree than v1
Expand All @@ -44,8 +48,8 @@ steps:
exit 0
fi
- 'mkdir ./merkle-trees/'
- claim_type=$(buildkite-agent meta-data get claim_type)
- epoch=$(buildkite-agent meta-data get epoch)
- claim_type=$(buildkite-agent meta-data get claim_type) || true
- epoch=$(buildkite-agent meta-data get epoch) || true
- |
if [[ -z "$$epoch" ]]; then
current_epoch=$(curl --silent "$$RPC_URL" -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getEpochInfo"}' | jq '.result.epoch')
Expand Down Expand Up @@ -82,7 +86,7 @@ steps:
- label: ":black_nib: Find Discord webhook"
commands:
- |
discord_webhook="$(buildkite-agent meta-data get discord_webhook || echo '')"
discord_webhook=$(buildkite-agent meta-data get discord_webhook) || true
if [[ -z "$$discord_webhook" ]]; then
# env defined by job definition
discord_webhook="${DISCORD_WEBHOOK}"
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/init-settlements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ steps:

- wait: ~

- label: ":black_nib: Env variables setup"
- label: ":black_nib: Env variables setup: Init Settlements"
commands:
- |
discord_webhook="${DISCORD_WEBHOOK:-$$DISCORD_WEBHOOK_VALIDATOR_BONDS}"
Expand Down

0 comments on commit 92f45b2

Please sign in to comment.