Why might the below bash commands give me an error on a Jenkins JNLP slave in Kubernetes cluster? Each work on a local machine.
Error: Syntax error: redirection unexpected
IFS='/' read -r -a branch <<< "${1}"
Error: Syntax error: "(" unexpected (expecting "}")
:
IFS='/'
branch=($1)
Environment Details
- JNLP Slave is using Dockerhub jenkins/jnlp-slave:latest
- Slave being ran with kubernetes plugin
- Jenkins v2.156 on master.
- Command is from a sourced function in another script. (e.g.
. "/script.bash"
)