I am trying to create a Jenkins pipeline where I need to execute multiline shell commands.
stage ('Test'){
name="myserver"
sh '''
"ssh -o StrictHostKeyChecking=no ${myserver} 'rm -rf temp && mkdir -p temp && mkdir -p real'"
'''
}
But it is always returning error as "command not found". If I run the same with
sh "ssh -o StrictHostKeyChecking=no ${myserver} 'rm -rf temp && mkdir -p temp && mkdir -p real' "
Is there a different way to access variable in multiline shell?