I am running a pipeline job and with this we need to pass a parameter to a 
downsteam job but its not working. We tried as follows:


Pipeline JOB:

node {
    parameters {
            choice(
                name: 'OS',
                choices:"Windows\nLinux\nMAC",
                description: "Choose Environment to build!")
                }
    stage('Build') {
        if("${params.Environment}" == 'Windows')
        {
       paramAValue = "${params.Environment}"
       build job: 'QA-Test-Windows',parameters: [[$class: 
'StringParameterValue', name: 'ParamA', value: "$paramAValue"]]
        }
    }
    }


QA-Test-Windows is a Freestyle job and in that we tried accessing the 
parameter in script as follows but its not working.


Write-output "OS selected for testing is ${params.ParamA}"

Write-output "OS selected for testing is ${ParamA}"


Tried accessing variables but its not working. Can anyone please help me on 
this. We tried creating QA-Test-Windows freestyle job as Pipelinejob but in 
this freestyle there are lot of Build steps.

-- 
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/1570db6a-6ab0-4a47-a74d-af240fe87d30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to