Include the possibility to generate configs to use the "Promoted Builds Plugin". Add new DSL components and generators for creating XML files in the place where the plugin expects it to be.

          [JENKINS-21750] Promoted Builds Plugin

          Justin Ryan added a comment -

          This'll definitely need some special support for something like this. Since this is a common problem, saving files alongside the config.xml, please take a little extra time to make it a re-usable feature.

          Justin Ryan added a comment - This'll definitely need some special support for something like this. Since this is a common problem, saving files alongside the config.xml, please take a little extra time to make it a re-usable feature.

          Thomas Bosch added a comment -

          I tried to make it reusable for others to extend the plugin. See pull request.

          Thomas Bosch added a comment - I tried to make it reusable for others to extend the plugin. See pull request.

          Maxime Lemanissier added a comment - - edited

          Hi,

          I was migrating to DSL plugin to manage all our CI and release jobs (~400) when I discovered that promotions are not yet supported, which is a blocker to implement our build pipeline.
          In my case, promotions are configured in template jobs. Jobs created using these templates get any empty 'promotion' folder.
          That would be great to support this.

          Here is the link to Thomas' pull request (additional discussion in it) that may help to track progress on this subject : https://github.com/jenkinsci/job-dsl-plugin/pull/157

          Maxime Lemanissier added a comment - - edited Hi, I was migrating to DSL plugin to manage all our CI and release jobs (~400) when I discovered that promotions are not yet supported, which is a blocker to implement our build pipeline. In my case, promotions are configured in template jobs. Jobs created using these templates get any empty 'promotion' folder. That would be great to support this. Here is the link to Thomas' pull request (additional discussion in it) that may help to track progress on this subject : https://github.com/jenkinsci/job-dsl-plugin/pull/157

          Steve Jansen added a comment -

          For community visibility, I recently rebased Thomas' pull request with the lastest updates to the plugin and added a small fix. This PR is now able to merge Thomas' work into master: https://github.com/jenkinsci/job-dsl-plugin/pull/291

          Steve Jansen added a comment - For community visibility, I recently rebased Thomas' pull request with the lastest updates to the plugin and added a small fix. This PR is now able to merge Thomas' work into master: https://github.com/jenkinsci/job-dsl-plugin/pull/291

          I don't know if this could help but Promoted build plugin v2.18 introduces a new REST API to manage promotions (fixes https://issues.jenkins-ci.org/browse/JENKINS-8963).
          Maybe DSL plugin could use it?

          Maxime Lemanissier added a comment - I don't know if this could help but Promoted build plugin v2.18 introduces a new REST API to manage promotions (fixes https://issues.jenkins-ci.org/browse/JENKINS-8963 ). Maybe DSL plugin could use it?

          Bruce Edge added a comment -

          Seems like the promoted build plugin's choice to use external config files breaks every other plugin that tries to some generic task with config files, including backup, git snapshots, etc.
          Would it be less trouble to migrate the promoted builds data into the main config.xml.

          Bruce Edge added a comment - Seems like the promoted build plugin's choice to use external config files breaks every other plugin that tries to some generic task with config files, including backup, git snapshots, etc. Would it be less trouble to migrate the promoted builds data into the main config.xml.

          Thomas Bosch added a comment -

          Yes, of course it would be simpler just to fill in all promoted build plugin config data in standard config.xml
          Maybe there should be a task for promoted build plugin developers to change the way config data is persisted.

          Thomas Bosch added a comment - Yes, of course it would be simpler just to fill in all promoted build plugin config data in standard config.xml Maybe there should be a task for promoted build plugin developers to change the way config data is persisted.

          Steve Jansen added a comment -

          @Thomas, my understanding is the external config files exist because each promotion is really a child job in Jenkins, and child jobs have their own config, history, etc. This makes sense when you start to think about how a promotion with manual approval would be hard to implement in a single job config. What do you think?

          Steve Jansen added a comment - @Thomas, my understanding is the external config files exist because each promotion is really a child job in Jenkins, and child jobs have their own config, history, etc. This makes sense when you start to think about how a promotion with manual approval would be hard to implement in a single job config. What do you think?

          Code changed in jenkins
          User: Ryan Campbell
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/bb487bc0986d99b940f2fff6c3eece16ed2a50d7
          Log:
          [FIXED JENKINS-21750] Update changelog

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ryan Campbell Path: changelog.html http://jenkins-ci.org/commit/jenkins/bb487bc0986d99b940f2fff6c3eece16ed2a50d7 Log: [FIXED JENKINS-21750] Update changelog

          Ryan Campbell added a comment -

          Typo in commit message accidently closed this. Reopening.

          Ryan Campbell added a comment - Typo in commit message accidently closed this. Reopening.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3966
          [FIXED JENKINS-21750] Update changelog (Revision bb487bc0986d99b940f2fff6c3eece16ed2a50d7)

          Result = SUCCESS
          ryan campbell : bb487bc0986d99b940f2fff6c3eece16ed2a50d7
          Files :

          • changelog.html

          dogfood added a comment - Integrated in jenkins_main_trunk #3966 [FIXED JENKINS-21750] Update changelog (Revision bb487bc0986d99b940f2fff6c3eece16ed2a50d7) Result = SUCCESS ryan campbell : bb487bc0986d99b940f2fff6c3eece16ed2a50d7 Files : changelog.html

          Jake Bogerd added a comment -

          Is actively being worked on? I saw that https://github.com/jenkinsci/job-dsl-plugin/pull/468 was recently merged.

          I'm really interested in using the job DSL plugin, but this issue would be a blocker for me. Is there any way for interested parties to help out with this or is it a one person job?

          Jake Bogerd added a comment - Is actively being worked on? I saw that https://github.com/jenkinsci/job-dsl-plugin/pull/468 was recently merged. I'm really interested in using the job DSL plugin, but this issue would be a blocker for me. Is there any way for interested parties to help out with this or is it a one person job?

          Jörg Eichhorn added a comment - - edited

          I think (following the discussions of the github issue) this ticket might be reallocated to the Promoted Builds Plugin to support the Job DSL Plugin, not the other way around - at least this is the way I understood the recently merged pull.

          So either this or closing this as done and opening a fresh ticket for Promoted Builds Plugin like "Contribute to Job DSL Plugin Extension Point".

          As far as I studied the extension point it's really straight forward to use, unfortunately the code of the Promoted Builds Plugin is way more complex, which is why I didn't do it in the first place.

          For anybody interested: the documentation of the extension point.

          Any further thoughts?

          Jörg Eichhorn added a comment - - edited I think (following the discussions of the github issue ) this ticket might be reallocated to the Promoted Builds Plugin to support the Job DSL Plugin, not the other way around - at least this is the way I understood the recently merged pull . So either this or closing this as done and opening a fresh ticket for Promoted Builds Plugin like "Contribute to Job DSL Plugin Extension Point". As far as I studied the extension point it's really straight forward to use, unfortunately the code of the Promoted Builds Plugin is way more complex, which is why I didn't do it in the first place. For anybody interested: the documentation of the extension point . Any further thoughts?

          Adding promoted builds plugin component, maybe there's somebody paying attention.

          Jörg Eichhorn added a comment - Adding promoted builds plugin component, maybe there's somebody paying attention.

          jek Are you actively working on the integration? Is there already a pull-request that I can try? I am waiting for this for quiet some time now and I would like to contribute if I can. We are stuck on a very old custom build to the DSL plugin and I would really like to update to an official release, but support for promoted builds is a show-stopper for us.

          Thasso Griebel added a comment - jek Are you actively working on the integration? Is there already a pull-request that I can try? I am waiting for this for quiet some time now and I would like to contribute if I can. We are stuck on a very old custom build to the DSL plugin and I would really like to update to an official release, but support for promoted builds is a show-stopper for us.

          Daniel Spilker added a comment - denschu is working on this, see https://groups.google.com/forum/#!msg/jenkinsci-dev/IZ3kBFhIYYg/amywuitlHAAJ .

          @Thasso: You can try the actual implementation from here: https://github.com/codecentric/job-dsl-promotions-plugin
          It should work with the actual Job DSL Plugin 1.37.
          My problem is that the request to create it as an official jenkins plugin was rejected by the community. I should integrate it into the Promoted Builds Plugin, but I see problems here, because it doesn't contain any Groovy stuff at the moment und I guess that the Promoted Build Plugin developer will not be happy with it. I'm actually waiting for feedback from them:[ https://issues.jenkins-ci.org/browse/JENKINS-29776]

          Dennis Schulte added a comment - @Thasso: You can try the actual implementation from here: https://github.com/codecentric/job-dsl-promotions-plugin It should work with the actual Job DSL Plugin 1.37. My problem is that the request to create it as an official jenkins plugin was rejected by the community. I should integrate it into the Promoted Builds Plugin, but I see problems here, because it doesn't contain any Groovy stuff at the moment und I guess that the Promoted Build Plugin developer will not be happy with it. I'm actually waiting for feedback from them:[ https://issues.jenkins-ci.org/browse/JENKINS-29776 ]

          Steve Jansen added a comment -

          denschu Perhaps a pragmatic alternative is to ship the job-dsl-promotions-plugin as a jar inside the hpi for the dsl plugin? You still get separation of the code bases. Definitely not ideal, but, would work for end users.

          Steve Jansen added a comment - denschu Perhaps a pragmatic alternative is to ship the job-dsl-promotions-plugin as a jar inside the hpi for the dsl plugin? You still get separation of the code bases. Definitely not ideal, but, would work for end users.

          stevejansen That would be ok for me. Who is going to decide that? In this case I need to release the job-dsl-promotions-plugin separately, right?

          Dennis Schulte added a comment - stevejansen That would be ok for me. Who is going to decide that? In this case I need to release the job-dsl-promotions-plugin separately, right?

          Erik Englund added a comment -

          We've been using Job-dsl latest version and latest Jenkins. However, now we NEED the promotions plugin. Unless this capability is added to job-dsl we may need to consider dropping our use of it.

          Ideally it would be nice to install the extension as a Jenkins plugin in addition to the regular job promotion plugin and job-dsl.

          Erik Englund added a comment - We've been using Job-dsl latest version and latest Jenkins. However, now we NEED the promotions plugin. Unless this capability is added to job-dsl we may need to consider dropping our use of it. Ideally it would be nice to install the extension as a Jenkins plugin in addition to the regular job promotion plugin and job-dsl.

          I think I could helped Erik with his problem. But how can we come to a solution here?

          Actually there are 3 options:

          stevejansen Can you help here?

          Dennis Schulte added a comment - I think I could helped Erik with his problem. But how can we come to a solution here? Actually there are 3 options: Create a completely separate plugin. This plugin request was rejected. See here: https://groups.google.com/forum/#!msg/jenkinsci-dev/IZ3kBFhIYYg/amywuitlHAAJ Include the extension as a separate jar inside the job-dsl-plugin Integrate the extension completely into the Promoted Builds Plugin stevejansen Can you help here?

          Steve Jansen added a comment -

          Hi,

          Option #4:

          We release the plugin as an out of band hpi file as a GitHib Release. We use the existing GH repo.

          I've had a few people stumble on my ancient hpi which uses this distributions method. We could add the URI to install the hpi in the DSL docs (which are outstanding). Having hard data on community downloads for a new plugin might sway the minds of more senior CloudBees team members.

          Warm regards,
          Steve

          Steve Jansen added a comment - Hi, Option #4: We release the plugin as an out of band hpi file as a GitHib Release. We use the existing GH repo. I've had a few people stumble on my ancient hpi which uses this distributions method. We could add the URI to install the hpi in the DSL docs (which are outstanding). Having hard data on community downloads for a new plugin might sway the minds of more senior CloudBees team members. Warm regards, Steve

          What about option #3, integrating the extension into the Promoted Builds Plugin? denschu have you contacted the Promoted Build Plugin maintainer(s)? If you get no answer, ask for commit access on the jenkins-dev list and just do it.

          Daniel Spilker added a comment - What about option #3, integrating the extension into the Promoted Builds Plugin? denschu have you contacted the Promoted Build Plugin maintainer(s)? If you get no answer, ask for commit access on the jenkins-dev list and just do it.

          daspilker Yes, I created a ticket, but no response: https://issues.jenkins-ci.org/browse/JENKINS-29776
          The problem with option #3 is that we have to add Groovy to the codebase of the plugin, which will maybe not accepted by the maintainers of the Promoted Builds plugin...

          Dennis Schulte added a comment - daspilker Yes, I created a ticket, but no response: https://issues.jenkins-ci.org/browse/JENKINS-29776 The problem with option #3 is that we have to add Groovy to the codebase of the plugin, which will maybe not accepted by the maintainers of the Promoted Builds plugin...

          stevejansen We are actually testing the Extension in a big Jenkins setup with version 1.630. If this works, I'll create a release of it...

          Dennis Schulte added a comment - stevejansen We are actually testing the Extension in a big Jenkins setup with version 1.630. If this works, I'll create a release of it...

          denschu OK, but no one objected to add Groovy code in your last dev list thread (https://groups.google.com/forum/#!msg/jenkinsci-dev/IZ3kBFhIYYg/amywuitlHAAJ). I suggest to open a pull request. If no one replied after 2 weeks, ask for commit access on the jenkins-dev list. If you get commit access, integrate your Groovy code into the Promoted Builds Plugin and release the plugin. If not, we need to discuss a viable solution with the maintainer. IMHO, releasing a plugin outside of the Update Center is only a short-term solution.

          Daniel Spilker added a comment - denschu OK, but no one objected to add Groovy code in your last dev list thread ( https://groups.google.com/forum/#!msg/jenkinsci-dev/IZ3kBFhIYYg/amywuitlHAAJ ). I suggest to open a pull request. If no one replied after 2 weeks, ask for commit access on the jenkins-dev list. If you get commit access, integrate your Groovy code into the Promoted Builds Plugin and release the plugin. If not, we need to discuss a viable solution with the maintainer. IMHO, releasing a plugin outside of the Update Center is only a short-term solution.

          Vlad Aginsky added a comment -

          Guys, any update on this?

          Vlad Aginsky added a comment - Guys, any update on this?

          Hi,
          I created a PR which includes the extension directly into the main promoted-builds-plugin: https://github.com/jenkinsci/promoted-builds-plugin/pull/81
          If the PR is merged, we can close this ticket here...

          Thanks
          Dennis

          Dennis Schulte added a comment - Hi, I created a PR which includes the extension directly into the main promoted-builds-plugin: https://github.com/jenkinsci/promoted-builds-plugin/pull/81 If the PR is merged, we can close this ticket here... Thanks Dennis

          Chris Z added a comment - - edited

          [edit] removed due to misleading information

          Chris Z added a comment - - edited [edit] removed due to misleading information

          The pull request has not been merged yet.

          The current PR is https://github.com/jenkinsci/promoted-builds-plugin/pull/82.

          Daniel Spilker added a comment - The pull request has not been merged yet. The current PR is https://github.com/jenkinsci/promoted-builds-plugin/pull/82 .

          Chris Z added a comment -

          Yes, you are right. I have no idea how I have seen it in master branch. My bad

          Chris Z added a comment - Yes, you are right. I have no idea how I have seen it in master branch. My bad

          Has been released in Promoted Builds plugin 2.26.

          Daniel Spilker added a comment - Has been released in Promoted Builds plugin 2.26.

            dickerpulli Thomas Bosch
            dickerpulli Thomas Bosch
            Votes:
            20 Vote for this issue
            Watchers:
            35 Start watching this issue

              Created:
              Updated:
              Resolved: