How can I start a bash login shell in jenkins pipeline (formerly known as workflow)?
<p>I am just starting to convert my Jenkins jobs into the new Jenkins Pipeline(workflow) tool, and I'm having trouble getting the <code>sh</code> command to use a bash login shell.</p>

<p>I've tried</p>

<pre><code>sh '''
#!/bin/bash -l
echo $0
'''
</code></pre>

<p>but the <code>echo $0</code> command is always being executed in an interactive shell, rather then a bash login shell.</p>