CDEvents Integration
Uploading CI Builds to Logilica using CDEvents
CDEvents (Continuous Delivery Events) is a standardized event format for event-driven communication in CI/CD and DevOps systems. Designed to work with platforms like Tekton, Jenkins, ArgoCD, Flux, and other modern DevOps frameworks.
For further details on CDEvents, refer to the official CDEvents Specification.
Importing CDEvents Build Data
Before using this API, ensure that your CI/CD tooling is configured to emit CDEvents.
To ensure the accuracy of data in Logilica, CDEvents data should adhere to the following guide:
Import a repository to Logilica and fetch the
ID
through the API or UI. You use thisID
in subsequent calls to the Logilica Import API for CDEvents Data.Send CDEvents to the API. The API expects events in chronological order.
In Logilica, a CI build data entry is constructed across the ingestion of multiple CDEvents events. The creation of the complete CI build entry is triggered when an event with a type of dev.cdevents.pipelinerun.finished
is received. Partial CI build entry records are not shown in the Logilica UI. The context.id
field is used across the multiple CDEvent events to create one CI build entry in Logilica.
Mapping of CDEvents to Logilica CI Build
The following table outlines how CDEvents are mapped to the attributes of CI builds in Logilica. Each event contributes specific data that is aggregated to form a complete build record
name
pipelinerun
pipelineName
url
pipelinerun
outcome
startedAt
pipelinerun
timestamp and type includes 'running'
createdAt
pipelinerun
timestamp and type includes ''queued'
completedAt
pipelinerun
timestamp and type includes ''completed'
stages
build
id, timestamp
repoUrl
repository
url
commit
change
id
triggeredBy
customData
pullRequestUrls
customData
In addition, Logilica's CDEvents integration supports the additional fields of triggeredBy
and pullRequestUrls
through the use of custom data field, specified in a JSON string format (refer to cURL example below).
Using custom data requires the CDEvents to have customDataContentType: "application/json"
Upload Example Using cURL
In the following, we provide an example of how to push your CDEvents data into Logilica for storage and built-in analytics.
Important: Ensure the repository you build from is already onboarded in Logilica.
The Repositories API can be used to retrieve the repoId
for the endpoint.
The cURL POST command has been provided below. Note, that the POST command uses example data, including the API token lgca_UeRxFs_3RYRJEJtdYp7j7Wa6DirG5NjiYslsb
and the example workspace myworkspace
. The command URL also includes a placeholder for the repoID to associate the uploaded CD Events with.
API Schema for Importing CDEvents
Create a CDEvent
Last updated