Skip to content

Commit c8dd0ba

Browse files
Prajesh JainPrajesh Jain
authored andcommitted
[minor] add cp4d_uninstall role to uninstall pipeline
1 parent bca8e90 commit c8dd0ba

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

src/mas/devops/tekton.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,6 +1115,9 @@ def launchUninstallPipeline(
11151115
uninstallDRO: bool = False,
11161116
uninstallMongoDb: bool = False,
11171117
uninstallSLS: bool = False,
1118+
uninstallCp4d: bool = False,
1119+
cpdOperatorsNamespace: str = "",
1120+
cpdInstanceNamespace: str = "",
11181121
) -> str:
11191122
"""
11201123
Create a PipelineRun to uninstall the chosen MAS instance (and selected dependencies)
@@ -1132,6 +1135,7 @@ def launchUninstallPipeline(
11321135
mongoDbAction = "uninstall" if uninstallMongoDb else "none"
11331136
slsAction = "uninstall" if uninstallSLS else "none"
11341137
droAction = "uninstall" if uninstallDRO else "none"
1138+
cp4dAction = "uninstall" if uninstallCp4d else "none"
11351139

11361140
# Render the pipelineRun
11371141
renderedTemplate = template.render(
@@ -1144,6 +1148,9 @@ def launchUninstallPipeline(
11441148
sls_action=slsAction,
11451149
dro_action=droAction,
11461150
dro_namespace=droNamespace,
1151+
cp4d_action=cp4dAction,
1152+
cpd_operators_namespace=cpdOperatorsNamespace,
1153+
cpd_instance_namespace=cpdInstanceNamespace,
11471154
)
11481155
logger.debug(renderedTemplate)
11491156
pipelineRun = yaml.safe_load(renderedTemplate)

src/mas/devops/templates/pipelinerun-uninstall.yml.j2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,10 @@ spec:
3939
value: {{ dro_action }}
4040
- name: dro_namespace
4141
value: {{ dro_namespace }}
42+
- name: cp4d_action
43+
value: {{ cp4d_action }}
44+
- name: cpd_operators_namespace
45+
value: {{ cpd_operators_namespace }}
46+
- name: cpd_instance_namespace
47+
value: {{ cpd_instance_namespace }}
4248

0 commit comments

Comments
 (0)