Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions docs/platform/triggers/triggering-pipelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -531,3 +531,39 @@ This functionality is applicable across various version control platforms, inclu
### Events
The skipping mechanism operates for both **push** and **pull request** events in Git repositories.


## Send Stage Execution Status to Git on Pull Requests

:::info note
Currently, this feature is behind the feature flag `PIPE_ENABLE_SEND_STATUS_TO_GIT`. Please contact [Harness Support](mailto:[email protected]) to enable the feature.
:::

Leveraging the **Send status to Git** option for individual stages in the pipeline gives you enhanced control over the stage execution status updates.

When a Git Pull Request event triggers a pipeline, Harness can send status updates for each pipeline stage back to the Git system (GitHub, GitLab, etc.) as it executes.


### Key Capabilities and Customization

With this feature, you gain the following capabilities:
- **Stage-Level Control:** Option to enable or disable **Send status to Git** for each pipeline stage.

- **Customizable Status Check Names:** Set custom names for the status checks associated with pipeline stages using fixed values or Harness expressions like `<+pipeline.variables.varStage>`. This allows for dynamic and descriptive status names.

- In case the expression can not be resolved or evaluated, the Stage Identifier will represent the status check in the Git Pull Request.


![Expression Nomenclature for status check git](./static/send-status-to-git-expression.png)

- **Visibility on Pull Request:** Receiving status updates as checks directly on the Git Pull Request makes it easier for developers to identify the execution status of each stage in the pipeline without having to navigate to the pipeline run on Harness.

- **Status Updates for Skipped Stages:** If a stage is skipped during a pipeline run, it will be represented with **Success** status in Git PR.

![Expression Nomenclature for status check git](./static/send-status-to-git-checks.png)

One key fact to note here is that the order in which the status checks are displayed on the Git PR will not necessarily follow the order of execution in which Harness Pipeline Stages are executed. Instead, they will be displayed in alphabetical order on the Git PR.

### Enabling Send Status to Git

To configure Git status checks for your pipeline stages, navigate to the pipeline and select the stage for which you want to enable it. In the advanced settings, find the **Send status to Git** option, enable it, and enter the desired name or Harness expression.