In Harness, you can create triggers to automatically run your CI/CD pipelines in response to push events in your Harness Code repos.
Currently, Harness Code triggers must be configured in the YAML editor.
Go to the pipeline where you want to add a trigger for a Harness Code repository.
Make sure your Harness Code repo is the pipeline's default codebase.
Select Triggers in the Pipeline Studio header.
Select New Trigger, and select the Custom trigger type.
Enter a trigger Name and then switch to the YAML editor.
inputYamlsections with the following:
repoName: ## Provide your Harness Code repository name.
identifier: ## Provide the same value as 'pipelineIdentifier'.
Save the trigger.
To test the trigger, create a PR or push a change to your Code repository.