Builds

Report a build to Ketryx

Reports a build to Ketryx, potentially including test results. Additionally, certain checks can be performed, namely whether all software dependencies are accepted and controlled, and/or whether the given version(s) are fully released in Ketryx.

The reported build can be associated with a particular version directly (via version), or with any versions given a particular commit (via commitSha), based on the release ref pattern configured in the Ketryx project.

post/builds

Request

Request body

projectstring required

Ketryx project ID

versionstring

Ketryx version ID or the full version name. Either this or the commitSha must be set.

commitShastring

Commit SHA associated with this build. Either this or the version must be set. If the given commit is associated with multiple versions in Ketryx (via the release ref pattern configured for the Ketryx project), the status of all those matching versions will be considered.

changeRequestNumberinteger

Number of the change request (e.g. GitHub pull request number) to associate with this build. If the change request is not known to Ketryx yet, it is synchronized from the connected repository before checking.

buildNamestring

Build name. For each unique name, the latest build is part of the set of effective builds for a project. Empty by default.

logstring

Log output to store for this build

sourceUrlstring

Source URL associated with this build. This is used for documentation purposes and to link back to the build from the Ketryx interface.

repositoryUrlsstring[]

This is important to find the relevant commits for a given version, and to trigger updates of the repositories before checking the build status. The URLs should match the repository URLs as configured in the Ketryx project settings.

syncRepositoryUpdateboolean

Whether to update the associated repositories (specified in repositoryUrls) synchronously before returning from this API. This is useful when checking for the status of dependencies (using checkDependenciesStatus), to ensure that Ketryx has up-to-date data from the repository before performing the check.

checkDependenciesStatusboolean

Whether to perform a check of dependencies in the associated commit(s). If not all dependencies are accepted and in a controlled state

checkChangeRequestItemAssociationboolean

Whether to fail the build if there is no change request associated with the build (via changeRequestNumber), or the change request has no associated items (i.e. no item references in its title or description).

checkReleaseStatusboolean

Whether to perform a check of the overall release of the associated version(s).

Example request

{
  "project": "KXPRJ49GQYFQ5RR9KRTPWTRTC39YZ9W",
  "version": "KXVSN352CZED7078FC8DN23YYZVM59D",
  "commitSha": "ad4db8ac1e70bd41aa8bcee6f00a3a1e36bb0e01",
  "changeRequestNumber": 123,
  "buildName": "ci-e2e-batch1",
  "sourceUrl": "https://github.com/Ketryx/ketryx/actions/runs/4991785273",
  "repositoryUrls": [
    "https://github.com/Ketryx/ketryx"
  ],
  "tests": [
    {
      "testedItem": "KXITM2AVTG0CEEA83MVPCG00XH2KXRB",
      "artifacts": [
        {
          "id": "KXUPF1GGK0R03458B8VK6R8S7SKCQSV"
        }
      ]
    }
  ],
  "artifacts": [
    {
      "id": "KXUPF4VNVT28EFA8PJBT5642XDPEFR1",
      "type": "cucumber-json"
    }
  ]
}

Response

OK

okboolean required

Whether the build was reported successfully and all checks passed

errorstring

Human-readable error message in case there was an error reporting the build or running any checks. See errors for machine-readable error codes.

buildIdstring

Ketryx ID of the reported build

projectIdstring

Ketryx ID of the relevant project

repositoryIdsstring[]

Ketryx IDs of the associated repositories

versionIdsstring[]

Ketryx IDs of the associated project versions

commitShasstring[]

SHAs of the associated commits

dependenciesAcceptedboolean

Whether all dependencies have been accepted (if checkDependenciesStatus is active)

dependenciesControlledboolean

Whether all dependencies are in a controlled state (if checkDependenciesStatus is active)

Example response

{
  "errors": [
    {
      "code": "GITHUB_AUTH_FAILED"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.