Closed chetan-rns closed 3 years ago
/ok-to-test
There are a few "body.ref" reminded in the code and doc. Can you please review/confirm them if they need to be updated.
@wtam2018 Just checked. The existing body.ref
in the codebase is for the eventlistener.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: wtam2018
The full list of commands accepted by this bot can be found here.
The pull request process is described here
@chetan-rns , @wtam2018 , how did you know that the new extensions field was added? eg. what was your process that led up to this finding?
Sadly, you know it until you hit the wall currently.
On Mon, Mar 15, 2021 at 11:36 AM Keith Chong @.***> wrote:
@chetan-rns https://github.com/chetan-rns , @wtam2018 https://github.com/wtam2018 , how did you know that the new extensions field was added? eg. what was your process that led up to this finding?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/redhat-developer/kam/pull/191#issuecomment-799517795, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKQAJIPSJIN54I53QBDZ5Z3TDYSPXANCNFSM4ZBVIBBQ .
Hi @keithchong,
The error we faced was an invalid tag being added to the image built by our pipeline. We expect the images to have the tag of the form image:<branch_name>-<commit_id>
, but the images were getting built with the tag
image:refs/heads/<branch_name>-<commit_id>
.
Basically, refs/heads/<branch_name>
from the incoming JSON payload was not being trimmed down to <branch_name>
. This logic is handled by the Tekton event listener here. The Tekton triggers doc suggested the trimmed field was being added to this new extension field
What type of PR is this?
What does this PR do / why we need it:
The Overlays in the Tekton event listener will add elements to a new field known as "extensions" instead of modifying the existing fields in the incoming payload. This PR updates the trigger binding to extract the branch name from the new extensions field.
Overlays Ref: https://github.com/tektoncd/triggers/blob/v0.10.2/docs/eventlisteners.md#overlays
Signed-off-by: Chetan Banavikalmutt chetanrns1997@gmail.com
Have you updated the necessary documentation?
How to test changes / Special notes to the reviewer: