Package hudson.tasks

Class ArtifactArchiver

    • Constructor Detail

      • ArtifactArchiver

        @DataBoundConstructor
        public ArtifactArchiver​(String artifacts)
      • ArtifactArchiver

        @Deprecated
        public ArtifactArchiver​(String artifacts,
                                String excludes,
                                boolean latestOnly)
        Deprecated.
      • ArtifactArchiver

        @Deprecated
        public ArtifactArchiver​(String artifacts,
                                String excludes,
                                boolean latestOnly,
                                boolean allowEmptyArchive)
        Deprecated.
      • ArtifactArchiver

        @Deprecated
        public ArtifactArchiver​(String artifacts,
                                String excludes,
                                boolean latestOnly,
                                boolean allowEmptyArchive,
                                boolean onlyIfSuccessful)
        Deprecated.
      • ArtifactArchiver

        @Deprecated
        public ArtifactArchiver​(String artifacts,
                                String excludes,
                                boolean latestOnly,
                                boolean allowEmptyArchive,
                                boolean onlyIfSuccessful,
                                Boolean defaultExcludes)
        Deprecated.
    • Method Detail

      • readResolve

        protected Object readResolve()
      • getArtifacts

        public String getArtifacts()
      • getExcludes

        @CheckForNull
        public String getExcludes()
      • setExcludes

        @DataBoundSetter
        public final void setExcludes​(@CheckForNull
                                      String excludes)
      • isLatestOnly

        @Deprecated
        public boolean isLatestOnly()
        Deprecated.
      • isOnlyIfSuccessful

        public boolean isOnlyIfSuccessful()
      • setOnlyIfSuccessful

        @DataBoundSetter
        public final void setOnlyIfSuccessful​(boolean onlyIfSuccessful)
      • isFingerprint

        public boolean isFingerprint()
      • setFingerprint

        @DataBoundSetter
        public void setFingerprint​(boolean fingerprint)
        Whether to fingerprint the artifacts after we archive them.
      • getAllowEmptyArchive

        public boolean getAllowEmptyArchive()
      • setAllowEmptyArchive

        @DataBoundSetter
        public final void setAllowEmptyArchive​(boolean allowEmptyArchive)
      • isDefaultExcludes

        public boolean isDefaultExcludes()
      • setDefaultExcludes

        @DataBoundSetter
        public final void setDefaultExcludes​(boolean defaultExcludes)
      • isCaseSensitive

        public boolean isCaseSensitive()
      • setCaseSensitive

        @DataBoundSetter
        public final void setCaseSensitive​(boolean caseSensitive)
      • isFollowSymlinks

        public boolean isFollowSymlinks()
      • setFollowSymlinks

        @DataBoundSetter
        public final void setFollowSymlinks​(boolean followSymlinks)
      • getRequiredMonitorService

        public BuildStepMonitor getRequiredMonitorService()
        Description copied from interface: BuildStep
        Declares the scope of the synchronization monitor this BuildStep expects from outside.

        This method is introduced for preserving compatibility with plugins written for earlier versions of Hudson, which never run multiple builds of the same job in parallel. Such plugins often assume that the outcome of the previous build is completely available, which is no longer true when we do concurrent builds.

        To minimize the necessary code change for such plugins, BuildStep implementations can request Hudson to externally perform synchronization before executing them. This behavior is as follows:

        BuildStepMonitor.BUILD
        This BuildStep is only executed after the previous build is fully completed (thus fully restoring the earlier semantics of one build at a time.)
        BuildStepMonitor.STEP
        This BuildStep is only executed after the same step in the previous build is completed. For build steps that use a weaker assumption and only rely on the output from the same build step of the early builds, this improves the concurrency.
        BuildStepMonitor.NONE
        No external synchronization is performed on this build step. This is the most efficient, and thus the recommended value for newer plugins. Wherever necessary, you can directly use CheckPoints to perform necessary synchronizations.

        Migrating Older Implementations: If you are migrating BuildStep implementations written for earlier versions of Hudson, here's what you can do:

        • To demand the backward compatible behavior from Jenkins, leave this method unoverridden, and make no other changes to the code. This will prevent users from reaping the benefits of concurrent builds, but at least your plugin will work correctly, and therefore this is a good easy first step.
        • If your build step doesn't use anything from a previous build (for example, if you don't even call Run.getPreviousBuild()), then you can return BuildStepMonitor.NONE without making further code changes and you are done with migration.
        • If your build step only depends on Actions that you added in the previous build by yourself, then you only need BuildStepMonitor.STEP scope synchronization. Return it from this method ,and you are done with migration without any further code changes.
        • If your build step makes more complex assumptions, return BuildStepMonitor.NONE and use CheckPoints directly in your code. The general idea is to call CheckPoint.block() before you try to access the state from the previous build.
        Specified by:
        getRequiredMonitorService in interface BuildStep