Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
317 changes: 312 additions & 5 deletions src/mas/devops/tekton.py

Large diffs are not rendered by default.

20 changes: 5 additions & 15 deletions src/mas/devops/templates/pipelinerun-aiservice-upgrade.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,24 @@ spec:
pipeline: "0"

params:
# Registry Credentials Secret
# -------------------------------------------------------------------------
- name: pipeline_registry_secret_name
value: "mas-aiservice-upgrade-secrets"

# Target AI Service Instance
# -------------------------------------------------------------------------
- name: aiservice_instance_id
value: "{{ aiservice_instance_id }}"
- name: aiservice_channel
value: "{{ aiservice_channel }}"

# IBM Entitlement Key
# -------------------------------------------------------------------------
- name: ibm_entitlement_key
value: "{{ ibm_entitlement_key }}"

{%- if skip_pre_check is defined and skip_pre_check != "" %}
# Skip pre-check
# -------------------------------------------------------------------------
- name: skip_pre_check
value: "{{ skip_pre_check }}"
{%- endif %}
{%- if artifactory_username is defined and artifactory_username != "" %}

# Enable development catalogs
# -------------------------------------------------------------------------
- name: artifactory_username
value: "{{ artifactory_username }}"
- name: artifactory_token
value: "{{ artifactory_token }}"
{%- endif %}

workspaces:
# The generated configuration files
# -------------------------------------------------------------------------
Expand Down
15 changes: 5 additions & 10 deletions src/mas/devops/templates/pipelinerun-backup.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ spec:
persistentVolumeClaim:
claimName: backup-pvc
params:
# Registry Credentials Secret
# -------------------------------------------------------------------------
- name: pipeline_registry_secret_name
value: "mas-backup-secrets"

# Common Parameters
- name: image_pull_policy
value: IfNotPresent
Expand Down Expand Up @@ -74,16 +79,6 @@ spec:
value: "{{ cert_manager_provider }}"
{% endif %}

# Development Build Support
{% if artifactory_username is defined and artifactory_username != "" %}
- name: artifactory_username
value: "{{ artifactory_username }}"
{% endif %}
{% if artifactory_token is defined and artifactory_token != "" %}
- name: artifactory_token
value: "{{ artifactory_token }}"
{% endif %}

# Upload Configuration
{% if upload_backup is defined and upload_backup != "" %}
- name: upload_backup
Expand Down
20 changes: 8 additions & 12 deletions src/mas/devops/templates/pipelinerun-install.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ spec:
pipeline: "0"

params:
# IBM Entitlement Key
# Registry Credentials Secret
# -------------------------------------------------------------------------
- name: ibm_entitlement_key
value: "{{ ibm_entitlement_key }}"
- name: pipeline_registry_secret_name
{%- if mas_instance_id is defined and mas_instance_id != "" %}
value: "mas-install-secrets"
{%- else %}
value: "mas-aiservice-install-secrets"
{%- endif %}

{%- if skip_pre_check is defined and skip_pre_check != "" %}

# Pipeline config
Expand All @@ -44,15 +49,6 @@ spec:
- name: ocp_ingress_tls_secret_name
value: "{{ ocp_ingress_tls_secret_name }}"
{%- endif %}
{%- if artifactory_username is defined and artifactory_username != "" %}

# Enable development catalogs
# -------------------------------------------------------------------------
- name: artifactory_username
value: "{{ artifactory_username }}"
- name: artifactory_token
value: "{{ artifactory_token }}"
{%- endif %}
{%- if ibmcloud_apikey is defined and ibmcloud_resourcegroup != "" %}

# IBM Cloud
Expand Down
19 changes: 5 additions & 14 deletions src/mas/devops/templates/pipelinerun-restore.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ spec:
secret:
secretName: pipeline-restore-configs
params:
# Registry Credentials Secret
# -------------------------------------------------------------------------
- name: pipeline_registry_secret_name
value: "mas-restore-secrets"

# Common Parameters
- name: image_pull_policy
value: IfNotPresent
Expand Down Expand Up @@ -99,10 +104,6 @@ spec:
- name: dro_contact_lastname
value: "{{ dro_contact_lastname }}"
{% endif %}
{% if ibm_entitlement_key is defined and ibm_entitlement_key != "" %}
- name: ibm_entitlement_key
value: "{{ ibm_entitlement_key }}"
{% endif %}
{% if dro_namespace is defined and dro_namespace != "" %}
- name: dro_namespace
value: "{{ dro_namespace }}"
Expand Down Expand Up @@ -148,16 +149,6 @@ spec:
value: "{{ cert_manager_provider }}"
{% endif %}

# Development Build Support
{% if artifactory_username is defined and artifactory_username != "" %}
- name: artifactory_username
value: "{{ artifactory_username }}"
{% endif %}
{% if artifactory_token is defined and artifactory_token != "" %}
- name: artifactory_token
value: "{{ artifactory_token }}"
{% endif %}

# Download Configuration
{% if backup_archive_name is defined and backup_archive_name != "" %}
- name: backup_archive_name
Expand Down
18 changes: 5 additions & 13 deletions src/mas/devops/templates/pipelinerun-update.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ spec:
pipeline: "0"

params:
# Registry Credentials Secret
# -------------------------------------------------------------------------
- name: pipeline_registry_secret_name
value: "mas-update-secrets"

{%- if image_pull_policy is defined and image_pull_policy != "" %}

# Image Pull Policy
Expand All @@ -28,19 +33,6 @@ spec:
- name: mas_catalog_version
value: "{{ mas_catalog_version }}"

{%- if ibm_entitlement_key is defined and ibm_entitlement_key != "" %}
# TODO: What even uses this, nothing in the update pipeline should be using this
- name: ibm_entitlement_key
value: "{{ ibm_entitlement_key }}"
{%- endif %}
{%- if artifactory_username is defined and artifactory_username != "" %}
# Enable development catalogs
# -------------------------------------------------------------------------
- name: artifactory_username
value: "{{ artifactory_username }}"
- name: artifactory_token
value: "{{ artifactory_token }}"
{%- endif %}
{%- if skip_pre_check is defined and skip_pre_check != "" %}
# Skip pre-check
# -------------------------------------------------------------------------
Expand Down
19 changes: 5 additions & 14 deletions src/mas/devops/templates/pipelinerun-upgrade.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ spec:
pipeline: "0"

params:
# Registry Credentials Secret
# -------------------------------------------------------------------------
- name: pipeline_registry_secret_name
value: "mas-upgrade-secrets"

{%- if image_pull_policy is defined and image_pull_policy != "" %}

# Image Pull Policy
Expand All @@ -30,26 +35,12 @@ spec:
- name: mas_channel
value: "{{ mas_channel }}"

# IBM Entitlement Key
# -------------------------------------------------------------------------
- name: ibm_entitlement_key
value: "{{ ibm_entitlement_key }}"

{%- if skip_pre_check is defined and skip_pre_check != "" %}
# Skip pre-check
# -------------------------------------------------------------------------
- name: skip_pre_check
value: "{{ skip_pre_check }}"
{%- endif %}
{%- if artifactory_username is defined and artifactory_username != "" %}

# Enable development catalogs
# -------------------------------------------------------------------------
- name: artifactory_username
value: "{{ artifactory_username }}"
- name: artifactory_token
value: "{{ artifactory_token }}"
{%- endif %}
{%- if storage_class_rwo is defined and storage_class_rwo != "" %}
- name: storage_class_rwo
value: "{{ storage_class_rwo }}"
Expand Down
Loading