Creating Jenkins topology templates
Over time topologies generated by a specific Jenkins Observer job may grow, including the information from different Jenkins builds. You can use the IBM Cloud Pak® for AIOps group templates functionality to create meaningful, scoped groups per build. This can then be included as part of a broader application definition.
Create 'per build' topology templates
The following template generates a group for each build, which includes the build and its associated pipeline resources:
-
Log in to the IBM Cloud Pak for AIOps console.
-
From the main navigation, click Application management.
-
Click the Group templates icon on the upper right corner of the page.
-
From the Group templates page, click Create a new template.
-
Select Dynamic template to ensure that all matching builds will generate topologies like this.
-
Click Start to begin building your template.
-
On the Preview pane, search for the build resource and select Follow Relationship. Repeat this for all of the connected resources in your build topology.
Important: Do not expand the ‘lastRunOf’ relationship.
-
Set the Group type as ‘cicd’.
-
(Optional) Define tags for the template, then click Save template & generate groups.
Create current pipeline status
group templates.
The following template generates a group that shows the status of your pipeline that is the latest build for which a notification was received by the observer and associated resources:
-
Log in to the IBM Cloud Pak for AIOps console.
-
From the main navigation, click Application management.
-
Click the Group templates icon on the upper right corner of the page.
-
From the Group templates page, click Create a new template.
-
Select Dynamic template to ensure that all matching builds will generate topologies like this.
-
Click Start to begin building your template.
-
On the Preview pane, search for the job resource and select Follow Relationship. Then click ‘lastRunOf’. The latest build resource for which a topology was generated is displayed. Expand any relationships you want to include in this template.
Important: Do not expand the ‘RunOf’ relationship.
-
Set the Group type as ‘cicd’.
-
(Optional) Define tags for the template, then click Save template & generate groups.