Other SEI integrations
This topic explains how to configure:
- The Jenkins Job Reporter plugin.
- Custom CI/CD integrations through webhooks.
For information about the Custom integration that uses an Ingestion Satellite, go to Ingestion Satellites.
In addition to SEI integrations, you can import CSV files and display the data in Table reports.
Jenkins Job Reporter plugin
The Job Reporter plugin is a tool, written in Java, that sends reports about Jenkins builds to SEI. It monitors all job runs, and, when a job run completes (successfully or not), it sends information about job run (including any failure logs) to SEI. This plugin doesn't do periodic pushes.
The plugin gathers information about job stages and steps depending on the outcome and structure of the job:
- If a job run fails, and the job has no stages, then the plugin captures the job's failure logs.
- If a job run fails, and the job has stages but no steps, then the plugin captures failure logs for the failed stages.
- If a job run fails, and hte job has steps, then the plugin captures failure logs for the failed steps.
- The plugin doesn't capture logs for any successful jobs, stages, or steps.
To use this plugin, you need to install the plugin in Jenkins.
- In Jenkins, select Manage Jenkins.
- Select Manage Plugins.
- Select the Available plugins tab, and search for
Job Reporter
. - Locate and install the SEI Job Reporter plugin. Select Install without restart.
When plugin installation is complete, the status changes to success. If it doesn't change to success, you might need to restart.
Plugin dependencies
The following table lists other Jenkins plugins for which the Job Reporter plugin has dependencies. It includes links to the plugins on the Jenkins plugins marketplace. These are in addition to required and implied dependencies listed on the Job Reporter plugin's Jenkins plugin marketplace page.
Dependency name | Direct/Indirect dependency | Version |
---|---|---|
Favorite | Indirect | 2.3.2 |
Variant | Indirect | 1.3 |
REST Implementation for Blue Ocean | Direct | 1.23.2 |
Common API for Blue Ocean | Indirect | 1.23.2 |
REST API for Blue Ocean | Indirect | 1.23.2 |
Design Language | Indirect | 1.23.2 |
Blue Ocean Core JS | Indirect | 1.23.2 |
Web for Blue Ocean | Indirect | 1.23.2 |
JWT for Blue Ocean | Indirect | 1.23.2 |
Pipeline implementation for Blue Ocean | Direct | 1.23.2 |
Pipeline SCM API for Blue Ocean | Indirect | 1.23.2 |
HTML Publisher | Indirect | 1.23 |
Dashboard for Blue Ocean | Direct | 1.23.2 |
Pub-Sub "light" Bus | Indirect | 1.13 |
Custom CI/CI integrations (webhooks)
SEI supports custom CI/CD integrations through webhooks. Use this for CI/CD tools that don't have a dedicated SEI integration, such as Jenkins and GitHub Actions.
- Create a Harness API key to use for authorization.
- Contact Harness Support to get a UUID to identify your CI/CD system.
- Configure the webhook API call according to the following webhook specification.
Webhook specification
- Summary: Post CI/CD data to SEI
- Method: POST
- Base URL:
https://api.levelops.io/v1/generic-requests
- Header: Requires API key authorization. The content type is
application/json
- Body: Contains a
data
object withrequest_type
andpayload
.
Here is an example of a request:
// POST CICD data to Propelo
curl --location 'https://api.propelo.ai/v1/generic-requests' \
--header 'Authorization: Apikey <apikey> ' \
--header 'Content-Type: application/json' \
--data '{
"request_type": "JenkinsPluginJobRunComplete",
"payload": "{
"pipeline":"Node.js CI",
"triggered_by":"SCMTrigger",
"execution_parameters":
[{"type":"StringParameterValue","name":"version","value":1},
{"type":"StringParameterValue","name":"revision","value":1}],
"repo_url":"https://api.github.com/users/rajpropelo",
"start_time":1680006843000,
"result":"success",
"duration":26000,
"build_number":4543097378,
"instance_guid":"24575de4-0baa-4575-8c94-9975c737008a",
"instance_name":"Jenkins Instance",
"instance_url":"https://jenkins.dev.levelops.io/",
"job_run":null,
"job_full_name":"Node.js CI--github action",
"qualified_name":"Node.js CI--github action",
"branch_name":"main",
"module_name":null,
"scm_commit_ids":["6ce2cfec186fbf9ae9429ad22e32e7770f1eb1fb"],
"ci":true,
"cd":false,
"artifacts":
[{"input":false,"output":true,"type":"container","location":"http://generated/image/location","name":"image1","qualifier":"1"}],
"trigger_chain":[{"id":"SCMTrigger","type":"SCMTriggerCause"}]
}"
}'
Payload fields
payload
is an object with required and optional fields.
Required fields:
pipeline
: The name of the CI/CD job.job_full_name
: Same aspipeline
.qualified_name
: Same aspipeline
.instance_name
: The CI/CD instance identifier (not the UUID).instance_guid
: Your CI/CD instance UUID.start_time
: Job start time in epoch milliseconds.duration
: Job duration in seconds.result
: Eithersuccess
orfailure
.
Optional fields:
execution_parameters
: An array of key/value objects that can be used to send additional information about the pipeline or deployment.scm_commit_ids
: An array of commit ids related to the deploymenttriggered_by
repo_url
build_number
instance_url
job_run
module_name
ci
andcd
: One istrue
and the other isfalse
, depending on whether this is for a CI job or a CD job.artifacts
: An array of information about the job run, includinginput
,output
,type
,location
,name
,qualifier
,hash
, andmetatdata
.trigger_chain
branch_name
module_name
job_normalized_full_name
Here is an example payload:
'{
"pipeline":"Node.js CI",
"triggered_by":"SCMTrigger",
"execution_parameters":[
{"type":"StringParameterValue","name":"version","value":1},
{"type":"StringParameterValue","name":"revision","value":1}
],
"repo_url":"https://api.github.com/users/rajpropelo",
"start_time":1680006843000,
"result":"success",
"duration":26000,
"build_number":4543097378,
"instance_guid":"24575de4-0baa-4575-8c94-9975c737008a",
"instance_name":"Jenkins Instance",
"instance_url":"https://jenkins.dev.levelops.io/",
"job_run":null,
"job_full_name":"Node.js CI--github action",
"qualified_name":"Node.js CI--github action",
"branch_name":"main",
"module_name":null,
"scm_commit_ids":["6ce2cfec186fbf9ae9429ad22e32e7770f1eb1fb"],
"ci":true,
"cd":false,
"artifacts":[
{"input":false,"output":true,"type":"container","location":"http://generated/image/location","name":"image1","qualifier":"1"}
],
"trigger_chain":[
{"id":"SCMTrigger","type":"SCMTriggerCause"}
]
}'