-
Bug
-
Resolution: Not A Defect
-
Minor
-
Jenkins 2.62
Pipeline plugins versions
Pipeline 2.5
Pipeline Graph Analysis Plugin 1.3
Pipeline REST API for Blue Ocean 1.0.1
Pipeline: API 2.15
Pipeline: Basic Steps 2.4
Pipeline: Build Step 2.5
Pipeline: Declarative Agent API 1.1.1
Pipeline: Declarative Extension Points API 1.1.4
Pipeline: GitHub Groovy Libraries 1.0
Pipeline: Groovy 2.32
Pipeline: Input Step 2.7
Pipeline: Job 2.11
Pipeline: Milestone Step 1.3.1
Pipeline: Model API 1.1.4
Pipeline: Model Definition 1.1.4
Pipeline: Multibranch 2.14
Pipeline: Nodes and Processes 2.11
Pipeline: REST API Plugin 2.7
Pipeline: SCM Step 2.4
Pipeline: Shared Groovy Libraries 2.8
Pipeline: Stage Step 2.2
Pipeline: Stage Tags Metadata 1.1.4
Pipeline: Stage View Plugin 2.6
Pipeline: Step API 2.10
Pipeline: Supporting APIs 2.14Jenkins 2.62 Pipeline plugins versions Pipeline 2.5 Pipeline Graph Analysis Plugin 1.3 Pipeline REST API for Blue Ocean 1.0.1 Pipeline: API 2.15 Pipeline: Basic Steps 2.4 Pipeline: Build Step 2.5 Pipeline: Declarative Agent API 1.1.1 Pipeline: Declarative Extension Points API 1.1.4 Pipeline: GitHub Groovy Libraries 1.0 Pipeline: Groovy 2.32 Pipeline: Input Step 2.7 Pipeline: Job 2.11 Pipeline: Milestone Step 1.3.1 Pipeline: Model API 1.1.4 Pipeline: Model Definition 1.1.4 Pipeline: Multibranch 2.14 Pipeline: Nodes and Processes 2.11 Pipeline: REST API Plugin 2.7 Pipeline: SCM Step 2.4 Pipeline: Shared Groovy Libraries 2.8 Pipeline: Stage Step 2.2 Pipeline: Stage Tags Metadata 1.1.4 Pipeline: Stage View Plugin 2.6 Pipeline: Step API 2.10 Pipeline: Supporting APIs 2.14
On a `pipeline` or `multibranch pipeline` job
The bat(returnStdout: true) step returns the whole command not just the stdout
i.e
node('windows') { stage('Checkout'){ git('http://github.com/test/test') stdout = bat(returnStdout: true, script: 'git rev-parse HEAD') println("stdout ################ " + stdout + " ####################") } }
returns
stdout ################ C:\hudson\workspace\test_UT_pipeline_statuses-J5YZJ3FX5VOUPIOVLCDBLV55WCESHMXOR3K32NSM442TR2P4MNEQ>git rev-parse HEAD ff0f0401354a0faa6cf9c08fd513beddb85997ec ####################
instead of just
ff0f0401354a0faa6cf9c08fd513beddb85997ec
as it is done by the sh(returnStdout: true) function
Workaround will be to discard the first line of the returned string