I am using jenkins pipeline with latest LTS version and, even if I pass 
returnStdout. 
I tried: 

powershell 'Write-Host \'Hello World!\'' 
and 
powershell returnStdout: true, script: 'Write-Host \'Hello World!\'' 

When I create a normal free-style job with a Windows PowerShell step, it works: 


[test] $ powershell.exe -NonInteractive -ExecutionPolicy ByPass "& 
'C:\Windows\TEMP\jenkins1262538438885300795.ps1'" Hello World! 


How can I get the same behavior using a declarative pipeline? 

Thanks, 

Thiago D'Ávila 

-


"Esta mensagem do SERVIÇO FEDERAL DE PROCESSAMENTO DE DADOS (SERPRO), empresa 
pública federal regida pelo disposto na Lei Federal nº 5.615, é enviada 
exclusivamente a seu destinatário e pode conter informações confidenciais, 
protegidas por sigilo profissional. Sua utilização desautorizada é ilegal e 
sujeita o infrator às penas da lei. Se você a recebeu indevidamente, queira, 
por gentileza, reenviá-la ao emitente, esclarecendo o equívoco."

"This message from SERVIÇO FEDERAL DE PROCESSAMENTO DE DADOS (SERPRO) -- a 
government company established under Brazilian law (5.615/70) -- is directed 
exclusively to its addressee and may contain confidential data, protected under 
professional secrecy rules. Its unauthorized use is illegal and may subject the 
transgressor to the law's penalties. If you're not the addressee, please send 
it back, elucidating the failure."

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/1169446691.7165192.1518192765690.JavaMail.zimbra%40serpro.gov.br.
For more options, visit https://groups.google.com/d/optout.

Reply via email to