@@ -477,13 +477,15 @@ def launchPipelineRun(dynClient: DynamicClient, namespace: str, templateName: st
477477
478478def launchInstallPipeline (dynClient : DynamicClient , params : dict ) -> str :
479479 """
480- Create a PipelineRun to install the chosen MAS instance (and selected dependencies)
480+ Create a PipelineRun to install the chosen MAS ( or AI Service ) instance (and selected dependencies)
481481 """
482- instanceId = params ["mas_instance_id" ]
483- namespace = f"mas-{ instanceId } -pipelines"
482+ applicationType = "aiservice" if not params .get ("mas_instance_id" ) else "mas"
483+ params ["applicationType" ] = applicationType
484+ instanceId = params [f"{ applicationType } _instance_id" ]
485+ namespace = f"{ applicationType } -{ instanceId } -pipelines"
484486 timestamp = launchPipelineRun (dynClient , namespace , "pipelinerun-install" , params )
485487
486- pipelineURL = f"{ getConsoleURL (dynClient )} /k8s/ns/mas -{ instanceId } -pipelines/tekton.dev~v1beta1~PipelineRun/{ instanceId } -install-{ timestamp } "
488+ pipelineURL = f"{ getConsoleURL (dynClient )} /k8s/ns/{ applicationType } -{ instanceId } -pipelines/tekton.dev~v1beta1~PipelineRun/{ instanceId } -install-{ timestamp } "
487489 return pipelineURL
488490
489491
@@ -498,18 +500,6 @@ def launchUpdatePipeline(dynClient: DynamicClient, params: dict) -> str:
498500 return pipelineURL
499501
500502
501- def launchAiServiceInstallPipeline (dynClient : DynamicClient , params : dict ) -> str :
502- """
503- Create a PipelineRun to install the AI Service
504- """
505- instanceId = params ["aiservice_instance_id" ]
506- namespace = f"aiservice-{ instanceId } -pipelines"
507- timestamp = launchPipelineRun (dynClient , namespace , "pipelinerun-aiservice-install" , params )
508-
509- pipelineURL = f"{ getConsoleURL (dynClient )} /k8s/ns/aiservice-{ instanceId } -pipelines/tekton.dev~v1beta1~PipelineRun/{ instanceId } -install-{ timestamp } "
510- return pipelineURL
511-
512-
513503def launchAiServiceUpgradePipeline (dynClient : DynamicClient ,
514504 aiserviceInstanceId : str ,
515505 skipPreCheck : bool = False ,
0 commit comments