Skip to main content

End Event

The codenow.ci.end.event marks the completion of a pipeline run and reports its final result. Based on this event, CodeNOW sets the build status in the Build History.

Pipeline Results

The result field accepts one of the following values:

ResultDescription
SUCCESSFULThe pipeline completed successfully
FAILEDThe pipeline failed
CANCELEDThe pipeline was canceled

Example

curl -L -X POST 'https://api.cloud.codenow.com/ci/webhook' \
--header 'Accept: application/vnd.codenow.v1+json' \
--header 'Content-Type: application/vnd.codenow.v1+json' \
--header 'X-Codenow-Api-Key: {YOUR_CI_KEY}' \
--data-raw '{
"type": "codenow.ci.end.event",
"version": "application/vnd.codenow.v1+json",
"pipelineId": "my-pipeline-id",
"createdAt": "2024-01-01T00:00:00.000Z",
"result": "SUCCESSFUL"
}'
tip

Make sure to always send an end event, even if the pipeline fails. Without an end event, the build will remain in a running state indefinitely in CodeNOW.