Hello,
Is there anyway to return env variables from a job?
It works fine in pipeline, but with jenkinsfile scm pipeline I can't def
variable inside steps.
This works fine inside pipeline:
stage('pre') {
build job: 'Test1'
}
stage('main') {
def result = build job: 'Test', parameters: [string(name: 'VM',
value: String.valueOf(VM))]
println result.getBuildVariables()
}
This doesn't:
pipeline {
agent any
stages {
stage('pre') {
steps {
build job: 'Test1'
}
}
stage('main') {
steps {
def result = build job: 'Test', parameters: [string(name: 'VM',
value: String.valueOf(VM))]
println result.getBuildVariables()
}
}
}
}
Any help is appreciated.
Thanks
--
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/CAJU06NMoWJiTC9PCzNMLKW%2BSxKSxoYi6x38ce3-WJC_DQ1XNuA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.