Propagate CD services
This topic describes how to propagate CD services between stages.
You can use the same CD stage services across your pipeline stages. Once you have added a stage with a service, you can select the same service in subsequent stages by using the Propagate from option.
You can also use Harness input sets and overlays to select from different collections of settings at runtime.
Important notes
- Service propagation is also supported when using multiple services in a single stage (multi service deployments).
- For details on using multiple services, go to use multiple services and multiple environments in a deployment.
- Service propagation is progressive: you can only propagate services from stage to stage in a forward direction in your pipeline. For example, Stage 2 cannot propagate a service from a subsequent Stage 3.
- In a pipeline's Advanced Options, in Stage Execution Settings, you can set up selective stage executions. This allows you to select which stages to deploy at runtime.
- If you select a stage that uses a propagated service (a child service), that stage will not work.
- This is because the parent service's settings must be resolved as part of the deployment. Additionally, if the child service is overriding the parent service's settings, Harness cannot ensure that the settings can be overridden correctly without deploying the parent service.
- When propagation is set up between a parent stage and child stage, moving the parent or child stage out of sequence resets any propagated settings to their defaults.
- If you do this, you are prompted to confirm. If you confirm, the stages are reset to their defaults.
- When you propagate a service from one stage to another, the stages must use the same input set. For example, if you have Stage 1 using Input Set A, and you propagate its service to Stage 2, Stage 2 must use Input Set A. If Stage 2 uses a different input set, the service cannot propagate from Stage 1 to Stage 2.
- You cannot propagate service from a stage which also propagates service from another stage.
Propagate a service
-
Open or create a pipeline with at least one stage.
-
To add another stage to the pipeline, select the plus sign (+) or select Add Stage after the first stage, and then select Deploy.
-
Enter a stage name and select Set Up Stage.
The new stage is added to the Pipeline.
-
Select the Service tab if it is not already selected.
The propagation option appears.
-
Select Propagate from and then select the stage with the service you want to use.
You can see the stage name and service name.
This stage now uses the exact same Service as the stage you selected.