Triggering a pipeline with Git Rebase Commit in Harness

WebHook Triggers

With Harness you can trigger pipelines in response to Git events that match specific payload conditions that you set in the bundle’s Trigger.
In this blog we will be discussing about how we can trigger a pipeline on git rebase commit with Harness WebHook trigger.

In short, Git Rebase is

Rebasing is the process of moving or merging a set of commits into a new base commit. Rebase changes the base of the branch from one commit to another, so it looks like the branch was created from a different commit.

Trigger a pipeline in Harness with Rebase commit.

With Harness you CI or CD pipeline can be executed when a pull request or push event occurs in a Git repository and the trigger settings match the payload conditions.

Payload condition which should point to the webhook head_commit.modified filed (<+eventPayload.head_commit.modified>)

Initial Trigger configuration.

Tracking the rebase commit with payload condition.

Moreover you can track changes in particular file by filtering based on that head_commit.modified information, by providing specific Payload Conditions <+eventPayload.head_commit.modified> with Equals Operator and giving specific file Match Value “file1/file2/file3/”