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

Job DSL Support without Dynamic DSL

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The buildNameUpdater step of the build-name-setter plugin currently only works in Job DSL due to Dynamic DSL which does not work, for example with the Job DSL Standalone generator.

      It would be nice if the plugin would be support in Job DSL officially.

      Thank you.

        Attachments

          Activity

          ciis0 Christoph Schulz created issue -
          oleg_nenashev Oleg Nenashev made changes -
          Field Original Value New Value
          Assignee Oleg Nenashev [ oleg_nenashev ]
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          I will be happy to review pull requests. The plugin is up for adoption in general, so any contributions are welcome.

          Show
          oleg_nenashev Oleg Nenashev added a comment - I will be happy to review pull requests. The plugin is up for adoption in general, so any contributions are welcome.
          Hide
          daspilker Daniel Spilker added a comment -
          Show
          daspilker Daniel Spilker added a comment - It is already supported, see https://jenkinsci.github.io/job-dsl-plugin/#path/job-wrappers-buildName
          daspilker Daniel Spilker made changes -
          Assignee Daniel Spilker [ daspilker ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          Hide
          ciis0 Christoph Schulz added a comment - - edited

          I am talking about the buildNameUpdater step here.

          Show
          ciis0 Christoph Schulz added a comment - - edited I am talking about the buildNameUpdater step here.
          ciis0 Christoph Schulz made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          ciis0 Christoph Schulz made changes -
          Attachment screenshot-1.png [ 45995 ]
          Hide
          ciis0 Christoph Schulz added a comment -

          Screenshot from the API viewer from our Jenkins.

          Show
          ciis0 Christoph Schulz added a comment - Screenshot from the API viewer from our Jenkins.
          ciis0 Christoph Schulz made changes -
          Description {{build-name-setter}} currently only works in Job DSL due to Dynamic DSL which does not work, for example with the Job DSL Standalone generator.

          It would be nice if the plugin would support Job DSL officially.

          Thank you.
          The {{buildNameUpdater}} step of the {{build-name-setter}} plugin currently only works in Job DSL due to Dynamic DSL which does not work, for example with the Job DSL Standalone generator.

          It would be nice if the plugin would be support in Job DSL officially.

          Thank you.
          Hide
          daspilker Daniel Spilker added a comment -

          The built-in DSL is in Maintenance Mode. If a feature is available in Dynamic DSL, it will not be added to the built-in DSL. When not running Job DSL in Jenkins, use a Configure Block to add any configuration that is missing in the built-in DSL.

          Dynamic DSL example:

          job('example') {
              steps {
                  buildNameUpdater {
                      fromFile(true)
                      buildName('name.txt')
                      fromMacro(false)
                      macroTemplate('')
                      macroFirst(false)
                  }
              }
          }
          

          Configure block example:

          job('example') {
              configure {
                  it / 'builders' / 'org.jenkinsci.plugins.buildnameupdater.BuildNameUpdater' {
                      fromFile(true)
                      buildName('name.txt')
                      fromMacro(false)
                      macroTemplate('')
                      macroFirst(false)
                  }
              }
          }
          
          Show
          daspilker Daniel Spilker added a comment - The built-in DSL is in Maintenance Mode . If a feature is available in Dynamic DSL , it will not be added to the built-in DSL. When not running Job DSL in Jenkins, use a Configure Block to add any configuration that is missing in the built-in DSL. Dynamic DSL example: job( 'example' ) { steps { buildNameUpdater { fromFile( true ) buildName( 'name.txt' ) fromMacro( false ) macroTemplate('') macroFirst( false ) } } } Configure block example: job( 'example' ) { configure { it / 'builders' / 'org.jenkinsci.plugins.buildnameupdater.BuildNameUpdater' { fromFile( true ) buildName( 'name.txt' ) fromMacro( false ) macroTemplate('') macroFirst( false ) } } }
          daspilker Daniel Spilker made changes -
          Resolution Won't Fix [ 2 ]
          Status Reopened [ 4 ] Fixed but Unreleased [ 10203 ]
          daspilker Daniel Spilker made changes -
          Status Fixed but Unreleased [ 10203 ] Closed [ 6 ]

            People

            Assignee:
            daspilker Daniel Spilker
            Reporter:
            ciis0 Christoph Schulz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: