here I'm triggering my Jenkins job from URL with some parameters and trying to get that parameter values in my pipeline script
Here is the command with URL:
curl -k -v -u user:secrate http://IP:PORT/jenkins/job/GROUP-GROUP/view/Deploy-Jobs/job/Automate-deployment-JOB/buildWithParameters?token=MY-TOCKEN&MY-PARAMETOR=some_value
Pipeline script of jenkins JOB:
pipeline {
agent none
stages{
stage ('test') {
agent { label 'My-Slave' }
steps {
println "$MY-PARAMETOR"
}
}
}
}
Here I'm able to trigger my Jenkins build but not getting the value in pipeline script
Getting the following error:
groovy.lang.MissingPropertyException: No such property: MY-PARAMETOR for class: groovy.lang.Binding
Can any one please help me on this?
Thanks,