Jenkins pipeline stages skipped by Jenkinsfile when{} block render as failed in DevOps Change Workspace Pipeline UIIssue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } On a Jenkins pipeline integrated with DevOps Change Velocity (DCV), stages that are intentionally skipped at the Jenkins level using a Jenkinsfile when{} conditional block render red in DevOps Change Workspace, and the pipeline iteration is marked as a failed run. The underlying Jenkins build completes successfully and the skipped stages are not actual failures. Symptoms<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } The following indicators are observed together on the same pipeline iteration: One or more stages render red in the Pipeline UI in DevOps Change Workspace despite the underlying Jenkins build completing successfully.The pipeline iteration is marked as a failed run in the workspace.The affected stages are those gated by a Jenkinsfile when{} conditional block where the conditional evaluated false for the build.Direct read of sn_devops_task_execution.result for the affected step executions returns "failed".The corresponding sn_devops_processed_inbound_event record shows the skip was recognized on the inbound side: original_payload.stageModel.result = "SUCCESS"original_payload.stageModel.stageStatusFromTag = "SKIPPED_FOR_CONDITIONAL"transformed_payload.result = "skipped"state = "processed"processing_details = {"status":"SUCCESS","message":"Processed Successfully."} Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } DevOps Change Velocity v6.1.0 and earlier Cause<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Two separate pieces of code on the DCV side convert each Jenkins stage's status into a ServiceNow result value. One runs when the inbound event is received (it writes transformed_payload.result on sn_devops_processed_inbound_event). The other runs when the stage is stored as a task execution (it writes sn_devops_task_execution.result, and that value is what the Pipeline UI reads). The two conversions are independent of one another. On DCV scope version 6.1.0, the storage-side conversion (DevOpsJenkinsIntegrationHelperSNC.getPayloadForPersistenceApi) marks a stage as "successful" only when the Jenkins workflow status equals "SUCCESS". Every other value falls through to a default of "failed". There is no branch for "SKIPPED_FOR_CONDITIONAL" or other skip-related statuses. When Jenkins evaluates a when{} conditional to false, the stage is not executed and the Jenkins workflow API (/wfapi/describe) reports a stage status of "NOT_EXECUTED" rather than "SUCCESS". On 6.1.0 this hits the default branch and the stage is written to sn_devops_task_execution.result as "failed". The Pipeline UI then renders the stage red. The documented behavior is that skipped stages are filtered from the Pipeline UI entirely and not rendered (https://www.servicenow.com/docs/r/zurich/it-service-management/devops-change-velocity/dev-ops-pipeline-ui.html, "Skipped stages are not shown"). The inbound-side conversion on 6.1.0 already recognizes the skip signal correctly, which is why transformed_payload.result reads "skipped" on the affected records. The gap is on the storage side only. Later DCV scope releases refactor the storage-side conversion to recognize "SKIPPED_FOR_CONDITIONAL" (and related skip variants) and write "skipped" instead of defaulting to "failed". The refactored code reads a per-stage tag field (stageStatusFromTag) that Jenkins sends in its payload. That field is only populated by recent versions of the ServiceNow DevOps Jenkins plugin, so an out-of-date plugin on the Jenkins side will limit the impact of a DCV scope-only upgrade for this specific behavior. Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Upgrade the DevOps Change Velocity scope (sn_devops, sn_devops_ints) to the latest available release in your supported upgrade path via the ServiceNow Store.Verify with the Jenkins administrator that the ServiceNow DevOps plugin installed on the Jenkins server (https://plugins.jenkins.io/servicenow-devops/) is on a current version. The fix on the newer DCV scope release relies on the stageStatusFromTag field that recent plugin versions send.Trigger a new build of the affected pipeline or wait for the next scheduled run. Open the resulting Pipeline Execution in DevOps Change Workspace and confirm that the skipped stages are filtered from the view (per documented Pipeline UI behavior) and the iteration is no longer marked as a failed run.