Class ReadTrustedStep

java.lang.Object
hudson.model.AbstractDescribableImpl<org.jenkinsci.plugins.workflow.steps.Step>
org.jenkinsci.plugins.workflow.steps.Step
org.jenkinsci.plugins.workflow.multibranch.ReadTrustedStep
All Implemented Interfaces:
ExtensionPoint, Describable<org.jenkinsci.plugins.workflow.steps.Step>

public class ReadTrustedStep extends org.jenkinsci.plugins.workflow.steps.Step
Replacement for readFile which reads from the SCM using SCMSource.getTrustedRevision(jenkins.scm.api.SCMRevision, hudson.model.TaskListener). Refuses to load a file which has been modified in an untrusted revision. If run multiple times, always loads from the same revision. May be used in combination with evaluate to delegate to more Pipeline Groovy, as a substitute for SCMBinder, at least until LoadStepExecution has been split into an abstract part that a loadTrusted step could extend.
  • Constructor Details

    • ReadTrustedStep

      @DataBoundConstructor public ReadTrustedStep(String path)
  • Method Details

    • getPath

      public String getPath()
    • start

      public org.jenkinsci.plugins.workflow.steps.StepExecution start(org.jenkinsci.plugins.workflow.steps.StepContext context) throws Exception
      Specified by:
      start in class org.jenkinsci.plugins.workflow.steps.Step
      Throws:
      Exception