Re: Why can't I put "bat" inside a stage when using Declarative Pipelines

13 views
Skip to first unread message

R. Tyler Croy

unread,
Jun 8, 2017, 6:41:36 PM6/8/17
to Marley Kudiabor, Jenkins Users
(replies inline)

On Thu, 08 Jun 2017, Marley Kudiabor wrote:

> I'm wondering if I'm doing something wrong the syntax seems radically
> different between Declarative Pipelines and just placing everything inside
> a "node" block.
>
> I was wondering what format I should use to place pipeline steps inside of
> Declarative Pipelines
>
> For example
>
> node {
> stage ("stage") {
> bat ''' echo foo'''
> }
> }
>
> Works but
>
> pipeline {
> ....
> stage ("stage"){
> bat ''' echo foo ''''
> }
> ....
> }
>
> Does not


What is the error that Jenkins gives you when you try this?



- R. Tyler Croy

------------------------------------------------------
Code: <https://github.com/rtyler>
Chatter: <https://twitter.com/agentdero>
xmpp: rty...@jabber.org

% gpg --keyserver keys.gnupg.net --recv-key 1426C7DC3F51E16F
------------------------------------------------------
signature.asc
Reply all
Reply to author
Forward
0 new messages