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

Allow disabling use of default exclude patterns (.git, .svn, etc.) for archiving

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • Any

      The plugin available to archive artifacts doesn't allow to chose to archive hidden files/directories like .git, .svn, etc. This feature will help Continuous Integration teams to upstream the .git information to be used for example to get last commit hash, repository server, etc.
      Today, the plugin that copy the workspace is not useful when you do not need more than that artifacts, ans, in some cases, the repository is big.
      Maybe, the plugin can be changed to allow the copy, by selecting the file types.
      I am talking about to change the plugin "Archive Artifact" and "Copy Artifact".

          [JENKINS-20086] Allow disabling use of default exclude patterns (.git, .svn, etc.) for archiving

          As a workaround I have remove ".svn" from the defaultExcludes with an init.groovy hook.

          Per job option seems to me the right way. And maybe per copy/archive task (a checkbox to include defaultExcludes).

          Nicolas Labrot added a comment - As a workaround I have remove ".svn" from the defaultExcludes with an init.groovy hook. Per job option seems to me the right way. And maybe per copy/archive task (a checkbox to include defaultExcludes).

          Daniel Beck added a comment -

          Right, I meant per post-build step. As there's usually only one, it's effectively "per job".

          I don't know whether the same behavior applies to Copy Artifact plugin. I'd consider that a separate issue though, as it's a different component.

          Daniel Beck added a comment - Right, I meant per post-build step. As there's usually only one, it's effectively "per job". I don't know whether the same behavior applies to Copy Artifact plugin. I'd consider that a separate issue though, as it's a different component.

          Nicolas Labrot added a comment - - edited

          I'm giving it a try to pull request a modification of the ArtifactArchiver. I will check the copy artifact plugin.

          Nicolas Labrot added a comment - - edited I'm giving it a try to pull request a modification of the ArtifactArchiver . I will check the copy artifact plugin.

          Artifact archiver issue is fixed on github. I agree with you Daniel, this issue should be split

          Nicolas Labrot added a comment - Artifact archiver issue is fixed on github. I agree with you Daniel, this issue should be split

          Daniel Beck added a comment -

          Nicolas' pull request: https://github.com/jenkinsci/jenkins/pull/1287

          Unless someone else merges it, I'm going to let it soak for a few more days to allow others to provide feedback. This week is JUC Boston, next week JUC Berlin, so most reviewers will be distracted right now.

          Daniel Beck added a comment - Nicolas' pull request: https://github.com/jenkinsci/jenkins/pull/1287 Unless someone else merges it, I'm going to let it soak for a few more days to allow others to provide feedback. This week is JUC Boston, next week JUC Berlin, so most reviewers will be distracted right now.

          Code changed in jenkins
          User: nlabrot
          Path:
          core/src/main/java/hudson/tasks/ArtifactArchiver.java
          core/src/main/resources/hudson/tasks/ArtifactArchiver/config.jelly
          core/src/main/resources/hudson/tasks/ArtifactArchiver/config.properties
          core/src/main/resources/hudson/tasks/ArtifactArchiver/config_fr.properties
          core/src/main/resources/hudson/tasks/ArtifactArchiver/help-defaultExcludes.groovy
          core/src/main/resources/hudson/tasks/ArtifactArchiver/help-defaultExcludes.properties
          core/src/main/resources/hudson/tasks/ArtifactArchiver/help-defaultExcludes_fr.properties
          test/src/test/java/hudson/tasks/ArtifactArchiverTest.java
          http://jenkins-ci.org/commit/jenkins/c726667162084e0199cea858735d35477d04feb9
          Log:
          [FIXED JENKINS-20086] Allow disabling use of default exclude patterns (.git, .svn, etc.)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: nlabrot Path: core/src/main/java/hudson/tasks/ArtifactArchiver.java core/src/main/resources/hudson/tasks/ArtifactArchiver/config.jelly core/src/main/resources/hudson/tasks/ArtifactArchiver/config.properties core/src/main/resources/hudson/tasks/ArtifactArchiver/config_fr.properties core/src/main/resources/hudson/tasks/ArtifactArchiver/help-defaultExcludes.groovy core/src/main/resources/hudson/tasks/ArtifactArchiver/help-defaultExcludes.properties core/src/main/resources/hudson/tasks/ArtifactArchiver/help-defaultExcludes_fr.properties test/src/test/java/hudson/tasks/ArtifactArchiverTest.java http://jenkins-ci.org/commit/jenkins/c726667162084e0199cea858735d35477d04feb9 Log: [FIXED JENKINS-20086] Allow disabling use of default exclude patterns (.git, .svn, etc.)

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          core/src/main/java/hudson/tasks/ArtifactArchiver.java
          core/src/main/resources/hudson/tasks/ArtifactArchiver/config.jelly
          core/src/main/resources/hudson/tasks/ArtifactArchiver/config.properties
          core/src/main/resources/hudson/tasks/ArtifactArchiver/config_fr.properties
          core/src/main/resources/hudson/tasks/ArtifactArchiver/help-defaultExcludes.groovy
          core/src/main/resources/hudson/tasks/ArtifactArchiver/help-defaultExcludes.properties
          core/src/main/resources/hudson/tasks/ArtifactArchiver/help-defaultExcludes_fr.properties
          test/src/test/java/hudson/tasks/ArtifactArchiverTest.java
          http://jenkins-ci.org/commit/jenkins/6d5c25ae7e88fa2e870209b4fe2e55b7b75fc0aa
          Log:
          Merge pull request #1287 from nithril/master

          [FIXED JENKINS-20086] Allow disabling use of default exclude patterns (.git, .svn, etc.)

          Compare: https://github.com/jenkinsci/jenkins/compare/65bc0fb146bf...6d5c25ae7e88

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: core/src/main/java/hudson/tasks/ArtifactArchiver.java core/src/main/resources/hudson/tasks/ArtifactArchiver/config.jelly core/src/main/resources/hudson/tasks/ArtifactArchiver/config.properties core/src/main/resources/hudson/tasks/ArtifactArchiver/config_fr.properties core/src/main/resources/hudson/tasks/ArtifactArchiver/help-defaultExcludes.groovy core/src/main/resources/hudson/tasks/ArtifactArchiver/help-defaultExcludes.properties core/src/main/resources/hudson/tasks/ArtifactArchiver/help-defaultExcludes_fr.properties test/src/test/java/hudson/tasks/ArtifactArchiverTest.java http://jenkins-ci.org/commit/jenkins/6d5c25ae7e88fa2e870209b4fe2e55b7b75fc0aa Log: Merge pull request #1287 from nithril/master [FIXED JENKINS-20086] Allow disabling use of default exclude patterns (.git, .svn, etc.) Compare: https://github.com/jenkinsci/jenkins/compare/65bc0fb146bf...6d5c25ae7e88

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3490
          [FIXED JENKINS-20086] Allow disabling use of default exclude patterns (.git, .svn, etc.) (Revision c726667162084e0199cea858735d35477d04feb9)

          Result = SUCCESS
          nithril : c726667162084e0199cea858735d35477d04feb9
          Files :

          • core/src/main/resources/hudson/tasks/ArtifactArchiver/config_fr.properties
          • core/src/main/resources/hudson/tasks/ArtifactArchiver/help-defaultExcludes.groovy
          • core/src/main/resources/hudson/tasks/ArtifactArchiver/config.properties
          • core/src/main/resources/hudson/tasks/ArtifactArchiver/help-defaultExcludes_fr.properties
          • test/src/test/java/hudson/tasks/ArtifactArchiverTest.java
          • core/src/main/resources/hudson/tasks/ArtifactArchiver/help-defaultExcludes.properties
          • core/src/main/java/hudson/tasks/ArtifactArchiver.java
          • core/src/main/resources/hudson/tasks/ArtifactArchiver/config.jelly

          dogfood added a comment - Integrated in jenkins_main_trunk #3490 [FIXED JENKINS-20086] Allow disabling use of default exclude patterns (.git, .svn, etc.) (Revision c726667162084e0199cea858735d35477d04feb9) Result = SUCCESS nithril : c726667162084e0199cea858735d35477d04feb9 Files : core/src/main/resources/hudson/tasks/ArtifactArchiver/config_fr.properties core/src/main/resources/hudson/tasks/ArtifactArchiver/help-defaultExcludes.groovy core/src/main/resources/hudson/tasks/ArtifactArchiver/config.properties core/src/main/resources/hudson/tasks/ArtifactArchiver/help-defaultExcludes_fr.properties test/src/test/java/hudson/tasks/ArtifactArchiverTest.java core/src/main/resources/hudson/tasks/ArtifactArchiver/help-defaultExcludes.properties core/src/main/java/hudson/tasks/ArtifactArchiver.java core/src/main/resources/hudson/tasks/ArtifactArchiver/config.jelly

          Gordon Jess added a comment -

          Sorry, still experiencing the issue, 

          pipeline code:

          archiveArtifacts artifacts: '*/', defaultExcludes: false, onlyIfSuccessful: true

          Gordon Jess added a comment - Sorry, still experiencing the issue,  pipeline code: archiveArtifacts artifacts: '*/', defaultExcludes: false, onlyIfSuccessful: true

          Daniel Beck added a comment -

          jess Works for me on Jenkins 2.89.3 and up to date plugins (sample Jenkinsfile: https://github.com/daniel-beck/pipeline-test/blob/43a0602597dd80995afa1714928a4b0e643ff18e/Jenkinsfile ). Please make sure you're not trying to archive in the wrong directory. Please file a new bug with complete and detailed steps to reproduce.

          Daniel Beck added a comment - jess Works for me on Jenkins 2.89.3 and up to date plugins (sample Jenkinsfile: https://github.com/daniel-beck/pipeline-test/blob/43a0602597dd80995afa1714928a4b0e643ff18e/Jenkinsfile ). Please make sure you're not trying to archive in the wrong directory. Please file a new bug with complete and detailed steps to reproduce.

            nithril Nicolas Labrot
            eduardodias Eduardo Dias
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: