@@ -429,15 +429,17 @@ def launchPipelineRun(dynClient: DynamicClient, namespace: str, templateName: st
429429 return timestamp
430430
431431
432- def launchInstallPipeline (dynClient : DynamicClient , params : dict ) -> str :
432+ def launchInstallPipeline (dynClient : DynamicClient , params : dict , standalone_aiservice_install : str = "false" ) -> str :
433433 """
434- Create a PipelineRun to install the chosen MAS instance (and selected dependencies)
434+ Create a PipelineRun to install the chosen MAS ( or AI Service ) instance (and selected dependencies)
435435 """
436- instanceId = params ["mas_instance_id" ]
437- namespace = f"mas-{ instanceId } -pipelines"
436+ applicationType = "aiservice" if standalone_aiservice_install == "true" else "mas"
437+ params ["applicationType" ] = applicationType
438+ instanceId = params [f"{ applicationType } _instance_id" ]
439+ namespace = f"{ applicationType } -{ instanceId } -pipelines"
438440 timestamp = launchPipelineRun (dynClient , namespace , "pipelinerun-install" , params )
439441
440- pipelineURL = f"{ getConsoleURL (dynClient )} /k8s/ns/mas -{ instanceId } -pipelines/tekton.dev~v1beta1~PipelineRun/{ instanceId } -install-{ timestamp } "
442+ pipelineURL = f"{ getConsoleURL (dynClient )} /k8s/ns/{ applicationType } -{ instanceId } -pipelines/tekton.dev~v1beta1~PipelineRun/{ instanceId } -install-{ timestamp } "
441443 return pipelineURL
442444
443445
@@ -452,17 +454,6 @@ def launchUpdatePipeline(dynClient: DynamicClient, params: dict) -> str:
452454 return pipelineURL
453455
454456
455- def launchAiServiceInstallPipeline (dynClient : DynamicClient , params : dict ) -> str :
456- """
457- Create a PipelineRun to install the AI Service
458- """
459- instanceId = params ["aiservice_instance_id" ]
460- namespace = f"aiservice-{ instanceId } -pipelines"
461- timestamp = launchPipelineRun (dynClient , namespace , "pipelinerun-aiservice-install" , params )
462-
463- pipelineURL = f"{ getConsoleURL (dynClient )} /k8s/ns/aiservice-{ instanceId } -pipelines/tekton.dev~v1beta1~PipelineRun/{ instanceId } -install-{ timestamp } "
464- return pipelineURL
465-
466457
467458def launchAiServiceUpgradePipeline (dynClient : DynamicClient ,
468459 aiserviceInstanceId : str ,
0 commit comments