Skip to content

Commit 38520f8

Browse files
committed
feat: [DBOPS-1363]: Onboarding two new static steps LiquibaseUpdateSQLStep & LiquibaseRollbackSQLStep
1 parent 1022f5a commit 38520f8

8 files changed

+396
-0
lines changed

v0/pipeline/stages/cd/execution-wrapper-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ properties:
182182
- $ref: ../../steps/cd/stand-alone-traffic-shift-rollback-step-node.yaml
183183
- $ref: ../../steps/cd/elastigroup-blue-green-traffic-shift-step-node.yaml
184184
- $ref: ../../steps/ci/s3-upload-node.yaml
185+
- $ref: ../../steps/common/db-schema-update-sql-step-node.yaml
186+
- $ref: ../../steps/common/db-schema-rollback-sql-step-node.yaml
185187

186188
stepGroup:
187189
$ref: step-group-element-config.yaml

v0/pipeline/stages/custom/execution-wrapper-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ properties:
7474
- $ref: ../../steps/custom/event-listener-step-node.yaml
7575
- $ref: ../../steps/cd/helm-delete-step-node.yaml
7676
- $ref: ../../steps/ci/s3-upload-node.yaml
77+
- $ref: ../../steps/common/db-schema-update-sql-step-node.yaml
78+
- $ref: ../../steps/common/db-schema-rollback-sql-step-node.yaml
7779

7880
stepGroup:
7981
$ref: step-group-element-config.yaml
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
title: DBSchemaRollbackSQLInfo
2+
allOf:
3+
- $ref: ../../common/step-spec-type.yaml
4+
- type: object
5+
required:
6+
- connectorRef
7+
- dbInstance
8+
- dbSchema
9+
oneOf:
10+
- required: [tag]
11+
not:
12+
required: [changeSetCount]
13+
- required: [changeSetCount]
14+
not:
15+
required: [tag]
16+
properties:
17+
dbInstance:
18+
type: string
19+
dbSchema:
20+
type: string
21+
connectorRef:
22+
type: string
23+
globalSettings:
24+
type: object
25+
additionalProperties:
26+
type: string
27+
settings:
28+
oneOf:
29+
- type: object
30+
additionalProperties:
31+
type: string
32+
- type: string
33+
tag:
34+
type: string
35+
minLength: 1
36+
changeSetCount:
37+
type: integer
38+
minimum: 1
39+
delegateSelectors:
40+
oneOf:
41+
- type: array
42+
items:
43+
type: string
44+
- type: string
45+
pattern: (<\+.+>.*)
46+
minLength: 1
47+
envVariables:
48+
oneOf:
49+
- type: object
50+
additionalProperties:
51+
type: string
52+
- type: string
53+
image:
54+
type: string
55+
imagePullPolicy:
56+
oneOf:
57+
- type: string
58+
enum:
59+
- Always
60+
- Never
61+
- IfNotPresent
62+
- type: string
63+
pattern: (<\+.+>.*)
64+
minLength: 1
65+
privileged:
66+
oneOf:
67+
- type: boolean
68+
- type: string
69+
pattern: ^<\+input>((\.)((executionInput\(\))|(allowedValues|selectOneFrom|default|regex)\(.+?\)))*$
70+
minLength: 1
71+
resources:
72+
$ref: ../../common/container-resource.yaml
73+
runAsUser:
74+
oneOf:
75+
- type: integer
76+
format: int32
77+
- type: string
78+
$schema: http://json-schema.org/draft-07/schema#
79+
type: object
80+
required:
81+
- connectorRef
82+
- dbInstance
83+
- dbSchema
84+
oneOf:
85+
- required: [tag]
86+
not:
87+
required: [changeSetCount]
88+
- required: [changeSetCount]
89+
not:
90+
required: [tag]
91+
properties:
92+
dbInstance:
93+
type: string
94+
dbSchema:
95+
type: string
96+
connectorRef:
97+
type: string
98+
tag:
99+
type: string
100+
minLength: 1
101+
changeSetCount:
102+
type: integer
103+
minimum: 1
104+
settings:
105+
oneOf:
106+
- $ref: ../../common/parameter-field-map-string-json-node.yaml
107+
- type: string
108+
delegateSelectors:
109+
oneOf:
110+
- type: array
111+
items:
112+
type: string
113+
- type: string
114+
pattern: (<\+.+>.*)
115+
minLength: 1
116+
envVariables:
117+
oneOf:
118+
- type: object
119+
additionalProperties:
120+
type: string
121+
- type: string
122+
image:
123+
type: string
124+
imagePullPolicy:
125+
oneOf:
126+
- type: string
127+
enum:
128+
- Always
129+
- Never
130+
- IfNotPresent
131+
- type: string
132+
pattern: (<\+.+>.*)
133+
minLength: 1
134+
privileged:
135+
oneOf:
136+
- type: boolean
137+
- type: string
138+
pattern: ^<\+input>((\.)((executionInput\(\))|(allowedValues|selectOneFrom|default|regex)\(.+?\)))*$
139+
minLength: 1
140+
resources:
141+
$ref: ../../common/container-resource.yaml
142+
runAsUser:
143+
oneOf:
144+
- type: integer
145+
format: int32
146+
- type: string
147+
description:
148+
desc: This is the description for DBSchemaRollbackSQLInfo
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
title: DBSchemaRollbackSQLNode
2+
type: object
3+
required:
4+
- identifier
5+
- name
6+
- type
7+
properties:
8+
description:
9+
type: string
10+
desc: This is the description for DBSchemaRollbackSQLNode
11+
enforce:
12+
$ref: ../../common/policy-config.yaml
13+
failureStrategies:
14+
oneOf:
15+
- type: array
16+
items:
17+
$ref: ../../common/db-devops-failure-strategy-config.yaml
18+
- type: string
19+
pattern: ^<\+input>$
20+
minLength: 1
21+
identifier:
22+
type: string
23+
pattern: ^[a-zA-Z_][0-9a-zA-Z_]{0,127}$
24+
name:
25+
type: string
26+
pattern: ^[a-zA-Z_0-9-.][-0-9a-zA-Z_\s.]{0,127}$
27+
strategy:
28+
oneOf:
29+
- $ref: ../../common/strategy-config.yaml
30+
- type: string
31+
pattern: ^<\+input>$
32+
minLength: 1
33+
timeout:
34+
type: string
35+
pattern: ^(([1-9])+\d+[s])|(((([1-9])+\d*[mhwd])+([\s]?\d+[smhwd])*)|(.*<\+.*>(?!.*\.executionInput\(\)).*)|(^$))$
36+
type:
37+
type: string
38+
enum:
39+
- DBSchemaRollbackSQL
40+
when:
41+
oneOf:
42+
- $ref: ../../common/step-when-condition.yaml
43+
- type: string
44+
pattern: ^<\+input>$
45+
minLength: 1
46+
$schema: http://json-schema.org/draft-07/schema#
47+
allOf:
48+
- if:
49+
properties:
50+
type:
51+
const: DBSchemaRollbackSQL
52+
then:
53+
properties:
54+
spec:
55+
$ref: db-schema-rollback-sql-step-info.yaml
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
title: DBSchemaUpdateSQLInfo
2+
allOf:
3+
- $ref: ../../common/step-spec-type.yaml
4+
- type: object
5+
required:
6+
- connectorRef
7+
- dbSchema
8+
- dbInstance
9+
properties:
10+
dbInstance:
11+
type: string
12+
dbSchema:
13+
type: string
14+
connectorRef:
15+
type: string
16+
globalSettings:
17+
type: object
18+
additionalProperties:
19+
type: string
20+
settings:
21+
oneOf:
22+
- type: object
23+
additionalProperties:
24+
type: string
25+
- type: string
26+
delegateSelectors:
27+
oneOf:
28+
- type: array
29+
items:
30+
type: string
31+
- type: string
32+
pattern: (<\+.+>.*)
33+
minLength: 1
34+
envVariables:
35+
oneOf:
36+
- type: object
37+
additionalProperties:
38+
type: string
39+
- type: string
40+
image:
41+
type: string
42+
imagePullPolicy:
43+
oneOf:
44+
- type: string
45+
enum:
46+
- Always
47+
- Never
48+
- IfNotPresent
49+
- type: string
50+
pattern: (<\+.+>.*)
51+
minLength: 1
52+
privileged:
53+
oneOf:
54+
- type: boolean
55+
- type: string
56+
pattern: ^<\+input>((\.)((executionInput\(\))|(allowedValues|selectOneFrom|default|regex)\(.+?\)))*$
57+
minLength: 1
58+
resources:
59+
$ref: ../../common/container-resource.yaml
60+
runAsUser:
61+
oneOf:
62+
- type: integer
63+
format: int32
64+
- type: string
65+
$schema: http://json-schema.org/draft-07/schema#
66+
type: object
67+
required:
68+
- connectorRef
69+
- dbSchema
70+
- dbInstance
71+
properties:
72+
dbInstance:
73+
type: string
74+
dbSchema:
75+
type: string
76+
connectorRef:
77+
type: string
78+
settings:
79+
oneOf:
80+
- $ref: ../../common/parameter-field-map-string-json-node.yaml
81+
- type: string
82+
delegateSelectors:
83+
oneOf:
84+
- type: array
85+
items:
86+
type: string
87+
- type: string
88+
pattern: (<\+.+>.*)
89+
minLength: 1
90+
envVariables:
91+
oneOf:
92+
- type: object
93+
additionalProperties:
94+
type: string
95+
- type: string
96+
image:
97+
type: string
98+
imagePullPolicy:
99+
oneOf:
100+
- type: string
101+
enum:
102+
- Always
103+
- Never
104+
- IfNotPresent
105+
- type: string
106+
pattern: (<\+.+>.*)
107+
minLength: 1
108+
privileged:
109+
oneOf:
110+
- type: boolean
111+
- type: string
112+
pattern: ^<\+input>((\.)((executionInput\(\))|(allowedValues|selectOneFrom|default|regex)\(.+?\)))*$
113+
minLength: 1
114+
resources:
115+
$ref: ../../common/container-resource.yaml
116+
runAsUser:
117+
oneOf:
118+
- type: integer
119+
format: int32
120+
- type: string
121+
description:
122+
desc: This is the description for DBSchemaUpdateSQLInfo

0 commit comments

Comments
 (0)