Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-18138

Value is not stored as parameter for later use

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I've been testing this plugin and it really doesn't work with current Jenkins release. After choosing version and trying to use that parameter later on, parameter is not recognized using ${param-name} format. I've tried to use this plugin with Artifact resolver plugin.

        Attachments

          Activity

          ovaris Olli Varis created issue -
          Hide
          gesh Gesh Markov added a comment -

          That's because it creates multiple parameters based on the name of the parameter name you supply.

          For example if you named the property "MY_JAR" then the selected version from the dropdown will be "MY_JAR_VERSION". Another one that might be interesting depending on what you want to achieve is: "MY_JAR_ARTIFACT_URL".

          You can see the full list in Jenkins the "Parameters" section of an execution of the job.

          Cheers,
          Gesh

          Show
          gesh Gesh Markov added a comment - That's because it creates multiple parameters based on the name of the parameter name you supply. For example if you named the property "MY_JAR" then the selected version from the dropdown will be "MY_JAR_VERSION". Another one that might be interesting depending on what you want to achieve is: "MY_JAR_ARTIFACT_URL". You can see the full list in Jenkins the "Parameters" section of an execution of the job. Cheers, Gesh
          gesh Gesh Markov made changes -
          Field Original Value New Value
          Fix Version/s current [ 10162 ]
          Resolution Not A Defect [ 7 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Hide
          ovaris Olli Varis added a comment - - edited

          Thanks for swift reply! Exactly where can I see this info?

          EDIT: found it thanks a lot!

          Show
          ovaris Olli Varis added a comment - - edited Thanks for swift reply! Exactly where can I see this info? EDIT: found it thanks a lot!
          Hide
          gesh Gesh Markov added a comment -

          you're welcome.

          Show
          gesh Gesh Markov added a comment - you're welcome.
          gesh Gesh Markov made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Hide
          integer Kanstantsin Shautsou added a comment -

          Entered value must be stored without modification

          Show
          integer Kanstantsin Shautsou added a comment - Entered value must be stored without modification
          integer Kanstantsin Shautsou made changes -
          Resolution Not A Defect [ 7 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Hide
          danielbeck Daniel Beck added a comment -

          Kanstantsin Shautsou Could you explain in more detail why you're reopening this, what the problem is?

          Show
          danielbeck Daniel Beck added a comment - Kanstantsin Shautsou Could you explain in more detail why you're reopening this, what the problem is?
          Hide
          integer Kanstantsin Shautsou added a comment - - edited

          This plugin is injecting variables in form of artifactname+tail. If i'm entering input value name as KEY then it must be a KEY, no magic substitution.

          Show
          integer Kanstantsin Shautsou added a comment - - edited This plugin is injecting variables in form of artifactname+tail. If i'm entering input value name as KEY then it must be a KEY, no magic substitution.
          Hide
          danielbeck Daniel Beck added a comment -

          This plugin is injecting variables in form of artifactname+tail, so when artifactname has dash this variable become unusuable for shell.

          It uses the parameter name for it, not the artifact name.

          If i'm entering input value name as KEY then it must be a KEY, no magic substitution.

          As they say in Wikipedia: citation needed. Its behavior is documented in the inline help, and the ParameterDefinition Javadoc only states:

          The actual meaning and the purpose of parameters are entirely up to users, so what the concrete parameter implmentation is pluggable. Write subclasses in a plugin and put Extension on the descriptor to register them.

          FWIW If you want parameter name = env variable set with input, that's a minor improvement at best, not a blocker bug.

          Show
          danielbeck Daniel Beck added a comment - This plugin is injecting variables in form of artifactname+tail, so when artifactname has dash this variable become unusuable for shell. It uses the parameter name for it, not the artifact name. If i'm entering input value name as KEY then it must be a KEY, no magic substitution. As they say in Wikipedia: citation needed. Its behavior is documented in the inline help, and the ParameterDefinition Javadoc only states: The actual meaning and the purpose of parameters are entirely up to users, so what the concrete parameter implmentation is pluggable. Write subclasses in a plugin and put Extension on the descriptor to register them. FWIW If you want parameter name = env variable set with input, that's a minor improvement at best, not a blocker bug.
          integer Kanstantsin Shautsou made changes -
          Priority Blocker [ 1 ] Minor [ 4 ]
          Hide
          gesh Gesh Markov added a comment -

          As stated in the wiki documentation the variable names are suffixed with _TAIL which makes them perfectly accessible on the command line.

          There are different use cases for this plugin and jenkins doesn't provide a convention for a single parameter being able to create multiple variables, so I just created my own.

          If you enter a parameter value from a command-line job trigger for KEY it will be echoed back as KEY_VERSION, which I admit is awkward. But until jenkins adds a way to define multiple variables from a single parameter awkward is the best you will get from this plugin.

          Show
          gesh Gesh Markov added a comment - As stated in the wiki documentation the variable names are suffixed with _TAIL which makes them perfectly accessible on the command line. There are different use cases for this plugin and jenkins doesn't provide a convention for a single parameter being able to create multiple variables, so I just created my own. If you enter a parameter value from a command-line job trigger for KEY it will be echoed back as KEY_VERSION, which I admit is awkward. But until jenkins adds a way to define multiple variables from a single parameter awkward is the best you will get from this plugin.
          gesh Gesh Markov made changes -
          Resolution Not A Defect [ 7 ]
          Status Reopened [ 4 ] Resolved [ 5 ]
          Hide
          integer Kanstantsin Shautsou added a comment -

          If you have configured input parameters from other plugins and want change them to this plugin - you fail. Because it creates other values. Storing additional variables is ok. But input parameter must be the same that people is entering. This maybe easily fixed with just adding entered value to environment in addition to your existed.

          Show
          integer Kanstantsin Shautsou added a comment - If you have configured input parameters from other plugins and want change them to this plugin - you fail. Because it creates other values. Storing additional variables is ok. But input parameter must be the same that people is entering. This maybe easily fixed with just adding entered value to environment in addition to your existed.
          integer Kanstantsin Shautsou made changes -
          Resolution Not A Defect [ 7 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Hide
          integer Kanstantsin Shautsou added a comment -

          Btw, i'm unable to PR this simple improvement because of annotated framework. It's a first plugin in jenkins that i can't just open in IDEA and start working... Real dependencies are in profiles, java sources in wrong directory, wrong package name. Do you really need this complexity just for 3 classes?

          Show
          integer Kanstantsin Shautsou added a comment - Btw, i'm unable to PR this simple improvement because of annotated framework. It's a first plugin in jenkins that i can't just open in IDEA and start working... Real dependencies are in profiles, java sources in wrong directory, wrong package name. Do you really need this complexity just for 3 classes?
          integer Kanstantsin Shautsou made changes -
          Issue Type Bug [ 1 ] Improvement [ 4 ]
          Priority Minor [ 4 ] Major [ 3 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 149435 ] JNJira + In-Review [ 186127 ]

            People

            Assignee:
            gesh Gesh Markov
            Reporter:
            ovaris Olli Varis
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: