-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9523 from harness/PIPE-24344
feat: Doc for dynamically executing the Pipeline
- Loading branch information
Showing
4 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
--- | ||
title: Dynamic execution of Pipelines | ||
description: You can dynamically execute pipelines in Harness. | ||
--- | ||
|
||
Dynamic execution of Pipelines allows you to execute pipelines by providing pipeline YAML configuration during runtime without requiring pre-saved configurations in Harness. Essentially, Harness is being used as a pure execution engine, while an external system within the ecosystem handles YAML creation and editing. This is particularly useful when pipelines are dynamically generated based on user actions. At the same time, it enables seamless integration with the existing ecosystem while maintaining Harness's robust security and governance controls. | ||
|
||
## Pre-Requisites | ||
|
||
### Account and Pipeline Level Setting | ||
|
||
:::info note | ||
Currently, this setting is behind the Feature Flag `PIPE_DYNAMIC_PIPELINES_EXECUTION`. Contact [Harness Support](mailto:[email protected]) to enable this Feature Flag. | ||
::: | ||
|
||
Before you can execute pipelines dynamically, you need to enable two settings at both the **Account** and **Pipeline** levels. | ||
|
||
1. Account Level Setting | ||
|
||
Navigate to **Account Setting** -> **Default Settings** -> **Pipeline** -> Enable **Allow Dynamic Execution for Pipelines** | ||
|
||
If you need to disable dynamic execution for the account, you can do so at any time by simply turning off this setting. | ||
|
||
|
||
2. Pipeline Level Setting | ||
|
||
:::info note | ||
The pipeline-level setting for dynamic execution will only be visible once the Account-Level Setting is enabled | ||
::: | ||
|
||
After enabling the account setting, you must enable the pipeline-level setting: | ||
|
||
Navigate to **Advanced Options** -> **Dynamic Execution Settings (optional)** -> **Enable Allow Dynamic Execution for Pipeline** | ||
|
||
 | ||
|
||
### Permissions | ||
|
||
Users need both [**Edit and Execute**](/docs/platform/role-based-access-control/add-manage-roles.md) permissions on the Pipelines. | ||
|
||
### YAML Configuration | ||
|
||
:::info note | ||
Dynamic execution of pipelines is only supported via the [API](#dynamic-execution-api) and not through the UI. | ||
::: | ||
|
||
To execute a pipeline dynamically, you must provide a valid YAML configuration through the Dynamic Execution API. | ||
|
||
## Dynamic Execution API | ||
|
||
The Dynamic Execution API in Harness allows you to execute a pipeline dynamically by passing YAML configurations directly in the request body. | ||
|
||
```curl | ||
curl --location 'https://app.harness.io/gateway/pipeline/api/v1/orgs/default/projects/PROJECT_ID/pipelines/PIPELINE_ID/execute/dynamic' \ | ||
--header 'accept: */*' \ | ||
--header 'content-type: application/json' \ | ||
--header 'origin: https://app.harness.io' \ | ||
--header 'Harness-Account: ACCOUNT_ID' \ | ||
--header 'x-api-key: HARNESS_API_KEY' \ | ||
--data '{ | ||
"yaml": "" | ||
}' | ||
``` | ||
|
||
Upon successful execution, the API returns the following response: | ||
|
||
```json | ||
{ | ||
"execution_details": { | ||
"execution_id": "EXECUTION_ID", | ||
"status": "RUNNING" | ||
} | ||
} | ||
``` | ||
Once the API is triggered, you can monitor the pipeline execution in the Harness UI. | ||
|
||
 | ||
|
||
In the trigger summary you will see a message indicating **This was executed dynamically**. This confirms that the pipeline was triggered using the Dynamic Execution API. | ||
|
||
## What's Supported | ||
|
||
Dynamically executing pipelines support usage of following features:- | ||
|
||
1. Template resolution at runtime | ||
2. Expression resolution | ||
3. Services and environments | ||
4. Secrets and connectors | ||
5. OPA policy enforcement | ||
|
||
## Limitations | ||
|
||
Dynamically executing pipelines doesn't support following features:- | ||
|
||
1. Input sets | ||
2. Selective stage Execution | ||
3. Retry/Re-Run capability | ||
4. Automatic Triggers | ||
5. Post Production Rollback | ||
6. Runtime Inputs | ||
|
||
|
||
|
||
|
||
|
Binary file added
BIN
+9.34 KB
docs/platform/pipelines/static/account-settings-dynamic-execution.png
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.
Binary file added
BIN
+11.1 KB
docs/platform/pipelines/static/pipeline-setting-dynamic-execution.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.