Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion specs/gitops-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ info:
version: 1.0.0
title: GitOps Validation
servers:
- url: http://localhost:3000/orchestrator/gitops
- url: https://api.yourdomain.com
paths:
/validate:
post:
description: Validate gitops configuration by dry run
summary: Validate gitops configuration by dry run
security:
- ApiKeyAuth: []
operationId: GitOpsValidateDryRun
requestBody:
description: A JSON object containing the gitops configuration
Expand Down Expand Up @@ -44,6 +47,9 @@ paths:
/config:
post:
description: create/save new configuration and validate them before saving
summary: create/save new configuration and validate them before saving
security:
- ApiKeyAuth: []
operationId: CreateGitOpsConfig
requestBody:
description: A JSON object containing the gitops configuration
Expand Down Expand Up @@ -79,7 +85,10 @@ paths:
$ref: '#/components/schemas/Error'
put:
description: update configuration and validate them before saving(if last validation is within 30 seconds then do not validate)
summary: update configuration and validate them before saving(if last validation is within 30 seconds then do not validate)
operationId: UpdateGitOpsConfig
security:
- ApiKeyAuth: []
requestBody:
description: A JSON object containing the gitops configuration
required: true
Expand Down Expand Up @@ -114,6 +123,11 @@ paths:
$ref: '#/components/schemas/Error'

components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: Authorization
schemas:
GitOpsConfigDto:
type: object
Expand Down
183 changes: 181 additions & 2 deletions specs/swagger/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ tags:
x-displayName: CloneWorkflow (ENT)
- name: Deployment History
x-displayName: Get Deployment History (ENT)
description: Retrieves the deployment history for a specific CD pipeline based on various filter criteria.
description: >-
Retrieves the deployment history for a specific CD pipeline based on
various filter criteria.
- name: K8s Resource
description: >-
APIs for managing Kubernetes resources (get, create, update, delete,
Expand All @@ -80,6 +82,8 @@ tags:
x-displayName: Workflow Management
- name: Devtron Server version
x-displayName: Devtron Server version
- name: GitOps Validation
x-displayName: GitOps Validation
paths:
/resource/history/deployment/cd-pipeline/v1:
get:
Expand Down Expand Up @@ -3567,6 +3571,136 @@ paths:
- EA_ONLY
tags:
- Devtron Server version
/validate:
post:
description: Validate gitops configuration by dry run
summary: Validate gitops configuration by dry run
security:
- ApiKeyAuth: []
operationId: GitOpsValidateDryRun
requestBody:
description: A JSON object containing the gitops configuration
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GitOpsConfigDto'
responses:
'200':
description: Successfully return all validation stages results
content:
application/json:
schema:
$ref: '#/components/schemas/DetailedError'
'400':
description: Bad Request. Input Validation error/wrong request body.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Unauthorized User
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- GitOps Validation
/config:
post:
description: create/save new configuration and validate them before saving
summary: create/save new configuration and validate them before saving
security:
- ApiKeyAuth: []
operationId: CreateGitOpsConfig
requestBody:
description: A JSON object containing the gitops configuration
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GitOpsConfigDto'
responses:
'200':
description: >-
Successfully return all validation stages results and if validation
is correct then saves the configuration in the backend
content:
application/json:
schema:
$ref: '#/components/schemas/DetailedError'
'400':
description: Bad Request. Input Validation error/wrong request body.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Unauthorized User
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- GitOps Validation
put:
description: >-
update configuration and validate them before saving(if last validation
is within 30 seconds then do not validate)
summary: >-
update configuration and validate them before saving(if last validation
is within 30 seconds then do not validate)
operationId: UpdateGitOpsConfig
security:
- ApiKeyAuth: []
requestBody:
description: A JSON object containing the gitops configuration
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GitOpsConfigDto'
responses:
'200':
description: >-
Successfully return all validation stages results and if validation
is correct then updates the configuration in the backend
content:
application/json:
schema:
$ref: '#/components/schemas/DetailedError'
'400':
description: Bad Request. Input Validation error/wrong request body.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Unauthorized User
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- GitOps Validation
components:
securitySchemes:
ApiKeyAuth:
Expand Down Expand Up @@ -5493,6 +5627,50 @@ components:
isLast:
type: boolean
description: Indicates if this is the last node in its branch of the tree.
GitOpsConfigDto:
type: object
properties:
id:
type: integer
provider:
type: string
username:
type: string
token:
type: string
gitLabGroupId:
type: string
gitHubOrgId:
type: string
host:
type: string
active:
type: boolean
azureProjectName:
type: string
userId:
type: integer
DetailedError:
type: object
properties:
successfulStages:
type: array
items:
type: string
description: All successful stages
validatedOn:
type: string
description: Timestamp of validation
stageErrorMap:
type: array
items:
type: object
properties:
stage:
type: string
error:
type: string
description: map of stage and their respective errors
requestBodies:
SSOLoginDto:
description: SSO Login Configuration object
Expand Down Expand Up @@ -5696,7 +5874,8 @@ x-tagGroups:
- Environment Management
- Change Chart
- Clone Workflow
- Deployment History
- K8s Resource
- Workflow Management
- Devtron Server version
- Deployment History
- GitOps Validation
Loading