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

Promoting a job should also promote all of it modules

    XMLWordPrintable

Details

    Description

      I have a hudson job that is based on a Maven software project. The hudson job builds a Maven parent POM file, that in turn builds several child modules. One of the child modules is "dist", which produces a zip file of the software distribution. My parent has no artifacts. The artifacts I am interested in are owned by the dist module.

      For example:

      my-project
      +-moduleA
      +-moduleB
      +-dist

      I use the promoted-simple-builds plugin in conjunction with the copy artifact plugin. When my-project is released, I use the promoted-simple-builds plugin to promote the build to "GA Release".

      Then, (in a separate Hudson job), I use the Copy artifacts plugin to copy the dist module's artifacts to a known directory.

      Unfortunately, it looks like only the parent job (my-project) is tagged as a "GA Release". The child modules do not appear to get tagged - and as a result, I can't use the Copy Artifact plugin to say "copy the artifacts from the last GA Release build of the dist module to directory X", as I get the following error:

      Building on master
      Unable to find a build for artifact copy from: my-project/my-project$dist
      Finished: FAILURE

      The Promotion drop down is not available from the module's build page by default. But, interestingly if I use this URL:

      http://my-hudson/job/my-project/706/my-project$dist/parent/parent/parent/plugin/promoted-builds-simple/makePromotable

      Then, I can navigate to the module's build page and flag the individual module as "GA Release" - then the Copy Artifacts configuration works (which implies when dist is flagged as a "GA Release", then I can select it from Copy Artifact).

      However, this is a very manual process. And it seems that if a parent has been tagged as "Promoted", then it should be implied that all of the children have been "Promoted" as well.

      Attachments

        Activity

          mindless Alan Harder added a comment -

          (from 31-Jan 9:58pm)

          Another possible workaround for now: just specify the maven project, rather than the specific module.. copyartifact plugin now copies all artifacts in this case, so you should get all artifacts for latest GA release. Perhaps more than you need, but at least the right files..

          mindless Alan Harder added a comment - (from 31-Jan 9:58pm) Another possible workaround for now: just specify the maven project, rather than the specific module.. copyartifact plugin now copies all artifacts in this case, so you should get all artifacts for latest GA release. Perhaps more than you need, but at least the right files..
          mindless Alan Harder added a comment -

          (from bkuder 1-Feb 8:57am)

          That works great. Thanks.

          I changed my configuration to "Copy Artifacts" from the parent project (my-project instead of my-project/my-project$dist) and it grabs all the artifacts under a promoted build - as you indicated it would.

          Then I used the "Artifacts to copy" filter to grab just the dist files that I need (com.my-project/dist/*/.zip) so I don't end up copying everything.

          Thanks very much for your reply!

          Brian

          mindless Alan Harder added a comment - (from bkuder 1-Feb 8:57am) That works great. Thanks. I changed my configuration to "Copy Artifacts" from the parent project (my-project instead of my-project/my-project$dist) and it grabs all the artifacts under a promoted build - as you indicated it would. Then I used the "Artifacts to copy" filter to grab just the dist files that I need (com.my-project/dist/*/.zip) so I don't end up copying everything. Thanks very much for your reply! Brian
          mindless Alan Harder added a comment -

          next release will check for promotion in parent build for maven/matrix

          mindless Alan Harder added a comment - next release will check for promotion in parent build for maven/matrix

          People

            mindless Alan Harder
            bkuder bkuder
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: