forked from MrRefactoring/jira.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetDeploymentByKey.ts
73 lines (73 loc) · 3.02 KB
/
getDeploymentByKey.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/**
* Data related to a specific deployment in a specific environment that the deployment is present in.* Must specify one
* of `issueKeys` or `associations`.
*/
export interface GetDeploymentByKey {
/**
* This is the identifier for the deployment. It must be unique for the specified pipeline and environment. It must be
* a monotonically increasing number, as this is used to sequence the deployments.
*/
deploymentSequenceNumber: number;
/**
* A number used to apply an order to the updates to the deployment, as identified by the deploymentSequenceNumber, in
* the case of out-of-order receipt of update requests. It must be a monotonically increasing number. For example,
* epoch time could be one way to generate the updateSequenceNumber.
*/
updateSequenceNumber: number;
/**
* The entities to associate the Deployment information with. It must contain at least one of IssueIdOrKeysAssociation
* or ServiceIdOrKeysAssociation.
*/
associations: any[];
/** The human-readable name for the deployment. Will be shown in the UI. */
displayName: string;
/** A URL users can use to link to this deployment, in this environment. */
url: string;
/** A short description of the deployment */
description: string;
/** The last-updated timestamp to present to the user as a summary of the state of the deployment. */
lastUpdated: string;
/**
* An (optional) additional label that may be displayed with deployment information. Can be used to display version
* information etc. for the deployment.
*/
label?: string;
/** The duration of the deployment (in seconds). */
duration?: number;
/** The state of the deployment */
state: 'unknown' | 'pending' | 'in_progress' | 'cancelled' | 'failed' | 'rolled_back' | 'successful' | string;
/**
* This object models the Continuous Delivery (CD) Pipeline concept, an automated process (usually comprised of
* multiple stages)
*
* For getting software from version control right through to the production environment.
*/
pipeline: {
/** The identifier of this pipeline, must be unique for the provider. */
id: string;
/** The name of the pipeline to present to the user. */
displayName: string;
/** A URL users can use to link to this deployment pipeline. */
url: string;
};
/** The environment that the deployment is present in. */
environment: {
/** The identifier of this environment, must be unique for the provider so that it can be shared across pipelines. */
id: string;
/** The name of the environment to present to the user. */
displayName: string;
/** The type of the environment. */
type: 'unmapped' | 'development' | 'testing' | 'staging' | 'production' | string;
};
/** A list of commands to be actioned for this Deployment */
commands?: {
/** The command name. */
command?: string;
}[];
/**
* The DeploymentData schema version used for this deployment data.
*
* Placeholder to support potential schema changes in the future.
*/
schemaVersion?: '1.0' | string;
}