Shared Library Pipelines


Shared Libraries are getting the preferred method of providing code that can be re-used (shared) between pipeline definitions.

The following example pipelines on the BMC's GitHub are built based on shared library principles.

  • Mainframe_CI_Pipeline_from_Shared_Lib.groovy is intended to be triggered after promoting code within ISPW. It implements the same process as the basic pipeline example.

  • Using Shared Libraries allows re-using existing scripts and combining them to build more complex processes. To demonstrate this, we use the two following pipelines which are part of a more elaborate process. Instead of setting up individual webhooks for each script, we create a third "dispatching" script which gets triggered by several, different Code Pipeline operations. Depending on the operation, this script calls one of the two scripts:
    • Mainframe_Generate_Pipeline.groovy - gets called when the pipeline is triggered by an Code Pipeline Generate and executes virtualized tests against those components that have been generated.

    • Mainframe_Integration_Pipeline.groovy - gets called when the pipeline is triggered by an Code Pipeline Promote and executes non virtualized tests against the project/assignment.

      Important

      Both these scripts could still be used independently from each other in corresponding Jenkins jobs.

  • Git to Code Pipeline integration/synchronization.

In these sections we describe in detail:


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*