• Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • maven-metadata-plugin
    • None
    • Jenkins 1.515

      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.

          [JENKINS-18138] Value is not stored as parameter for later use

          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 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

          Olli Varis added a comment - - edited

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

          EDIT: found it thanks a lot!

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

          Gesh Markov added a comment -

          you're welcome.

          Gesh Markov added a comment - you're welcome.

          Entered value must be stored without modification

          Kanstantsin Shautsou added a comment - Entered value must be stored without modification

          Daniel Beck added a comment -

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

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

          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.

          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.

          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.

          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.

          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 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.

          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.

          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.

          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?

          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?

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

              Created:
              Updated: