Skip to content

Function: getDeploymentByKey() ​

ts
function getDeploymentByKey(
   client, 
   parameters, 
   options?
): Promise<{
[key: string]: unknown;
  associations?: (
     | {
   [key: string]: unknown;
     associationType: string & object | "commit" | "repository";
     values: (
        | {
      [key: string]: unknown;
        commitHash: string;
        repositoryId: string;
      }
        | {
      [key: string]: unknown;
        repositoryId: string;
     })[];
   }
     | {
   [key: string]: unknown;
     associationType: string & object | "issueKeys" | "issueIdOrKeys";
     values: string[];
   }
     | {
   [key: string]: unknown;
     associationType: string & object | "serviceIdOrKeys";
     values: string[];
  })[];
  commands?: object[];
  deploymentSequenceNumber: number;
  description: string;
  displayName: string;
  duration?: number;
  environment: {
   [key: string]: unknown;
     displayName: string;
     id: string;
     type:   | "unmapped"
        | string & object
        | "development"
        | "testing"
        | "staging"
        | "production";
  };
  label?: string;
  lastUpdated: Date;
  pipeline: {
   [key: string]: unknown;
     displayName: string;
     id: string;
     url: string;
  };
  schemaVersion?: string & object | "1.0";
  state:   | "failed"
     | "unknown"
     | "pending"
     | string & object
     | "successful"
     | "in_progress"
     | "cancelled"
     | "rolled_back";
  updateSequenceNumber: number;
  url: string;
}>;

Defined in: src/agile/api/deployments.ts:85

Retrieve the currently stored deployment data for the given pipelineId, environmentId and deploymentSequenceNumber combination.

The result will be what is currently stored, ignoring any pending updates or deletes.

Parameters ​

ParameterTypeDescription
clientClient-
parameters{ deploymentSequenceNumber: number; environmentId: string; pipelineId: string; }-
parameters.deploymentSequenceNumbernumberThe deployment's deploymentSequenceNumber.
parameters.environmentId?stringThe ID of the deployment's environment.
parameters.pipelineId?stringThe ID of the deployment's pipeline.
options?RequestOptions-

Returns ​

Promise<{ [key: string]: unknown; associations?: ( | { [key: string]: unknown; associationType: string & object | "commit" | "repository"; values: ( | { [key: string]: unknown; commitHash: string; repositoryId: string; } | { [key: string]: unknown; repositoryId: string; })[]; } | { [key: string]: unknown; associationType: string & object | "issueKeys" | "issueIdOrKeys"; values: string[]; } | { [key: string]: unknown; associationType: string & object | "serviceIdOrKeys"; values: string[]; })[]; commands?: object[]; deploymentSequenceNumber: number; description: string; displayName: string; duration?: number; environment: { [key: string]: unknown; displayName: string; id: string; type: | "unmapped" | string & object | "development" | "testing" | "staging" | "production"; }; label?: string; lastUpdated: Date; pipeline: { [key: string]: unknown; displayName: string; id: string; url: string; }; schemaVersion?: string & object | "1.0"; state: | "failed" | "unknown" | "pending" | string & object | "successful" | "in_progress" | "cancelled" | "rolled_back"; updateSequenceNumber: number; url: string; }>