Skip to content

Commit

Permalink
use image with jq and polkadot-js-api
Browse files Browse the repository at this point in the history
  • Loading branch information
rzadp committed Mar 22, 2024
1 parent 340ba07 commit fc7ac8f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions charts/bridges-common-relay/templates/cronjob.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
{{- end}}
containers:
- name: bridges-common-relay-{{ $val.name | lower }}-{{ $reward_owner | lower }}
image: node:20.11
image: paritytech/polkadotjs-cli:latest
imagePullPolicy: IfNotPresent
env:
- name: RPC_URL
Expand All @@ -43,7 +43,6 @@ spec:
- -c
- |
set -euo pipefail
apt-get update && apt-get install -y jq
rewards_account_params=$(
jq --null-input \
Expand All @@ -58,7 +57,7 @@ spec:
)
reward=$(
npx @polkadot/api-cli@0.56.5 --ws "$RPC_URL" query.bridgeRelayers.relayerRewards \
polkadot-js-api --ws "$RPC_URL" query.bridgeRelayers.relayerRewards \
{{ $val.address | quote }} \
"$rewards_account_params" \
| jq -r '.relayerRewards'
Expand All @@ -70,7 +69,7 @@ spec:
fi
echo "{{ $val.name }} on {{ $reward_owner }} has a reward of ${reward}."
npx @polkadot/api-cli@0.56.5 --ws "$RPC_URL" \
polkadot-js-api --ws "$RPC_URL" \
--seed "$(cat /secrets/{{ $val.seed_phrase_secret_name }})" \
tx.bridgeRelayers.claimRewards "$rewards_account_params"
resources:
Expand Down

0 comments on commit fc7ac8f

Please sign in to comment.