• Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • maven-plugin
    • None

      In JENKINS-4593, archiving of artifacts was made optional. In some setups (like ours) it would be good if it was possible to disable archiving altogether. Archiving uses lots of network bandwidth between master and slave and takes much more time than the build itself.

      It would be great to have a global setting to disable archiving. I imagine there are two ways to implement this:

      1. If the global flag is set, there's no archiving ever, the corresponding "disable archiving" flag on job level isn't even displayed.
      2. If the global flag is set, newly created jobs start out with a checked "disable archiving" flag that users can uncheck if they want to.

      I don't mind either way, thank you for reading

          [JENKINS-9030] Disable Archiving for all Maven Jobs

          Olivier Lamy added a comment -

          probably nice enhancement.
          But I wonder why you are not using a groovy script to change the "disable archiving" for all of your maven builds ?
          Perso, I have done it with a groovy script.

          Olivier Lamy added a comment - probably nice enhancement. But I wonder why you are not using a groovy script to change the "disable archiving" for all of your maven builds ? Perso, I have done it with a groovy script.

          I use the Job DSL to create my jobs and I keep forgetting about the "Disable automatic artifact archiving" option (under "Build", then click "Advanced" to show it).

          The help text in 1.532.1 reads:

          If checked, Jenkins will not automatically archive all artifacts generated by this project. If you wish to archive the results of this build within Jenkins, you will need to use the "Archive the Artifacts" post-build action below.

          I've had problems with running out of space multiple times on different servers (I've set up Jenkins for other groups in our business) because we use Nexus for managing artifacts.

          If you google for this option, you'll see tons of emails, posts, etc. telling people to "Disable automatic artifact archiving".

          I'm assuming there is an advantage to not checking this box, but I'm unsure what it is.

          I have two possible suggestions:

          Reverse the flag: [] Enable automatic maven artifact archiving

          Alternatively, (assuming it provides something above and beyond mere "Archive Artifacts") move the option down to a "Post Build" step, next to archive artifacts so that it is obvious.

          Another option is to move it into the Archive Artifacts plugin.

          Ciao!

          Christian Höltje added a comment - I use the Job DSL to create my jobs and I keep forgetting about the "Disable automatic artifact archiving" option (under "Build", then click "Advanced" to show it). The help text in 1.532.1 reads: If checked, Jenkins will not automatically archive all artifacts generated by this project. If you wish to archive the results of this build within Jenkins, you will need to use the "Archive the Artifacts" post-build action below. I've had problems with running out of space multiple times on different servers (I've set up Jenkins for other groups in our business) because we use Nexus for managing artifacts. If you google for this option, you'll see tons of emails, posts, etc. telling people to "Disable automatic artifact archiving". I'm assuming there is an advantage to not checking this box, but I'm unsure what it is. I have two possible suggestions: Reverse the flag: [] Enable automatic maven artifact archiving Alternatively, (assuming it provides something above and beyond mere "Archive Artifacts") move the option down to a "Post Build" step, next to archive artifacts so that it is obvious. Another option is to move it into the Archive Artifacts plugin. Ciao!

          Amgad Hanafy added a comment -

          olamy
          can you please provide the groovy script

          Amgad Hanafy added a comment - olamy can you please provide the groovy script

          Dominik Kaspar added a comment - - edited

          Dominik Kaspar added a comment - - edited olamy , the script would really by useful... Here I found one: https://github.com/jenkinsci/jenkins-scripts/blob/master/scriptler/disableAutomaticMavenArchiving.groovy

            Unassigned Unassigned
            mafr Matthias Friedrich
            Votes:
            12 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated: