---
sourceDocument: Brazil IT Service Management
sourceDocumentLink: https://www.servicenow.com/docs/r/it-service-management

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil IT Service Management

ft:clusterId :

    - itsm

bundleId :

    - itsm

workflow :

    - Technology


---

# Nested and parallel stages in Jenkins pipelines

# Nested and parallel stages in Jenkins pipelines {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 3 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Nested and parallel stages in Jenkins pipelines

ServiceNow DevOps supports the use of nested and parallel stages in scripted Jenkins pipelines to accelerate pipeline execution by running multiple tasks concurrently.
This feature enables better automation, especially for complex test cases involving different environments like operating systems and browsers.
The DevOps pipeline UI mirrors the Jenkins pipeline UI in real time, providing visibility into pipeline progress, artifact details, test results, software quality summaries, and change request information.
Show full answer Show less  

## Key Features

* **Support for Scripted Pipelines Only:** Nested and parallel stages are supported exclusively in scripted Jenkins pipelines. Freestyle pipelines with parallel or nested stages still display sequentially in the DevOps UI.
* **Real-Time Pipeline Visualization:** Users can view the real-time state of Jenkins pipelines through the ServiceNow DevOps Pipeline Execution view, enhancing monitoring and troubleshooting.
* **Change Requests for All Stages:** Change requests are now created and associated with all nested and parallel stages after all upstream events are received, improving change tracking and approval granularity.
* **Pipeline Execution Control:** Pipeline execution pauses if downstream steps depend on change request approvals and resumes once approval is granted, ensuring proper governance.

## Change Requests in Nested and Parallel Stages

Previously, only parent stages generated change requests, ignoring nested or parallel stages. Now, ServiceNow DevOps creates distinct change requests for each nested and parallel stage. This requires customers to map approval groups appropriately to these stages to ensure correct approval workflows. Without this, pipeline execution may be disrupted due to unapproved change requests.

## Upgrade Considerations

* Perform upgrades during off-peak hours to prevent interference with active pipeline executions.
* Ensure no pipelines are running in ServiceNow DevOps at the time of upgrade; otherwise, step executions for in-progress runs may not be created properly.
* Rerun existing pipelines post-upgrade to generate the correct step executions for nested and parallel stages.

## Practical Benefits for ServiceNow Customers

By leveraging nested and parallel stages in Jenkins scripted pipelines, customers can:

* Speed up pipeline runs by executing multiple tasks concurrently.
* Gain detailed change management with change requests per nested or parallel stage.
* Improve visibility and control over pipeline execution through the integrated DevOps UI.
* Ensure compliance with approval processes tailored to each stage of the pipeline.  
Use nested and parallel stages in scripted Jenkins pipelines to speed up
your pipeline execution. Change requests are created for nested and parallel stages and not just
for the parent stage.

## Support for nested and parallel stages in Jenkins pipelines {#nested-parallel-stage-support-jenkins__section_qpb_2px_wrb}

You can use nested and parallel stages in scripted Jenkins pipelines to
automate and speed up tasks that can be run in parallel. For example, you have a scripted Jenkins pipeline with nested and parallel stages for various test cases such as
different quality checks for different operating systems and browsers.  
ServiceNow DevOps supports processing parallel and nested stages in Jenkins pipelines and displays the pipeline, in the DevOps pipeline UI. In effect, the ServiceNow DevOps pipeline UI renders or replicates the Jenkins pipeline UI in real time. From the Pipeline Execution view of the relevant pipeline, click the Pipeline UI related link to view the real-time state of the pipeline as it appears in Jenkins. The associated artifact details that are sourced from the build pipeline, Test Results, Software Quality Summary Results, and Change request details display on the pipeline UI.  
Important:  
Support for parallel and nested stages is restricted to scripted pipelines in Jenkins. Freestyle pipelines continue to appear in a sequential or serial manner in the DevOps pipeline UI, even if parallel and nested stages are part of freestyle pipelines in Jenkins.  
Figure 1. Jenkins pipeline with nested or parallel stages  
Sample pipeline with nested or parallel stages

    pipeline {
        agent any

        stages {
            stage('Build') {
                steps { 
                    echo 'Building...'
                    // Your build steps here
                }
            }

            stage('Test') {
                parallel {
                    stage('Unit Tests') {
                        steps {
                            echo 'Running unit tests...'
                            // Your unit test steps here
                        }
                    }
                    stage('Integration Tests') {
                        steps {
                            echo 'Running integration tests...'
                            // Your integration test steps here
                        }
                    }
                    stage('Additional Tests') {
                        steps {
                            script {
                                parallel(
                                    'Nested Stage 1': {
                                        echo 'Running nested parallel stage 1...'
                                        // Your nested parallel stage 1 steps here
                                    },
                                    'Nested Stage 2': {
                                        echo 'Running nested parallel stage 2...'
                                        // Your nested parallel stage 2 steps here
                                    }
                                )
                            }
                        }
                    }
                }
            }

            stage('Deploy') {
                steps {
                    echo 'Deploying...'
                    snDevOpsChange changeRequestDetails: '{ "attributes": {"chg_model": "e55d0bfec343101035ae3f52c1d3ae49","standard_change_template"="563504cc47410200e90d87e8dee490e2"},"autoCloseChange": false}',changeStepTimeOut: 18000, pollingInterval: 60
                    // Your deploy steps here
                }
            }
        }
    }

## Change requests in nested and parallel stages {#nested-parallel-stage-support-jenkins__section_cfy_4qx_wrb}

Change requests are created for all nested and parallel stages, once all upstream events (before the
change request) are received. In previous releases, nested or parallel stages in Jenkins pipelines were not identified nor processed in ServiceNow
DevOps. Only parent stages were identified and processed in a linear or sequential manner. If change requests existed as part of any nested and parallel stages, those change requests were ignored and a
single change request was processed as part of the parent stage. When you run a new pipeline after upgrading, new steps and steps executions are created for nested stages.


Nested and parallel stages were not processed previously, and approval groups were mapped only
to the parent stage. Because nested and parallel stages are identified during processing, you
must verify that relevant approval groups are mapped to the appropriate nested or parallel
stage. If subsequent steps of the pipeline are dependent on the change request's being approved,
the pipeline execution is paused, and resumed when the
change request is
approved.

## Upgrade Considerations {#nested-parallel-stage-support-jenkins__section_lzg_fjb_xrb}

If you are already using Jenkins with nested and parallel pipelines as your orchestration tool, consider the following while upgrading.

* Upgrade during off-peak hours.
* Ensure that you do not have any pipeline executions that are currently in progress by ServiceNow DevOps. If pipeline executions are being processed, step executions might not be created as expected for the in-progress pipeline runs. Rerun the pipeline to create appropriate step executions.
{#nested-parallel-stage-support-jenkins__ul_dgg_gjb_xrb}

