Skip to content
Merged
22 changes: 6 additions & 16 deletions src/mas/devops/tekton.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,13 +477,15 @@ def launchPipelineRun(dynClient: DynamicClient, namespace: str, templateName: st

def launchInstallPipeline(dynClient: DynamicClient, params: dict) -> str:
"""
Create a PipelineRun to install the chosen MAS instance (and selected dependencies)
Create a PipelineRun to install the chosen MAS ( or AI Service ) instance (and selected dependencies)
"""
instanceId = params["mas_instance_id"]
namespace = f"mas-{instanceId}-pipelines"
applicationType = "aiservice" if not params.get("mas_instance_id") else "mas"
params["applicationType"] = applicationType
instanceId = params[f"{applicationType}_instance_id"]
namespace = f"{applicationType}-{instanceId}-pipelines"
timestamp = launchPipelineRun(dynClient, namespace, "pipelinerun-install", params)

pipelineURL = f"{getConsoleURL(dynClient)}/k8s/ns/mas-{instanceId}-pipelines/tekton.dev~v1beta1~PipelineRun/{instanceId}-install-{timestamp}"
pipelineURL = f"{getConsoleURL(dynClient)}/k8s/ns/{applicationType}-{instanceId}-pipelines/tekton.dev~v1beta1~PipelineRun/{instanceId}-install-{timestamp}"
return pipelineURL


Expand All @@ -498,18 +500,6 @@ def launchUpdatePipeline(dynClient: DynamicClient, params: dict) -> str:
return pipelineURL


def launchAiServiceInstallPipeline(dynClient: DynamicClient, params: dict) -> str:
"""
Create a PipelineRun to install the AI Service
"""
instanceId = params["aiservice_instance_id"]
namespace = f"aiservice-{instanceId}-pipelines"
timestamp = launchPipelineRun(dynClient, namespace, "pipelinerun-aiservice-install", params)

pipelineURL = f"{getConsoleURL(dynClient)}/k8s/ns/aiservice-{instanceId}-pipelines/tekton.dev~v1beta1~PipelineRun/{instanceId}-install-{timestamp}"
return pipelineURL


def launchAiServiceUpgradePipeline(dynClient: DynamicClient,
aiserviceInstanceId: str,
skipPreCheck: bool = False,
Expand Down
298 changes: 0 additions & 298 deletions src/mas/devops/templates/pipelinerun-aiservice-install.yml.j2

This file was deleted.

Loading