In addition, such scripts need to implement a call method. If the scripts needs to use parameters, they get coded on the definition of the call method and passed into the script via the call. Most examples we share here all expect a Map object, containing the parameters to be passed to the pipeline from the job configuration and trigger. The corresponding call methods are defined as follows:
def call(Map pipelineParams){ ... }
Within the call method the script will execute the stages and steps in much the same way as any other pipeline script. Therefore, the resulting general structure will look as follows: