Hi Anton,
take into account that the declarative syntax (and in general Jenkins 
pipelines) are just a DSL (
https://en.wikipedia.org/wiki/Domain-specific_language) heavily based on 
Groovy language (http://groovy-lang.org/index.html).
So, many (really many) things you can do ... it's just Groovy language, 
like the one you asked.
In fact, triple quote is documented at 
http://groovy-lang.org/syntax.html#_triple_single_quoted_string
And also many "command" like "bat" you mentioned in the email are just 
Groovy function and follow the Groovy rules about parameters and how you 
can call them.
In the case of "bat" is you just pass one parameter is used as script, as 
you pass more than one you need to specify who is what:
"bat script: "whatever", returnStout: true"

I hope it helps to get you started on learning it.

Cheers,
Gianluca.


Il giorno venerdì 14 agosto 2020 alle 17:12:40 UTC+1 Anton Shepelev ha 
scritto:

> Hello, all
>
> From some examples in the internet I have found that a
> mulitline Windows batch script in Jenkins may be called with
> this step:
>
> bat """
> chcp 1251
> c:\path\to\program.exe
> """
>
> Where is this syntax documented with regard to:
>
> 1. the backslash escapes, and
> 2. the triple quoataion marks?
>
> Accoring to the steps reference, the `bat' step can take
> many parateters, the first being `script'. How I invoke the
> `bat' step with several parameters, e.g.: `script' and
> `returnStdout'?
>
> Where is the general specification of the declarative
> syntax? I am somewhat confused because the documentation
> starts from specific examples.
>
>

-- 
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/406d5273-6d8d-4e50-aae1-5c0099226c1cn%40googlegroups.com.

Reply via email to