java.lang.Object
hudson.model.AbstractDescribableImpl<T>
org.jenkinsci.plugins.pipeline.modeldefinition.withscript.WithScriptDescribable<S>
org.jenkinsci.plugins.pipeline.modeldefinition.when.DeclarativeStageConditional<BranchConditional>
org.jenkinsci.plugins.pipeline.modeldefinition.when.impl.BranchConditional
All Implemented Interfaces:
ExtensionPoint, Describable<BranchConditional>, Serializable

public class BranchConditional extends org.jenkinsci.plugins.pipeline.modeldefinition.when.DeclarativeStageConditional<BranchConditional>
Stage condition based on the current branch. i.e. the env var BRANCH_NAME. As populated by BranchNameContributor
See Also:
  • Constructor Details

    • BranchConditional

      @DataBoundConstructor public BranchConditional(String pattern)
  • Method Details

    • getCompare

      @Deprecated public String getCompare()
      Deprecated.
    • getPattern

      public String getPattern()
    • readResolve

      protected Object readResolve() throws IOException
      Throws:
      IOException
    • getComparator

      public String getComparator()
      The Comparator to use. Default is Comparator.GLOB
      Returns:
      the name of the comparator or null if default.
    • setComparator

      @DataBoundSetter public void setComparator(String comparator)
    • branchMatches

      public boolean branchMatches(String toCompare, String actualBranch)