Skip to content

Commit 5401c63

Browse files
committed
refact
1 parent cf3cdbe commit 5401c63

File tree

4 files changed

+270
-286
lines changed

4 files changed

+270
-286
lines changed

specs/audit/deployment-history.yaml

Lines changed: 269 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,97 @@ paths:
178178
schema:
179179
$ref: '#/components/schemas/Error'
180180

181+
182+
/orchestrator/resource/history/deployment/cd-pipeline/v1:
183+
get:
184+
tags:
185+
- Deployment History
186+
summary: Get Deployment History
187+
description: Retrieves the deployment history for a specific CD pipeline based on various filter criteria.
188+
operationId: getDeploymentHistory
189+
parameters:
190+
- name: token
191+
in: header
192+
required: true
193+
description: Authentication token.
194+
schema:
195+
type: string
196+
- name: filterCriteria
197+
in: query
198+
required: true
199+
schema:
200+
type: array
201+
items:
202+
type: string
203+
description: |
204+
Filter criteria for deployment history. Example:
205+
- application/devtron-application|id|1064
206+
- environment|id|146
207+
- release|id|203
208+
- name: offset
209+
in: query
210+
required: false
211+
schema:
212+
type: integer
213+
description: The starting point for fetching records (pagination).
214+
- name: limit
215+
in: query
216+
required: false
217+
schema:
218+
type: integer
219+
description: The number of records to return (pagination).
220+
responses:
221+
'200':
222+
description: Successful retrieval of deployment history.
223+
content:
224+
application/json:
225+
schema:
226+
type: object
227+
properties:
228+
code:
229+
type: integer
230+
example: 200
231+
status:
232+
type: string
233+
example: "OK"
234+
result:
235+
type: object
236+
properties:
237+
cdWorkflows:
238+
type: array
239+
items:
240+
$ref: '#/components/schemas/CdWorkflow'
241+
tagsEditable:
242+
type: boolean
243+
example: false
244+
appReleaseTagNames:
245+
type: array
246+
items:
247+
type: string
248+
example: [ ]
249+
hideImageTaggingHardDelete:
250+
type: boolean
251+
example: false
252+
'400':
253+
description: Bad request
254+
content:
255+
application/json:
256+
schema:
257+
$ref: '#/components/schemas/ErrorResponse'
258+
'401':
259+
description: Unauthorized
260+
content:
261+
application/json:
262+
schema:
263+
$ref: '#/components/schemas/ErrorResponse'
264+
'500':
265+
description: Internal server error
266+
content:
267+
application/json:
268+
schema:
269+
$ref: '#/components/schemas/ErrorResponse'
270+
security: [ ]
271+
181272
components:
182273
schemas:
183274
HistoryComponentDetailDto:
@@ -296,4 +387,181 @@ components:
296387
description: Error code
297388
message:
298389
type: string
299-
description: Error message
390+
description: Error message
391+
392+
CdWorkflow:
393+
type: object
394+
properties:
395+
id:
396+
type: integer
397+
example: 19767
398+
cd_workflow_id:
399+
type: integer
400+
example: 19576
401+
name:
402+
type: string
403+
example: "cd-1064-nu4s"
404+
status:
405+
type: string
406+
example: "Succeeded"
407+
pod_status:
408+
type: string
409+
example: ""
410+
message:
411+
type: string
412+
example: ""
413+
started_on:
414+
type: string
415+
format: date-time
416+
example: "2024-07-25T08:36:42.414376Z"
417+
finished_on:
418+
type: string
419+
format: date-time
420+
example: "2024-07-25T08:40:03.455303Z"
421+
pipeline_id:
422+
type: integer
423+
example: 2082
424+
namespace:
425+
type: string
426+
example: "devtron-cd"
427+
log_file_path:
428+
type: string
429+
example: ""
430+
triggered_by:
431+
type: integer
432+
example: 23
433+
email_id:
434+
type: string
435+
example: "[email protected]"
436+
image:
437+
type: string
438+
example: "devtroninc.azurecr.io/test:8a0c2298-fc94fa4b-956-18655"
439+
ci_artifact_id:
440+
type: integer
441+
example: 14593
442+
workflow_type:
443+
type: string
444+
example: "DEPLOY"
445+
blobStorageEnabled:
446+
type: boolean
447+
example: true
448+
userApprovalMetadata:
449+
type: object
450+
nullable: true
451+
gitTriggers:
452+
type: object
453+
additionalProperties:
454+
$ref: '#/components/schemas/GitTrigger'
455+
ciMaterials:
456+
type: array
457+
items:
458+
$ref: '#/components/schemas/CiMaterial'
459+
460+
GitTrigger:
461+
type: object
462+
properties:
463+
Commit:
464+
type: string
465+
example: "8a0c22983ae7acae10abe7569026ae25d889e159"
466+
Author:
467+
type: string
468+
example: "jatin-jangir-0220 <[email protected]>"
469+
Date:
470+
type: string
471+
format: date-time
472+
example: "2024-04-29T18:49:39Z"
473+
Message:
474+
type: string
475+
example: "Update Dockerfile (#19)\n\n"
476+
Changes:
477+
type: string
478+
nullable: true
479+
WebhookData:
480+
type: object
481+
properties:
482+
id:
483+
type: integer
484+
example: 0
485+
eventActionType:
486+
type: string
487+
example: ""
488+
data:
489+
type: string
490+
nullable: true
491+
CiConfigureSourceValue:
492+
type: string
493+
example: "main"
494+
GitRepoUrl:
495+
type: string
496+
example: "https://github.com/devtron-labs/casbin-enterprise"
497+
GitRepoName:
498+
type: string
499+
example: "casbin-enterprise"
500+
CiConfigureSourceType:
501+
type: string
502+
example: "SOURCE_TYPE_BRANCH_FIXED"
503+
504+
CiMaterial:
505+
type: object
506+
properties:
507+
id:
508+
type: integer
509+
example: 1013
510+
gitMaterialId:
511+
type: integer
512+
example: 411
513+
gitMaterialUrl:
514+
type: string
515+
example: ""
516+
gitMaterialName:
517+
type: string
518+
example: "casbin-enterprise"
519+
type:
520+
type: string
521+
example: "SOURCE_TYPE_BRANCH_FIXED"
522+
value:
523+
type: string
524+
example: "main"
525+
active:
526+
type: boolean
527+
example: true
528+
lastFetchTime:
529+
type: string
530+
format: date-time
531+
example: "0001-01-01T00:00:00Z"
532+
isRepoError:
533+
type: boolean
534+
example: false
535+
repoErrorMsg:
536+
type: string
537+
example: ""
538+
isBranchError:
539+
type: boolean
540+
example: false
541+
branchErrorMsg:
542+
type: string
543+
example: ""
544+
url:
545+
type: string
546+
example: "https://github.com/devtron-labs/casbin-enterprise"
547+
regex:
548+
type: string
549+
example: ""
550+
551+
ErrorResponse:
552+
type: object
553+
required:
554+
- code
555+
- message
556+
properties:
557+
code:
558+
type: integer
559+
description: Error code
560+
message:
561+
type: string
562+
description: Error message
563+
details:
564+
type: array
565+
items:
566+
type: string
567+
description: Additional error details

0 commit comments

Comments
 (0)