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

Promotions aren't copies when job generated with DSL

    Details

    • Similar Issues:

      Description

      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
      

        Attachments

          Issue Links

            Activity

            shimitanaka Elad Shmitanka created issue -
            imriz Imri Zvik made changes -
            Field Original Value New Value
            Link This issue is duplicated by JENKINS-40262 [ JENKINS-40262 ]
            oleg_nenashev Oleg Nenashev made changes -
            Labels job-dsl
            oleg_nenashev Oleg Nenashev made changes -
            Epic Link JENKINS-44837 [ 182897 ]

              People

              • Assignee:
                daspilker Daniel Spilker
                Reporter:
                shimitanaka Elad Shmitanka
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: