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:

  1. Log in to the IBM Cloud Pak for AIOps console.

  2. From the main navigation, click Application management.

  3. Click the Group templates icon Group templates on the upper right corner of the page.

  4. From the Group templates page, click Create a new template.

  5. Select Dynamic template to ensure that all matching builds will generate topologies like this.

  6. Click Start to begin building your template.

  7. 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.

  8. Set the Group type as ‘cicd’.

  9. (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:

  1. Log in to the IBM Cloud Pak for AIOps console.

  2. From the main navigation, click Application management.

  3. Click the Group templates icon Group templates on the upper right corner of the page.

  4. From the Group templates page, click Create a new template.

  5. Select Dynamic template to ensure that all matching builds will generate topologies like this.

  6. Click Start to begin building your template.

  7. 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.

  1. Set the Group type as ‘cicd’.

  2. (Optional) Define tags for the template, then click Save template & generate groups.