Skip to content

Commit

Permalink
Improve patch command by using jq
Browse files Browse the repository at this point in the history
  • Loading branch information
grischperl committed Dec 28, 2023
1 parent d6138d6 commit 840c401
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ jobs:

- name: Setup Eventing Manager with new EPP image
run: |
kubectl patch deployment eventing-manager -n kyma-system --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/env/8/value", "value": "'$EPP_IMAGE'"}]'
kubectl get deployment eventing-manager -n kyma-system -o=json |
jq --arg new_image "$EPP_IMAGE" \
'.spec.template.spec.containers[0].env |= map(if .name == "PUBLISHER_IMAGE" then .value = $new_image else . end)' |
kubectl apply -f -
- name: Create Eventing CR and resources and check configuration
run: |
Expand Down

0 comments on commit 840c401

Please sign in to comment.