Summary¶
Default Step Implementation¶
The Default Step Implementation is used for creating steps on the fly from the Pipeline Configuration.
It works by leveraging container images as pipeline runtime dependencies, executing a command or script inside the container image, and then allowing you to stash artifacts generated by the step.
Care should be taken when exposing this functionality to users.
Pipeline Lifecycle Hooks¶
The Jenkins Templating Engine exposes a feature called Pipeline Lifecycle Hooks that allows methods defined within Library Steps to register themselves to be automatically executed in response to events from the pipeline. This includes steps that take place before and after certain triggers, and a "cleanup" step that executes after the main pipeline is finished.
These annotations accept Closure parameters for conditional hook execution to dynamically determine if a hook should be invoked.
Multi-Method Library Steps¶
Steps contributed by libraries can define more than one method within the step. This is most commonly used when creating steps representing utilities. These steps can be called programmatically for more complex implementations!
Where Now?¶
You've completed all of the Jenkins Templating Engine Learning Labs! Consult the JTE Docs for more information and be sure to reach out on GitHub if there is something wrong with the contents of this course.