Overview
Pipelines in Pipelines allows you to compose complex workflows by nesting Pipeline definitions. This provides:- Better organization of complex workflows
- Reusability of Pipeline definitions
- Composition of Pipelines alongside Tasks and Custom Tasks
- Hierarchical Pipeline structures
Specifying pipelineRef
Define Pipelines in Pipelines at authoring time by using thepipelineRef field in a PipelineTask, similar to how you use taskRef.
- Using pipelineRef
- Using pipelineSpec
Reference an existing Pipeline by name:
clone-scan-notify Pipeline example above, the pipeline includes three tasks: git-clone (a regular Task), security-scans (a nested Pipeline that runs scorecards and codeql), and notification (a regular Task).
Using pipelineSpec instead of pipelineRef embeds the Pipeline definition directly, avoids name collisions in the namespace, and enables fetching the entire Pipeline definition in a single API request.
Parameters
Pipelines in Pipelines consume parameters the same way as Tasks in Pipelines:Use Cases
Organizing Complex Workflows
Break down large Pipelines into logical sub-Pipelines:Reusing Pipeline Logic
Define common Pipeline patterns once and reuse them:frontend-build and backend-build reuse the same test-suite Pipeline.
Current Limitations
Future Capabilities
When implemented, Pipelines in Pipelines will support:- Passing workspaces to nested Pipelines
- Consuming results from nested Pipelines
- Conditional execution of nested Pipelines
- Matrix execution of nested Pipelines
- Finally tasks in nested Pipelines
- Timeout and retry configuration for nested Pipelines