Skip to content

Commit dd3391c

Browse files
Merge pull request #802 from harness/CDS-40448-run-stages-in-parallel
CDS-40448-run-stages-in-parallel
2 parents 0766bfc + 2453c96 commit dd3391c

File tree

3 files changed

+40
-5
lines changed

3 files changed

+40
-5
lines changed

docs/platform/8_Pipelines/add-a-stage.md

-5
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,6 @@ In **Advanced**, you can use the following options:
8686
* [Stage Conditional Execution Settings](w_pipeline-steps-reference/step-skip-condition-settings.md)
8787
* [Step Failure Strategy Settings](w_pipeline-steps-reference/step-failure-strategy-settings.md)
8888

89-
### Option: Running Stages in Parallel
90-
91-
You can drag stages on top of each other to run them in parallel:
92-
93-
![](./static/add-a-stage-57.png)
9489
### See also
9590

9691
* [Create Organizations and Projects](../organizations-and-projects/create-an-organization.md)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: Run CD stages in parallel
3+
description: Perform parallel stage executions.
4+
sidebar_position: 3
5+
---
6+
7+
You can run stages in parallel when you want to perform parallel operations. For example:
8+
9+
- CI: Parallel execution of builds and tests can speed up the integration process and provide faster feedback to developers.
10+
- CD: Parallel execution of deployment stages can help reduce deployment times and increase the efficiency of the process.
11+
- Infrastructure as Code (IaC): Parallel execution of IaC scripts can speed up the creation of resources and improve the scalability of infrastructure.
12+
- Testing: Parallel execution of tests can reduce the overall testing time and provide faster feedback to developers.
13+
14+
## Requirements
15+
16+
* [Learn Harness' Key Concepts](../../getting-started/learn-harness-key-concepts.md)
17+
* [Add a Stage](add-a-stage.md)
18+
19+
## Running stages in parallel
20+
21+
Run stages in parallel by dragging them together or by selecting the `+` button under a stage in the UI.
22+
23+
![](./static/add-a-stage-57.png)
24+
25+
The only change in the stage YAML is an additional `parallel`.
26+
27+
```
28+
stages:
29+
- parallel:
30+
- stage:
31+
```
32+
33+
Navigate between the stages by hovering over them and selecting the stage.
34+
35+
![](./static/run-stages-in-parallel.png)
36+
37+
A [resource constraint](../../continuous-delivery/cd-deployments-category/deployment-resource-constraints.md) step is added to every stage automatically to make sure that you are not using two infrastructures simultaneously. Hence, one parallel stage executes first. Once the execution of the first stage finishes, the other stage(s) will start.
38+
39+
You can deploy multiple services to multiple environments in a single stage (for more information, go to [Use multiple services and environments in a deployment](https://developer.harness.io/docs/continuous-delivery/cd-deployments-category/multiserv-multienv/)). However, running multi-service stages in parallel will deploy each service to each environment in parallel. This can become very complicated. For such use cases, we recommend using multiple stages.
40+
Loading

0 commit comments

Comments
 (0)