jira.js
    Preparing search index...

    Function submitDeployments

    • Update / insert deployment data.

      Deployments are identified by the combination of pipelineId, environmentId and deploymentSequenceNumber, and existing deployment data for the same deployment will be replaced if it exists and the updateSequenceNumber of existing data is less than the incoming data.

      Submissions are processed asynchronously. Submitted data will eventually be available in Jira. Most updates are available within a short period of time, but may take some time during peak load and/or maintenance times. The getDeploymentByKey operation can be used to confirm that data has been stored successfully (if needed).

      In the case of multiple deployments being submitted in one request, each is validated individually prior to submission. Details of which deployments failed submission (if any) are available in the response object.

      Parameters

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

          A list of deployments to submit to Jira.

          Each deployment may be associated with one or more Jira issue keys, and will be associated with any properties included in this request.

        • Optionalproperties?: Record<string, any>

          Properties assigned to deployment data that can then be used for delete / query operations.

          Examples might be an account or user ID that can then be used to clean up data if an account is removed from the Provider system.

          Properties are supplied as key/value pairs, and a maximum of 5 properties can be supplied, keys cannot contain ':' or start with '_'.

        • OptionalproviderMetadata?: { product?: string }

          Information about the provider. This is useful for auditing, logging, debugging, and other internal uses. It is not considered private information. Hence, it may not contain personally identifiable information.

          • Optionalproduct?: string

            An optional name of the source of the deployments data.

      • Optionaloptions: RequestOptions

      Returns Promise<
          {
              acceptedDeployments?: {
                  deploymentSequenceNumber: number;
                  environmentId: string;
                  pipelineId: string;
                  [key: string]: unknown;
              }[];
              rejectedDeployments?: {
                  errors: {
                      errorTraceId?: string;
                      message: string;
                      [key: string]: unknown;
                  }[];
                  key: {
                      deploymentSequenceNumber: number;
                      environmentId: string;
                      pipelineId: string;
                      [key: string]: unknown;
                  };
                  [key: string]: unknown;
              }[];
              unknownAssociations?: (
                  | {
                      associationType: string & {}
                      | "commit"
                      | "repository";
                      values: (
                          | {
                              commitHash: string;
                              repositoryId: string;
                              [key: string]: unknown;
                          }
                          | { repositoryId: string; [key: string]: unknown }
                      )[];
                      [key: string]: unknown;
                  }
                  | {
                      associationType: string & {}
                      | "issueKeys"
                      | "issueIdOrKeys";
                      values: string[];
                      [key: string]: unknown;
                  }
                  | {
                      associationType: string & {}
                      | "serviceIdOrKeys";
                      values: string[];
                      [key: string]: unknown;
                  }
              )[];
              unknownIssueKeys?: string[];
              [key: string]: unknown;
          },
      >