Skip to content
Open
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
2 changes: 2 additions & 0 deletions v0/pipeline/stages/cd/execution-wrapper-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ properties:
- $ref: ../../steps/cd/stand-alone-traffic-shift-rollback-step-node.yaml
- $ref: ../../steps/cd/elastigroup-blue-green-traffic-shift-step-node.yaml
- $ref: ../../steps/ci/s3-upload-node.yaml
- $ref: ../../steps/common/db-schema-update-sql-step-node.yaml
- $ref: ../../steps/common/db-schema-rollback-sql-step-node.yaml

stepGroup:
$ref: step-group-element-config.yaml
Expand Down
2 changes: 2 additions & 0 deletions v0/pipeline/stages/custom/execution-wrapper-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ properties:
- $ref: ../../steps/custom/event-listener-step-node.yaml
- $ref: ../../steps/cd/helm-delete-step-node.yaml
- $ref: ../../steps/ci/s3-upload-node.yaml
- $ref: ../../steps/common/db-schema-update-sql-step-node.yaml
- $ref: ../../steps/common/db-schema-rollback-sql-step-node.yaml

stepGroup:
$ref: step-group-element-config.yaml
Expand Down
148 changes: 148 additions & 0 deletions v0/pipeline/steps/common/db-schema-rollback-sql-step-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
title: DBSchemaRollbackSQLInfo
allOf:
- $ref: ../../common/step-spec-type.yaml
- type: object
required:
- connectorRef
- dbInstance
- dbSchema
oneOf:
- required: [tag]
not:
required: [changeSetCount]
- required: [changeSetCount]
not:
required: [tag]
properties:
dbInstance:
type: string
dbSchema:
type: string
connectorRef:
type: string
globalSettings:
type: object
additionalProperties:
type: string
settings:
oneOf:
- type: object
additionalProperties:
type: string
- type: string
tag:
type: string
minLength: 1
changeSetCount:
type: integer
minimum: 1
delegateSelectors:
oneOf:
- type: array
items:
type: string
- type: string
pattern: (<\+.+>.*)
minLength: 1
envVariables:
oneOf:
- type: object
additionalProperties:
type: string
- type: string
image:
type: string
imagePullPolicy:
oneOf:
- type: string
enum:
- Always
- Never
- IfNotPresent
- type: string
pattern: (<\+.+>.*)
minLength: 1
privileged:
oneOf:
- type: boolean
- type: string
pattern: ^<\+input>((\.)((executionInput\(\))|(allowedValues|selectOneFrom|default|regex)\(.+?\)))*$
minLength: 1
resources:
$ref: ../../common/container-resource.yaml
runAsUser:
oneOf:
- type: integer
format: int32
- type: string
$schema: http://json-schema.org/draft-07/schema#
type: object
required:
- connectorRef
- dbInstance
- dbSchema
oneOf:
- required: [tag]
not:
required: [changeSetCount]
- required: [changeSetCount]
not:
required: [tag]
properties:
dbInstance:
type: string
dbSchema:
type: string
connectorRef:
type: string
tag:
type: string
minLength: 1
changeSetCount:
type: integer
minimum: 1
settings:
oneOf:
- $ref: ../../common/parameter-field-map-string-json-node.yaml
- type: string
delegateSelectors:
oneOf:
- type: array
items:
type: string
- type: string
pattern: (<\+.+>.*)
minLength: 1
envVariables:
oneOf:
- type: object
additionalProperties:
type: string
- type: string
image:
type: string
imagePullPolicy:
oneOf:
- type: string
enum:
- Always
- Never
- IfNotPresent
- type: string
pattern: (<\+.+>.*)
minLength: 1
privileged:
oneOf:
- type: boolean
- type: string
pattern: ^<\+input>((\.)((executionInput\(\))|(allowedValues|selectOneFrom|default|regex)\(.+?\)))*$
minLength: 1
resources:
$ref: ../../common/container-resource.yaml
runAsUser:
oneOf:
- type: integer
format: int32
- type: string
description:
desc: This is the description for DBSchemaRollbackSQLInfo
55 changes: 55 additions & 0 deletions v0/pipeline/steps/common/db-schema-rollback-sql-step-node.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
title: DBSchemaRollbackSQLNode
type: object
required:
- identifier
- name
- type
properties:
description:
type: string
desc: This is the description for DBSchemaRollbackSQLNode
enforce:
$ref: ../../common/policy-config.yaml
failureStrategies:
oneOf:
- type: array
items:
$ref: ../../common/db-devops-failure-strategy-config.yaml
- type: string
pattern: ^<\+input>$
minLength: 1
identifier:
type: string
pattern: ^[a-zA-Z_][0-9a-zA-Z_]{0,127}$
name:
type: string
pattern: ^[a-zA-Z_0-9-.][-0-9a-zA-Z_\s.]{0,127}$
strategy:
oneOf:
- $ref: ../../common/strategy-config.yaml
- type: string
pattern: ^<\+input>$
minLength: 1
timeout:
type: string
pattern: ^(([1-9])+\d+[s])|(((([1-9])+\d*[mhwd])+([\s]?\d+[smhwd])*)|(.*<\+.*>(?!.*\.executionInput\(\)).*)|(^$))$
type:
type: string
enum:
- DBSchemaRollbackSQL
when:
oneOf:
- $ref: ../../common/step-when-condition.yaml
- type: string
pattern: ^<\+input>$
minLength: 1
$schema: http://json-schema.org/draft-07/schema#
allOf:
- if:
properties:
type:
const: DBSchemaRollbackSQL
then:
properties:
spec:
$ref: db-schema-rollback-sql-step-info.yaml
122 changes: 122 additions & 0 deletions v0/pipeline/steps/common/db-schema-update-sql-step-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
title: DBSchemaUpdateSQLInfo
allOf:
- $ref: ../../common/step-spec-type.yaml
- type: object
required:
- connectorRef
- dbSchema
- dbInstance
properties:
dbInstance:
type: string
dbSchema:
type: string
connectorRef:
type: string
globalSettings:
type: object
additionalProperties:
type: string
settings:
oneOf:
- type: object
additionalProperties:
type: string
- type: string
delegateSelectors:
oneOf:
- type: array
items:
type: string
- type: string
pattern: (<\+.+>.*)
minLength: 1
envVariables:
oneOf:
- type: object
additionalProperties:
type: string
- type: string
image:
type: string
imagePullPolicy:
oneOf:
- type: string
enum:
- Always
- Never
- IfNotPresent
- type: string
pattern: (<\+.+>.*)
minLength: 1
privileged:
oneOf:
- type: boolean
- type: string
pattern: ^<\+input>((\.)((executionInput\(\))|(allowedValues|selectOneFrom|default|regex)\(.+?\)))*$
minLength: 1
resources:
$ref: ../../common/container-resource.yaml
runAsUser:
oneOf:
- type: integer
format: int32
- type: string
$schema: http://json-schema.org/draft-07/schema#
type: object
required:
- connectorRef
- dbSchema
- dbInstance
properties:
dbInstance:
type: string
dbSchema:
type: string
connectorRef:
type: string
settings:
oneOf:
- $ref: ../../common/parameter-field-map-string-json-node.yaml
- type: string
delegateSelectors:
oneOf:
- type: array
items:
type: string
- type: string
pattern: (<\+.+>.*)
minLength: 1
envVariables:
oneOf:
- type: object
additionalProperties:
type: string
- type: string
image:
type: string
imagePullPolicy:
oneOf:
- type: string
enum:
- Always
- Never
- IfNotPresent
- type: string
pattern: (<\+.+>.*)
minLength: 1
privileged:
oneOf:
- type: boolean
- type: string
pattern: ^<\+input>((\.)((executionInput\(\))|(allowedValues|selectOneFrom|default|regex)\(.+?\)))*$
minLength: 1
resources:
$ref: ../../common/container-resource.yaml
runAsUser:
oneOf:
- type: integer
format: int32
- type: string
description:
desc: This is the description for DBSchemaUpdateSQLInfo
Loading