0

We are currently experiencing failures of a (previously working) tekton pipeline, while updating a task (git-cli).

Our goal:

  1. Clone as repo
  2. Update a single line in a single file
  3. 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!

René Jahn
  • 1,155
  • 1
  • 10
  • 27
  • 1
    Write your own tasks. Tekton hub's are a good starting point, when you don't know better, ... Eventually, you'll grow out of them ... Don't fight with someone else's bugs: own it :) --- and no, didn't get such an issue ... but even their take on "git-clone", I'm done using (limitranges, securitycontext, ...). – SYN Jul 13 '23 at 06:38
  • Thanks @SYN for your answer, Im already feeling this too. Some of the hub tasks feel like making the happy path work to get some user traction. I still hoped a hub would do a hubs job though :D – René Jahn Jul 13 '23 at 14:18

0 Answers0