Can any one tell me how to call jenkin parameter value into the groovy script?
Im creating a jenkins job that give permission to a another job for a perticular User.
below pic shows the parameter. i want to call that parameter value into the groovy script
please find the script below:
import hudson.model.AbstractProject
import hudson.model.Item
import hudson.security.AuthorizationMatrixProperty
import hudson.security.Permission
AbstractProject proj = hudson.model.Hudson.instance.getItem("testjob")
AuthorizationMatrixProperty authProperty = proj.getProperty(AuthorizationMatrixProperty.class)
Set<String> users = new HashSet<>();
users.add('userid'); // XXX
Map<Permission,Set<String>> newPermissions = new HashMap<Permission, Set<String>>()
newPermissions.put(Item.READ, users)
proj.addProperty(new AuthorizationMatrixProperty(newPermissions))
proj.save()
That parameter value should have to come here userid in the groovy script
can any one tell me how to call jenkin parameter value into the groovy script
Thanks in advance
