Skip to content

Commit f82b305

Browse files
committed
feat: [DBOPS-1363]: Onboarding two new static steps LiquibaseUpdateSQLStep & LiquibaseRollbackSQLStep
1 parent 1284f0c commit f82b305

8 files changed

+384
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ properties:
3535
- $ref: ../../steps/common/dbops-liquibase-command-step-node.yaml
3636
- $ref: ../../steps/common/files-upload-step-node.yaml
3737
- $ref: ../../steps/custom/event-listener-step-node.yaml
38+
- $ref: ../../steps/common/dbops-liquibase-update-sql-step-node.yaml
39+
- $ref: ../../steps/common/dbops-liquibase-rollback-sql-step-node.yaml
3840
stepGroup:
3941
$ref: step-group-element-config.yaml
4042
description:

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/dbops-liquibase-update-sql-step-node.yaml
186+
- $ref: ../../steps/common/dbops-liquibase-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
@@ -73,6 +73,8 @@ properties:
7373
- $ref: ../../steps/cd/asg-steady-state-step-node.yaml
7474
- $ref: ../../steps/custom/event-listener-step-node.yaml
7575
- $ref: ../../steps/cd/helm-delete-step-node.yaml
76+
- $ref: ../../steps/common/dbops-liquibase-update-sql-step-node.yaml
77+
- $ref: ../../steps/common/dbops-liquibase-rollback-sql-step-node.yaml
7678

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

0 commit comments

Comments
 (0)