Inside a groovy script (for a jenkins pipeline): How can I run a bash
command instead of a sh
command?
I have tried the following:
Call "#!/bin/bash
" inside the sh
call:
stage('Setting the variables values') {
steps {
sh '''
#!/bin/bash
echo "hello world"
'''
}
}
Replace the sh
call with a bash
call:
stage('Setting the variables values') {
steps {
bash '''
#!/bin/bash
echo "hello world"
'''
}
}
Additional Info:
My command is more complex than a echo hello world
.