I want to access normal variable defined in my steps into power shell execution. We can access environment variables using $env but, how to access normal step variables?
stages {
stage ('sometask') {
steps{
script {
def someString = 'Hi'
withCredentials(...) {
def out = powershell(returnStdout: true, script:
'''
// Access someString
''')
println out
}
}
}
}