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

Allow StringParameterValue to be cast to GeneratorKeyValueParameterValue

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      It would be nice if the file parameter factory feature from the parameterized/triggered build plugin could be used with the job generator. Currently, the files are iterated over and the parameters are read in as hudson.model.StringParameterValue which cannot be cast to an org.jenkinsci.plugins.jobgenerator.parameters.GeneratorKeyValueParameterValue. A ClassCastException is thrown. This feature would be very useful to allow for a job which runs a batch of job generator jobs.

        Attachments

          Activity

          Hide
          cjbush Chris Bush added a comment -

          Played around with the source code and got what I needed working. Would this use case have any adverse effects I'm not thinking of?

          Show
          cjbush Chris Bush added a comment - Played around with the source code and got what I needed working. Would this use case have any adverse effects I'm not thinking of?
          Hide
          syl20bnr Sylvain Benner added a comment -

          Thank you for the feedback.
          I will add CounterGeneratorParameters and FileGeneratorParameters in 1.13.
          It's a bit of work to have them work correctly so it will be available in the next few days.

          Show
          syl20bnr Sylvain Benner added a comment - Thank you for the feedback. I will add CounterGeneratorParameters and FileGeneratorParameters in 1.13. It's a bit of work to have them work correctly so it will be available in the next few days.
          Hide
          cjbush Chris Bush added a comment -

          Thanks. No rush.

          If there's anything I can do to help, let me know.

          Show
          cjbush Chris Bush added a comment - Thanks. No rush. If there's anything I can do to help, let me know.
          Hide
          syl20bnr Sylvain Benner added a comment - - edited

          Here it is.
          Associated commit: https://github.com/jenkinsci/jobgenerator-plugin/commit/7677c5a02e3a5555b72b4fd9e81df88a56ffed23

          Important: there is a breaking change and you'll have to perform a global search and replace in your config.xml files, see the wiki for more info --> https://wiki.jenkins-ci.org/display/JENKINS/Job+Generator+Plugin#JobGeneratorPlugin-Changelog

          Show
          syl20bnr Sylvain Benner added a comment - - edited Here it is. Associated commit: https://github.com/jenkinsci/jobgenerator-plugin/commit/7677c5a02e3a5555b72b4fd9e81df88a56ffed23 Important: there is a breaking change and you'll have to perform a global search and replace in your config.xml files, see the wiki for more info --> https://wiki.jenkins-ci.org/display/JENKINS/Job+Generator+Plugin#JobGeneratorPlugin-Changelog

            People

            Assignee:
            syl20bnr Sylvain Benner
            Reporter:
            cjbush Chris Bush
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: