Does anyone have a recommendation or example for how to save output of a plugin into a variable when running as a pipeline job?
Currently, the saltstack <https://github.com/jenkinsci/saltstack-plugin> plugin uses listener.getLogger().println() to display output. However this is not to be saved to a variable. def saltoutput = salt arguments: 'ls -la', authtype: 'pam', clientInterface: local(blockbuild: false, jobPollTime: 5, target: 'master', targetType: 'glob'), credentialsId: 'a3d814c2-84ed-4752-94a8-271791bb5375', function: 'cmd.run', kwarguments: 'runas=jenkins', servername: 'http://localhost:8000' // output displayed in the build console here, even though it should have been saved into variable echo ("Salt outputted ${saltoutput}") // this creates "Salt outputted null" Thanks! -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/ff98db6f-b6dc-4c33-a88b-44a6558251ba%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
