Class DurabilityHintBranchProperty

  • All Implemented Interfaces:
    ExtensionPoint, Describable<jenkins.branch.BranchProperty>

    @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
    public class DurabilityHintBranchProperty
    extends jenkins.branch.BranchProperty
    Branch property so we can define per-branch durability policies, i.e. so feature branches aren't built durably but master is. Also lets us set the durability level before the pipeline has run (a step ahead of the "properties" step). This implementation is designed so that each build will freshly evaluate the FlowDurabilityHint provided by BranchPropertyStrategy thus sidestepping issues with failing to update along with the BranchPropertyStrategy (JENKINS-48826).
    Author:
    Sam Van Oort
    • Constructor Detail

      • DurabilityHintBranchProperty

        @DataBoundConstructor
        public DurabilityHintBranchProperty​(@NonNull
                                            org.jenkinsci.plugins.workflow.flow.FlowDurabilityHint hint)
    • Method Detail

      • getHint

        public org.jenkinsci.plugins.workflow.flow.FlowDurabilityHint getHint()
      • jobDecorator

        public final <P extends Job<P,​B>,​B extends Run<P,​B>> jenkins.branch.JobDecorator<P,​B> jobDecorator​(Class<P> clazz)
        No-op impl because we only care about the actual BranchProperty attached.
        Overrides:
        jobDecorator in class jenkins.branch.BranchProperty