Class TagBuildStrategyImpl

java.lang.Object
hudson.model.AbstractDescribableImpl<jenkins.branch.BranchBuildStrategy>
jenkins.branch.BranchBuildStrategy
jenkins.branch.buildstrategies.basic.TagBuildStrategyImpl
All Implemented Interfaces:
ExtensionPoint, Describable<jenkins.branch.BranchBuildStrategy>

public class TagBuildStrategyImpl extends jenkins.branch.BranchBuildStrategy
A BranchBuildStrategy that builds tags.
Since:
1.0.0
  • Constructor Details

    • TagBuildStrategyImpl

      @DataBoundConstructor public TagBuildStrategyImpl(@CheckForNull String atLeastDays, @CheckForNull String atMostDays)
      Our constructor.
      Parameters:
      atLeastDays - the number of days old that the tag must be before it is considered for automatic build
      atMostDays - the number of days old that the tag must be after which it is no longer considered for automatic build.
    • TagBuildStrategyImpl

      public TagBuildStrategyImpl(@NonNull TimeUnit unit, @CheckForNull Number atLeast, @CheckForNull Number atMost)
      Constructor for testing.
      Parameters:
      unit - the time units.
      atLeast - null or -1L to disable filtering by minimum age, otherwise the minimum age expressed in the supplied time units.
      atMost - null or -1L to disable filtering by maximum age, otherwise the maximum age expressed in the supplied time units.
  • Method Details

    • getAtLeastDays

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) @NonNull public String getAtLeastDays()
    • getAtMostDays

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) @NonNull public String getAtMostDays()
    • getAtLeastMillis

      public long getAtLeastMillis()
    • getAtMostMillis

      public long getAtMostMillis()
    • getAtLeast

      @CheckForNull public Long getAtLeast(@NonNull TimeUnit unit)
    • getAtMost

      @CheckForNull public Long getAtMost(@NonNull TimeUnit unit)
    • isAutomaticBuild

      @Deprecated public boolean isAutomaticBuild(@NonNull jenkins.scm.api.SCMSource source, @NonNull jenkins.scm.api.SCMHead head, @NonNull jenkins.scm.api.SCMRevision currRevision, @CheckForNull jenkins.scm.api.SCMRevision prevRevision)
      Deprecated.
      Overrides:
      isAutomaticBuild in class jenkins.branch.BranchBuildStrategy
    • isAutomaticBuild

      @Deprecated public boolean isAutomaticBuild(@NonNull jenkins.scm.api.SCMSource source, @NonNull jenkins.scm.api.SCMHead head, @NonNull jenkins.scm.api.SCMRevision currRevision, @CheckForNull jenkins.scm.api.SCMRevision prevRevision, @NonNull TaskListener taskListener)
      Deprecated.
      Overrides:
      isAutomaticBuild in class jenkins.branch.BranchBuildStrategy
    • isAutomaticBuild

      public boolean isAutomaticBuild(@NonNull jenkins.scm.api.SCMSource source, @NonNull jenkins.scm.api.SCMHead head, @NonNull jenkins.scm.api.SCMRevision currRevision, @CheckForNull jenkins.scm.api.SCMRevision lastBuiltRevision, @CheckForNull jenkins.scm.api.SCMRevision lastSeenRevision, @NonNull TaskListener taskListener)
      Specified by:
      isAutomaticBuild in class jenkins.branch.BranchBuildStrategy
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object