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

Setting buildName via job-dsl does not enable before/after build options

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • job-dsl-plugin
    • None
    • Jenkins 1.651.1 with build-name-setter 1.6.3 and job-dsl 1.45

      When using the "buildName" wrapper for a job via job-DSL, neither the "runAtStart" nor "runAtEnd" options are enabled, so the build name is never set.
      Setting these options is not supported by job-DSL either.

      These seem to be newly supported options for build-name-setter. They are enabled by default when configuring a build name via GUI, but disabled when using Job-DSL.

      With build-name-setter 1.5.1:

        <buildWrappers>
          <org.jenkinsci.plugins.buildnamesetter.BuildNameSetter plugin="build-name-setter@1.5.1">
            <template>#${BUILD_NUMBER} custom name</template>
          </org.jenkinsci.plugins.buildnamesetter.BuildNameSetter>
        </buildWrappers>
      

      With build-name-setter 1.6.3:

        <buildWrappers>
          <org.jenkinsci.plugins.buildnamesetter.BuildNameSetter plugin="build-name-setter@1.6.3">
            <template>#${BUILD_NUMBER} custom name</template>
            <runAtStart>false</runAtStart>
            <runAtEnd>false</runAtEnd>
          </org.jenkinsci.plugins.buildnamesetter.BuildNameSetter>
        </buildWrappers>
      

            daspilker Daniel Spilker
            schniedergers Klaus Schniedergers
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: