script {
...
...
sh """
X = ...
"""
}
Can X be read directly, outside of the sh block?
Right now I'm echoing X to file (echo X > myfile.txt) and then read the contents of the file (def y = readFile("myfile.txt).trim).
There has to be a better way to do this?