We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a2644b commit ab498f0Copy full SHA for ab498f0
charts/cf-runtime/files/patch-runtime.sh
@@ -17,6 +17,19 @@ fi
17
for runtime in /opt/codefresh/*.yaml; do
18
if [[ -f $runtime ]]; then
19
codefresh patch $patch_type -f $runtime
20
+ ACCOUNTS=$(yq '.accounts' $runtime)
21
+ RUNTIME_NAME_ENCODED=$(yq '.metadata.name' $runtime | jq -r @uri)
22
+ if [[ -n $ACCOUNTS ]]; then
23
+ PAYLOAD=$(echo $ACCOUNTS | jq '{accounts: .}')
24
+ set +x
25
+ curl -X PUT \
26
+ -H "Content-Type: application/json" \
27
+ -H "Authorization: $API_KEY" \
28
+ -d "$PAYLOAD" \
29
+ "$API_HOST/api/admin/runtime-environments/account/modify/$RUNTIME_NAME_ENCODED"
30
+ else
31
+ echo "No accounts to add"
32
+ fi
33
fi
34
done
35
0 commit comments