CES Webhook Configuration


This topic describes how to define and register a webhook in CES.

Definition of a webhook used in the examples

To define and register a Code Pipeline webhook in CES, go to the CES Administration menu and select Webhooks.

WebhooksFromCESmenu.png

On the Webhooks page, you can select Add to define a new webhook or Edit to modify an existing webhook. The Mainframe_CI_Pipeline_from_Shared_Lib.groovy uses the following definitions.

Webhook definition fields

AddWebhooksUI.png

Webhook Information

Configure the following details for the webhook.

Name

Name of the webhook, e.g. "FTSDEMO Pipeline"

URL

The URL to post the webhook's http request to. In the example pipeline, this is:

http://sonarqube.nasa.cpwr.corp:8080/job/RNU_FTSDEMO_from_Shared_Lib/buildWithParameters?ISPW_Stream=$$stream$$&ISPW_Application=$$application$$&ISPW_Release=$$release$$&ISPW_Assignment=$$assignment$$&ISPW_Container=$$setID$$&ISPW_Container_Type=2&ISPW_Src_Level=$$level$$&ISPW_Owner=$$owner$$

where,

  • sonarqube.nasa.cpwr.corp:8080 is the name of BMC's internal Jenkins server.
  • RNU_FTSDEMO_from_Shared_Lib is the name of the pipeline job to trigger.
  • buildWithParameters is required since the pipeline job uses parameters.

followed by a list of parameter=value pairs. In this list:

  • the part left of each = names the parameter name from the pipeline definition
  • the part right of each = is the value to pass to the parameter with $$<parameter-name>$$ denoting parameter values passed from Code Pipeline.
  • & separates two pairs

Request method

Will be POST.

Request headers

Depending on the configuration of the Jenkins server, you may need additional request headers. Especially if CSRF Protection is activated, then you will need an authorization header. Contact your Jenkins administrator for the required values.

Request body

This specifies the information that will be sent in the body of the HTTP request to the third-party application. This is a free-form field where any text can be entered. 

Product

This specifies which product is going to receive the request. You can select Code Pipeline  or Abend-AID, as per your requirement.

Expire in days

This specifies the number of days after which you need the Abend-AID webhook to expire and get automatically deleted. You must specify a value between 0 to 365 days. This option is available only when you select Abend-AID from the Product list. 

Event criteria

The fields displayed for event criteria are product-specific and dynamically change based on your product selection.

To define the Code Pipeline events that will trigger this webhook, configure the following fields:

  • Application: Specify the Code Pipeline applications for which you want to use this webhook.
    The example uses applications RXN1 and RXN3.
  • Sub Application: Specify the Code Pipeline sub-applications you want to use this webhook for. 
  • Level: Specify the life cycle levels you want to use this webhook for. This is dependent on your specific configuration of Code Pipeline.
    The example uses levels DEV1, DEV2, DEV3, with the life cycle for the applications RXN1 and RXN3 which is displayed in the following figure: 

UsingTTUnitTest_lifecycle.png

  • Event name: One or more events during the operations that trigger the webhook. Events can be:

    • Approve
    • Completed
    • Failed
    • Terminated

The example uses Completed.

To define the Abend-AID events that will trigger this webhook, configure the following fields:

  • Program Names: Specify the name of the abending program associated with an Abend-AID resource. 
  • User IDs: Specify the user ID of the abending job associated with an Abend-AID resource. 
  • Abend Codes: Specify the system or user abnormal termination code, or SNAP for a SNAP-AID report, or the PL/I on-code associated with an Abend-AID resource. 
  • Job Names: Specify the job name of the abending job associated with an Abend-AID resource. 
  • CICS or IMS Regions: Specify the SYSID of the abending job associated with an Abend-AID resource. 

Important

You can enter multiple comma-separated values in each field. 

Operations

One or more Code Pipeline operations that will trigger the webhook. 

The example uses Promote.

Important

These operations are available only when you select Code Pipeline from the Product list. 

Code Pipeline example summary

In total, the pipeline job RNU_FTSDEMO_from_Shared_Lib will get triggered whenever a developer has promoted code from levels DEV1, DEV2, or DEV3 within Code Pipeline applications RXN1, or RXN2 and the promote was successfully completed. The following information will be passed from Code Pipeline to the pipeline job:

  • The Code Pipeline stream name $$stream$$ will be passed to pipeline parameter ISPW_Stream
  • The Code Pipeline application name $$application$$ will be passed to the pipeline parameter ISPW_Application
  • The Code Pipeline sub application name $$subApplication$$ will be passed to the pipeline parameter ISPW_subApplication
  • The Code Pipeline release name $$release$$ will be passed to the pipeline parameter ISPW_Release
  • The Code Pipeline assignment name $$assignment$$ will be passed to the pipeline parameter ISPW_Assignment
  • The Code Pipeline set ID $$setID$$ will be passed to the pipeline parameter ISPW_Container
  • The value 2 will be passed to the pipeline parameter ISPW_Container_Type to denote a set ID was passed in the previous parameter
  • The Code Pipeline source level $$level$$ (DEV1, DEV2, or DEV3) will be passed to the pipeline parameter ISPW_Src_Level
  • The Code Pipeline user executing the promotion $$owner$$ will be passed to the pipeline parameter ISPW_Owner


 

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