Currently Job DSL plugin supports promoted builds plugin by extension point (see JENKINS-29776, JENKINS-21750).
      Unfortunately there is no support for deployment notification plugin and there is no configure block available for promotion conditions so it is impossible to add that criteria.
      Adding a configure block would allow any condition to be added when necessary.

          [JENKINS-34982] Add configure block in DSL for promotions

          Wisen Tanasa added a comment -

          "Keep build forever" action, which is a step that is provided by promoted builds plugin is also not supported in the DSL at the moment. Adding a Configure block support would be great.

          Wisen Tanasa added a comment - "Keep build forever" action, which is a step that is provided by promoted builds plugin is also not supported in the DSL at the moment. Adding a Configure block support would be great.

          FYI an experimental branch tried to rethink the design of the Job-DSL integration (and more generally address the scalability of the promoted-builds-plugin DSL) https://github.com/jenkinsci/promoted-builds-plugin/pull/96#issuecomment-255899713 :

          The driver for those changes is the scalability of the DSL extension when using the existing implementation:

          • promoted-builds-plugin developers may not know how/when they also have to provide DSL integration to allow `job-dsl-plugin`. Eg: GroovyCondition is not covered by the DSL extension even though it is provided by the very same plugin.
          • Third-party plugin developers wanting to extend promoted-builds-plugin (ie. wanting to provide custom PromotionCondition (which extends ExtensionPoint) for their own plugin) have to add binary dependency on promoted-builds-plugin to their own plugin because of the domain object to XML serialization approach (this creates a chicken-egg problem defeating the purpose of providing {{ExtensionPoint}}s).
          • job-dsl-plugin users cannot manipulate the PromotionProcess XML to workaround lack of integration https://github.com/jenkinsci/job-dsl-plugin/wiki/The-Configure-Block

          Those issues all have a common impact: they prevent job-dsl-plugin users from being able to generate fine-tuned promotions as soon as the components they need is not implemented into the DSL extension.
          The proposed changes tries to adopt the https://github.com/jenkinsci/job-dsl-plugin/wiki/Automatically-Generated-DSL approach applied to this DSL extension to fix those issues.

          As for the implementation, it indeed needs to be improved/fixed at least for the reported issues

          The branch itself brings its share of issues (as reminded by plugin maintainer): binary compatibility and migration path. It could also use some advice from job-dsl-plugin maintainers for approval/endorsement purpose.

          Frédéric Chuong added a comment - FYI an experimental branch tried to rethink the design of the Job-DSL integration (and more generally address the scalability of the promoted-builds-plugin DSL) https://github.com/jenkinsci/promoted-builds-plugin/pull/96#issuecomment-255899713 : The driver for those changes is the scalability of the DSL extension when using the existing implementation: promoted-builds-plugin developers may not know how/when they also have to provide DSL integration to allow `job-dsl-plugin`. Eg: GroovyCondition is not covered by the DSL extension even though it is provided by the very same plugin. Third-party plugin developers wanting to extend promoted-builds-plugin (ie. wanting to provide custom PromotionCondition (which extends ExtensionPoint ) for their own plugin) have to add binary dependency on promoted-builds-plugin to their own plugin because of the domain object to XML serialization approach (this creates a chicken-egg problem defeating the purpose of providing {{ExtensionPoint}}s). job-dsl-plugin users cannot manipulate the PromotionProcess XML to workaround lack of integration https://github.com/jenkinsci/job-dsl-plugin/wiki/The-Configure-Block Those issues all have a common impact: they prevent job-dsl-plugin users from being able to generate fine-tuned promotions as soon as the components they need is not implemented into the DSL extension. The proposed changes tries to adopt the https://github.com/jenkinsci/job-dsl-plugin/wiki/Automatically-Generated-DSL approach applied to this DSL extension to fix those issues. As for the implementation, it indeed needs to be improved/fixed at least for the reported issues The branch itself brings its share of issues (as reminded by plugin maintainer): binary compatibility and migration path. It could also use some advice from job-dsl-plugin maintainers for approval/endorsement purpose.

          Oleg Nenashev added a comment -

          fchuong Any plans to continue working on it?

          Oleg Nenashev added a comment - fchuong Any plans to continue working on it?

          pam added a comment -

          Just noting this would be super helpful for my team as well! 

          pam added a comment - Just noting this would be super helpful for my team as well! 

            fchuong Frédéric Chuong
            garagoth Marcin Pikulski
            Votes:
            14 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated: