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

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

            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: