[JIRA] (JENKINS-52038) When using build step and a choice parameter plugin it accepts any value
Title: Message Title Andrew Bayer assigned an issue to Andrew Bayer Jenkins / JENKINS-52038 When using build step and a choice parameter plugin it accepts any value Change By: Andrew Bayer Assignee: Andrew Bayer Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-52038) When using build step and a choice parameter plugin it accepts any value
Title: Message Title Andrew Bayer updated JENKINS-52038 Jenkins / JENKINS-52038 When using build step and a choice parameter plugin it accepts any value Change By: Andrew Bayer Status: In Progress Review Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-52038) When using build step and a choice parameter plugin it accepts any value
Title: Message Title Andrew Bayer commented on JENKINS-52038 Re: When using build step and a choice parameter plugin it accepts any value PR up at https://github.com/jenkinsci/pipeline-build-step-plugin/pull/23 Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-52038) When using build step and a choice parameter plugin it accepts any value
Title: Message Title Andrew Bayer updated JENKINS-52038 Releasing as Pipeline Input Step plugin 2.9. Jenkins / JENKINS-52038 When using build step and a choice parameter plugin it accepts any value Change By: Andrew Bayer Status: In Review Resolved Resolution: Fixed Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-52038) When using build step and a choice parameter plugin it accepts any value
Title: Message Title Nick Jones updated an issue Jenkins / JENKINS-52038 When using build step and a choice parameter plugin it accepts any value Change By: Nick Jones {{ When using build step and a choice parameter plugin it accepts any value. Also, it accepts parameters that are not defined. }} {{}}{{ Here we have an example that shows that behavior. }} We need two pipeline jobs: Main job: {code:java} stage ('UpstreamJob')\{ build job: 'DownstreamJob', parameters: [ string(name: 'ARTIFACT_NAME', value: "myArtifact_5.5.5.zip"), string(name: 'DEPLOY_PHASE', value: "Production"), string(name: 'DEPLOYMENT_COLOR', value: "purple"), string(name: 'SOMEEXTRAVAR', value: "Woohoo I can do whatever I want!") ] } {code} ``` And a DownstreamJob Downstream Job : {code:java} properties([ parameters([ string( name: 'ARTIFACT_NAME', description: 'Name of the artifact to deploy', defaultValue: 'myArtifact_1.0.zip' ), choice( choices: ["Development"].join("\n"), description: 'Only development is allowed!', name: 'DEPLOY_PHASE'), choice( choices: ["blue", "green"].join("\n"), description: 'Color of Blue/Green deployment option', name: 'DEPLOYMENT_COLOR') ]) ])UserInput = "User Supplied Values:\n" params.each\{ k, v -> UserInput = UserInput + """ $\{k}\n $\{v}\n""" }echo UserInputstage ('DownstreamJob')\{ echo "The value of SOMEEXTRAVAR: $SOMEEXTRAVAR" } {code} ``` When executing the main job the result is: { { noformat} User Supplied Values: DEPLOYMENT_COLOR purple DEPLOY_PHASE Production SOMEEXTRAVAR Woohoo I can do whatever I want! ARTIFACT_NAME myArtifact_5.5.5.zip [Pipeline] stage [Pipeline] \{ (DownstreamJob) [Pipeline] } [Pipeline] // stage [Pipeline] End of Pipeline groovy.lang.MissingPropertyException: No such property: SOMEEXTRAVAR for class: groovy.lang.Binding at groovy.lang.Binding.getVariable(Binding.java:63) at }} { {``` noformat } } {{ Here we see that the choice value accepts values that are not defined and also the "SOMEEXTRAVAR" that is not a parameter has accepted that value perhaps after executing that step the pipeline build failed telling that there is no valid value for that variable }} Add Comment