We are currently experiencing failures of a (previously working) tekton pipeline, while updating a task (git-cli).
Our goal:
- Clone as repo
- Update a single line in a single file
- Commit and push
It seems to me, that the single quotes around our sed expression are misplaced, when executing the task.
From pipeline.yaml:
sed -r -i 's/newTag.*$/newTag: \"$(tasks.create-timestamp.results.timestamp)\"/g' ./project/overlays/stage/kustomization.yaml
Inside the TaskRun when executing we get something along the lines of:
sed -r -i 's/newTag.*$/newTag:' 1689221955/g ./project/overlays/stage/kustomization.yaml
So as you can see the closing quote is placed before the interpolated timestamp. In this step we are moving from git-cli v0.3 to git-cli v0.4 and I can see that they wrapped the user (me) entered script into eval, which wasn't the case before. I am suspecting this change to cause our failure but can't fully grasp why this happens.
Any ideas on how to prevent this? Thanks!