Class ScriptModel

java.lang.Object
io.jenkins.plugins.pipeline.models.AbstractModel
io.jenkins.plugins.pipeline.models.ScriptModel
All Implemented Interfaces:
ParsableModelInterface

public class ScriptModel extends AbstractModel implements ParsableModelInterface
Model Class for Jenkins Declarative Pipeline Script Section
  • Field Details

  • Constructor Details

    • ScriptModel

      public ScriptModel(List scripts)
      Parameters:
      scripts - List of scripts
    • ScriptModel

      public ScriptModel(String scripts)
      Parameters:
      scripts - Script
  • Method Details

    • setPrintDirective

      public void setPrintDirective(Boolean printDirective)
      Set Print directive
      Parameters:
      printDirective - True: For printing directive/key in groovy, False: For not printing
    • toGroovy

      public String toGroovy()
      Description copied from interface: ParsableModelInterface
      Convert model to Jenkins Declarative Pipeline Syntax
      Specified by:
      toGroovy in interface ParsableModelInterface
      Returns:
      Jenkins Declarative Pipeline Syntax