Itai Ganot Itai Ganot - 1 year ago 108
Groovy Question

What's the difference between """ and ''' in terms of running a shell script within a Jenkins pipeline step?

In Jenkins pipeline, what's the difference between:

sh """


sh '''

Thanks in advance

Answer Source

Both are multi-line strings

The first multi-line string with """ can be templated into a GroovyString

The second one with ''' cannot (and is just a java String with newlines)

I have linked to the relevant documentation

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download