CI/CD

Invoked with levelops.cicd().

1. getStageIds(jobRunId) : String[]

  • Description: List stages of a given CI/CD Job run, if any.

  • Returns: Array of stage ids. Can be empty if the job doesn’t have stages.

  • Example:

stageIds = levelops.cicd().listStageIds(jobRunId);

2. getStageName(stageId) : String

  • Description: Look-up the name of a Stage given its id.

  • Returns: Stage name, or null if it wasn't found.

  • Example:

stageName = levelops.cicd().getStageName(stageId);

3. getTriageRuleResults(jobRunId, [ stageId ]) : TriageRuleMatch[]

  • Description: List eventual Triage rule matches for a given Job run, and optionally, a given stage.

  • Returns: Array of TriageRuleHit objects. See class methods below.

  • Examples:

levelops.cicd().getTriageRuleResults(jobRunId);
levelops.cicd().getTriageRuleResults(jobRunId, jobStageId);

4. TriageRuleMatch Class

  • TriageRuleMatch.getRuleName() : String

  • TriageRuleMatch.getCount() : int

  • TriageRuleMatch.getMatchContent() : String

5. hierarchicalConfigTableLookUp(jobRundId, stageId, tableName, jobColumnName, stageColumnName) : Object

  • Parameters: stageId and stageColumnName can be left null.

  • Returns: JSON object representing a table row (a map of column keys to values)

  • Examples:

levelops.cicd().hierarchicalConfigTableLookUp(jobRunId, stageId, "My Config Table", "Job", "Stage");
levelops.cicd().hierarchicalConfigTableLookUp(jobRunId, null, "My Config Table", "Job", "Stage");
levelops.cicd().hierarchicalConfigTableLookUp(jobRunId, null, "My Config Table", "Job", null);

Last updated