Do not capture stdout and use color wrapper
An approach when stdout is captured and then privnted after execution
is not intuitively because stderr is present before stdout.
Change-Id: I15f2dc14ddfa3e3a1e91e27784c1e7dc0981f9e1
diff --git a/test-nodejs-pipeline.groovy b/test-nodejs-pipeline.groovy
index 0c6e46e..574734c 100644
--- a/test-nodejs-pipeline.groovy
+++ b/test-nodejs-pipeline.groovy
@@ -13,11 +13,9 @@
stage(cmd) {
assert containerName != null
common.infoMsg("Starting command: ${cmd}")
- def output = sh(
- script: "docker exec ${containerName} ${cmd}",
- returnStdout: true,
- )
- common.infoMsg(output)
+ wrap([$class: 'AnsiColorBuildWrapper']) {
+ sh("docker exec ${containerName} ${cmd}")
+ }
common.successMsg("Successfully completed: ${cmd}")
}
}