Hi,
I tried reading variables in batch script. It works if its a single line
batch code, but doesn't for multiple lines.
e.g.
Below outputs current directory path correctly.
node('windows') {
def myDir = pwd()
bat "echo ${myDir}"
}
But below produces output as *Current directory is: ${myDir}*
node('windows') {
def myDir = pwd()
bat '''echo "Current directory is:"
echo ${myDir}'''
}
Am I missing some syntax in multiple line batch script?
Regards,
Rupali
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/a8162919-a986-463a-ad1d-a54c1d75d352%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.