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

Add option to flatten directories when copying artifacts

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Currently when artifacts are copied they include the full directory of the artifacts that were archived. I have a use case where I'd like to copy the generated jar from a build into the web-inf folder of another build but the directory structure is also included.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/plugins/copyartifact/src/main/java/hudson/plugins/copyartifact/CopyArtifact.java
          trunk/hudson/plugins/copyartifact/src/main/resources/hudson/plugins/copyartifact/CopyArtifact/config.jelly
          trunk/hudson/plugins/copyartifact/src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-filter.html
          trunk/hudson/plugins/copyartifact/src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-target.html
          trunk/hudson/plugins/copyartifact/src/main/webapp/help-flatten-optional.html
          trunk/hudson/plugins/copyartifact/src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
          http://jenkins-ci.org/commit/30362
          Log:
          [copyartifact] [FIXED JENKINS-6345]
          Add option to flatten directories when copying, so all artifacts
          from source project are copied directly into target directory.
          Also an option to make the copy optional, so build doesn't fail
          if build, workspace, or matching artifact is not found.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/plugins/copyartifact/src/main/java/hudson/plugins/copyartifact/CopyArtifact.java trunk/hudson/plugins/copyartifact/src/main/resources/hudson/plugins/copyartifact/CopyArtifact/config.jelly trunk/hudson/plugins/copyartifact/src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-filter.html trunk/hudson/plugins/copyartifact/src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-target.html trunk/hudson/plugins/copyartifact/src/main/webapp/help-flatten-optional.html trunk/hudson/plugins/copyartifact/src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java http://jenkins-ci.org/commit/30362 Log: [copyartifact] [FIXED JENKINS-6345] Add option to flatten directories when copying, so all artifacts from source project are copied directly into target directory. Also an option to make the copy optional, so build doesn't fail if build, workspace, or matching artifact is not found.
          Hide
          userid First Name added a comment -

          this doesn't work on matrix projects.

          Copied 2 artifacts from "RPM Build Area » Build SRPM in mock » fused-centos-7" build number 40
          [test3] $ /bin/sh -xe /var/lib/jenkins/tmp/hudson4766933605436071185.sh
          + find . -ls
           22735    8 drwxrwxr-x   3 jenkins  jenkins      4096 Jul 26 16:59 .
           22737    8 drwxrwxr-x   2 jenkins  jenkins      4096 Jul 26 16:59 ./MOCK_TARGET=fused-centos-7
           22725  620 -rw-r--r--   1 jenkins  jenkins    631884 Jul 26 16:54 ./MOCK_TARGET=fused-centos-7/ea-php55-php-devel-5.5.38-2.fused.el7.x86_64.rpm
           22738 8752 -rw-r--r--   1 jenkins  jenkins   8958484 Jul 26 16:54 ./MOCK_TARGET=fused-centos-7/ea-php55-php-cli-5.5.38-2.fused.el7.x86_64.rpm
          Finished: SUCCESS
          
          Show
          userid First Name added a comment - this doesn't work on matrix projects. Copied 2 artifacts from "RPM Build Area » Build SRPM in mock » fused-centos-7" build number 40 [test3] $ /bin/sh -xe / var /lib/jenkins/tmp/hudson4766933605436071185.sh + find . -ls 22735 8 drwxrwxr-x 3 jenkins jenkins 4096 Jul 26 16:59 . 22737 8 drwxrwxr-x 2 jenkins jenkins 4096 Jul 26 16:59 ./MOCK_TARGET=fused-centos-7 22725 620 -rw-r--r-- 1 jenkins jenkins 631884 Jul 26 16:54 ./MOCK_TARGET=fused-centos-7/ea-php55-php-devel-5.5.38-2.fused.el7.x86_64.rpm 22738 8752 -rw-r--r-- 1 jenkins jenkins 8958484 Jul 26 16:54 ./MOCK_TARGET=fused-centos-7/ea-php55-php-cli-5.5.38-2.fused.el7.x86_64.rpm Finished: SUCCESS

            People

            • Assignee:
              mindless Alan Harder
              Reporter:
              hand_of_henry hand_of_henry
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: