Skip to content

Commit a8629cb

Browse files
author
Bhautik Vala
committed
[patch] Add aiservice-upgrade pipeline:
1 parent 3365f8d commit a8629cb

File tree

2 files changed

+60
-4
lines changed

2 files changed

+60
-4
lines changed

src/mas/devops/tekton.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ def launchAiServiceInstallPipeline(dynClient: DynamicClient, params: dict) -> st
467467
def launchAiServiceUpgradePipeline(dynClient: DynamicClient,
468468
aiserviceInstanceId: str,
469469
skipPreCheck: bool = False,
470-
masChannel: str = "",
470+
aiserviceChannel: str = "",
471471
params: dict = {}) -> str:
472472
"""
473473
Create a PipelineRun to upgrade the chosen AI Service instance
@@ -480,12 +480,12 @@ def launchAiServiceUpgradePipeline(dynClient: DynamicClient,
480480
env = Environment(
481481
loader=FileSystemLoader(searchpath=templateDir)
482482
)
483-
template = env.get_template("pipelinerun-upgrade.yml.j2")
483+
template = env.get_template("pipelinerun-aiservice-upgrade.yml.j2")
484484
renderedTemplate = template.render(
485485
timestamp=timestamp,
486-
mas_instance_id=aiserviceInstanceId,
486+
aiservice_instance_id=aiserviceInstanceId,
487487
skip_pre_check=skipPreCheck,
488-
mas_channel=masChannel,
488+
aiservice_channel=aiserviceChannel,
489489
**params
490490
)
491491
logger.debug(renderedTemplate)
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
apiVersion: tekton.dev/v1beta1
3+
kind: PipelineRun
4+
metadata:
5+
name: "{{ aiservice_instance_id }}-upgrade-{{ timestamp }}"
6+
labels:
7+
tekton.dev/pipeline: aiservice-upgrade
8+
spec:
9+
pipelineRef:
10+
name: aiservice-upgrade
11+
12+
serviceAccountName: "{{ service_account_name | default('pipeline', True) }}"
13+
timeouts:
14+
pipeline: "0"
15+
16+
params:
17+
# Target AI Service Instance
18+
# -------------------------------------------------------------------------
19+
- name: aiservice_instance_id
20+
value: "{{ aiservice_instance_id }}"
21+
- name: aiservice_channel
22+
value: "{{ aiservice_channel }}"
23+
24+
# IBM Entitlement Key
25+
# -------------------------------------------------------------------------
26+
- name: ibm_entitlement_key
27+
value: "{{ ibm_entitlement_key }}"
28+
29+
{%- if skip_pre_check is defined and skip_pre_check != "" %}
30+
# Skip pre-check
31+
# -------------------------------------------------------------------------
32+
- name: skip_pre_check
33+
value: "{{ skip_pre_check }}"
34+
{%- endif %}
35+
{%- if artifactory_username is defined and artifactory_username != "" %}
36+
37+
# Enable development catalogs
38+
# -------------------------------------------------------------------------
39+
- name: artifactory_username
40+
value: "{{ artifactory_username }}"
41+
- name: artifactory_token
42+
value: "{{ artifactory_token }}"
43+
{%- endif %}
44+
45+
workspaces:
46+
# The generated configuration files
47+
# -------------------------------------------------------------------------
48+
- name: shared-configs
49+
persistentVolumeClaim:
50+
claimName: config-pvc
51+
52+
# PodTemplates configurations
53+
# -------------------------------------------------------------------------
54+
- name: shared-pod-templates
55+
secret:
56+
secretName: pipeline-pod-templates

0 commit comments

Comments
 (0)