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

Promotions aren't copies when job generated with DSL

XMLWordPrintable

      Sample DSL:

      freeStyleJob('test1') {
        properties {
          promotions {
            promotion {
              name('promotion 1')
              icon('Silver white star')
              conditions {
                manual('admin')
              }
              actions {
                shell "echo test"
              }
            }
          }
        }
      }
      
      freeStyleJob('test2') {
        using('test1')
      }
      

      test1 is built fine
      XML for test2:

      <?xml version="1.0" encoding="UTF-8"?><project>
          <actions/>
          <description/>
          <keepDependencies>false</keepDependencies>
          <properties>
              <hudson.plugins.promoted__builds.JobPropertyImpl plugin="promoted-builds@2.28">
                  <activeProcessNames>
                      <string>promotion 1</string>
                  </activeProcessNames>
              </hudson.plugins.promoted__builds.JobPropertyImpl>
          </properties>
          <scm class="hudson.scm.NullSCM"/>
          <canRoam>true</canRoam>
          <disabled>false</disabled>
          <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
          <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
          <triggers/>
          <concurrentBuild>false</concurrentBuild>
          <builders/>
          <publishers/>
          <buildWrappers/>
      </project>
      

      however, no promotions:

      # ls test2/promotions/ | wc -l
      0
      

            jamietanna Jamie Tanna
            shimitanaka Elad Shmitanka
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: