SyntaxFix
Write A Post
Hire A Developer
Questions
For multi-line shell scripts or those run multiple times, I would create a new bash script file (starting from #!/bin/bash), and simply run it with sh from Jenkinsfile:
#!/bin/bash
sh
sh 'chmod +x ./script.sh' sh './script.sh'