From bc1cda69f03223483062f77abcaa6e433c8eabda Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Thu, 6 Jun 2024 16:45:02 -0300 Subject: [PATCH 01/22] [minor] Replace wait-for-install task --- tekton/src/pipelines/rollback.yml.j2 | 19 ++++-- tekton/src/pipelines/uninstall.yml.j2 | 22 +++++-- tekton/src/pipelines/update.yml.j2 | 61 +++++++++++++++++-- tekton/src/pipelines/upgrade.yml.j2 | 19 ++++-- .../src/tasks/fvt/fvt-wait-for-install.yml.j2 | 35 ----------- 5 files changed, 104 insertions(+), 52 deletions(-) delete mode 100644 tekton/src/tasks/fvt/fvt-wait-for-install.yml.j2 diff --git a/tekton/src/pipelines/rollback.yml.j2 b/tekton/src/pipelines/rollback.yml.j2 index 46d8410b43..3753bae5c3 100644 --- a/tekton/src/pipelines/rollback.yml.j2 +++ b/tekton/src/pipelines/rollback.yml.j2 @@ -19,6 +19,9 @@ spec: # MAS Instance ID (the instance who's install to wait for) - name: mas_instance_id type: string + - name: pipelinerun_name + type: string + description: name of the installation pipelinerun that must be tracked til completion {% endif %} # Pipeline config @@ -63,12 +66,20 @@ spec: # 0. Wait for the install pipeline to complete # ------------------------------------------------------------------------- - name: wait-for-install - params: - - name: mas_instance_id - value: $(params.mas_instance_id) taskRef: kind: Task - name: mas-fvt-wait-for-install + name: mas-devops-wait-for-tekton + params: + - name: type + value: pipelinerun + - name: name + value: $(params.pipelinerun_name) + - name: delay + value: 600 # seconds between checking the status of the pipelinerun + - name: retries + value: 50 # attempts before giving up + - name: ignore_failure + value: "False" # fails and exit once the first failure is detected {% endif %} # 1. Verify health of the cluster before we change anything diff --git a/tekton/src/pipelines/uninstall.yml.j2 b/tekton/src/pipelines/uninstall.yml.j2 index 8b9d404a22..865f2157a9 100644 --- a/tekton/src/pipelines/uninstall.yml.j2 +++ b/tekton/src/pipelines/uninstall.yml.j2 @@ -20,6 +20,12 @@ spec: default: IfNotPresent description: Tekton Pipeline image pull policy (for ibmmas/cli images) +{% if wait_for_install == true %} + - name: pipelinerun_name + type: string + description: name of the installation pipelinerun that must be tracked til completion +{% endif %} + # MAS Config # ------------------------------------------------------------------------- - name: mas_instance_id @@ -84,12 +90,20 @@ spec: # 0. Wait for the install pipeline to complete # ------------------------------------------------------------------------- - name: wait-for-install - params: - - name: mas_instance_id - value: $(params.mas_instance_id) taskRef: kind: Task - name: mas-fvt-wait-for-install + name: mas-devops-wait-for-tekton + params: + - name: type + value: pipelinerun + - name: name + value: $(params.pipelinerun_name) + - name: delay + value: 600 # seconds between checking the status of the pipelinerun + - name: retries + value: 50 # attempts before giving up + - name: ignore_failure + value: "False" # fails and exit once the first failure is detected {% endif %} # 1. Uninstall IBM Maximo Application Suite Applications diff --git a/tekton/src/pipelines/update.yml.j2 b/tekton/src/pipelines/update.yml.j2 index b3accbc6cd..f2201f7bef 100644 --- a/tekton/src/pipelines/update.yml.j2 +++ b/tekton/src/pipelines/update.yml.j2 @@ -23,6 +23,9 @@ spec: type: string - name: fvt_image_digest type: string + - name: pipelinerun_name + type: string + description: name of the installation pipelinerun that must be tracked til completion {% endif %} # Tekton Pipeline image pull policy (for ibmmas/cli images) @@ -191,12 +194,20 @@ spec: # 0. Wait for the install pipeline to complete # ------------------------------------------------------------------------- - name: wait-for-install - params: - - name: mas_instance_id - value: $(params.mas_instance_id) taskRef: kind: Task - name: mas-fvt-wait-for-install + name: mas-devops-wait-for-tekton + params: + - name: type + value: pipelinerun + - name: name + value: $(params.pipelinerun_name) + - name: delay + value: 600 # seconds between checking the status of the pipelinerun + - name: retries + value: 50 # attempts before giving up + - name: ignore_failure + value: "False" # fails and exit once the first failure is detected {% endif %} # 1. Verify health of the cluster before we change anything @@ -210,7 +221,27 @@ spec: - wait-for-install {% endif %} - # 2. Run the catalog update +{% if wait_for_install == true %} + # 2. Pre-Upgrade pipeline call - test scripts to run before update + # ------------------------------------------------------------------------- + - name: launchfvt-upgrade-pre + params: + - name: image_pull_policy + value: $(params.image_pull_policy) + - name: pipelinerun_name + value: "$(params.mas_instance_id)-fvt-uprade-pre" + taskRef: + kind: Task + name: mas-launchfvt-upgrade-pre + when: + - input: $(params.launchfvt_upgrade) + operator: in + values: ["true", "True"] + runAfter: + - pre-update-check +{% endif %} + + # 3. Run the catalog update # ------------------------------------------------------------------------- - name: update-catalog taskRef: @@ -442,6 +473,26 @@ spec: - update-spss - update-cognos +{% if wait_for_install == true %} + # 7. Post-Upgrade pipeline call - test scripts to run before upgrade + # ------------------------------------------------------------------------- + - name: launchfvt-upgrade-post + params: + - name: image_pull_policy + value: $(params.image_pull_policy) + - name: pipelinerun_name + value: "$(params.mas_instance_id)-fvt-upgrade-post" + taskRef: + kind: Task + name: mas-launchfvt-upgrade-post + when: + - input: $(params.launchfvt_upgrade) + operator: in + values: ["true", "True"] + runAfter: + - post-deps-update-verify +{% endif %} + {% if wait_for_install == true %} # In FVT only this is the time to take a must-gather and finalize the result # --------------------------------------------------------------------------- diff --git a/tekton/src/pipelines/upgrade.yml.j2 b/tekton/src/pipelines/upgrade.yml.j2 index ad69c46197..c282386e2f 100644 --- a/tekton/src/pipelines/upgrade.yml.j2 +++ b/tekton/src/pipelines/upgrade.yml.j2 @@ -36,6 +36,9 @@ spec: type: string default: "" # Considered False when not informed description: "Set this to any value other than 'true' to disable launch of the pre and post upgrade tests pipeline (running before and after upgrade process happens)" + - name: pipelinerun_name + type: string + description: name of the installation pipelinerun that must be tracked til completion {% endif %} {{ lookup('template', params_src_dir ~ '/install-appchannels.yml.j2') | indent(4) }} @@ -45,12 +48,20 @@ spec: # 0. Wait for the install pipeline to complete # ------------------------------------------------------------------------- - name: wait-for-install - params: - - name: mas_instance_id - value: $(params.mas_instance_id) taskRef: kind: Task - name: mas-fvt-wait-for-install + name: mas-devops-wait-for-tekton + params: + - name: type + value: pipelinerun + - name: name + value: $(params.pipelinerun_name) + - name: delay + value: 600 # seconds between checking the status of the pipelinerun + - name: retries + value: 50 # attempts before giving up + - name: ignore_failure + value: "False" # fails and exit once the first failure is detected {% endif %} # 1. Verify health of the cluster before we change anything diff --git a/tekton/src/tasks/fvt/fvt-wait-for-install.yml.j2 b/tekton/src/tasks/fvt/fvt-wait-for-install.yml.j2 deleted file mode 100644 index 90f3e7ee9f..0000000000 --- a/tekton/src/tasks/fvt/fvt-wait-for-install.yml.j2 +++ /dev/null @@ -1,35 +0,0 @@ ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: mas-fvt-wait-for-install -spec: - params: - - name: mas_instance_id - type: string - - steps: - - name: wait-for-install - image: image-registry.openshift-image-registry.svc:5000/openshift/cli:latest - script: | - #!/usr/bin/env bash - - echo "Waiting for install pipeline in $(context.taskRun.namespace) to complete ..." - - echo "" - echo "Status of install pipeline" - echo "------------------------------------------------------------------" - oc -n $(context.taskRun.namespace) get pipelinerun/$(params.mas_instance_id)-install-${DEVOPS_BUILD_NUMBER} - - echo "" - echo "Waiting for pipelinerun/$(params.mas_instance_id)-install-${DEVOPS_BUILD_NUMBER} to complete" - echo "------------------------------------------------------------------" - oc -n $(context.taskRun.namespace) wait pipelinerun/$(params.mas_instance_id)-install-${DEVOPS_BUILD_NUMBER} --for=condition=Succeeded --timeout=12h - - env: - - name: DEVOPS_BUILD_NUMBER - valueFrom: - secretKeyRef: - name: mas-devops - key: DEVOPS_BUILD_NUMBER - optional: false From 5891234f8e0618d964e877bb4dd1fadcf217e3eb Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Thu, 6 Jun 2024 20:16:22 -0300 Subject: [PATCH 02/22] [patch] Remove fvt-wait-for-install --- tekton/generate-tekton-tasks.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tekton/generate-tekton-tasks.yml b/tekton/generate-tekton-tasks.yml index d2f32f6175..00a72baf13 100644 --- a/tekton/generate-tekton-tasks.yml +++ b/tekton/generate-tekton-tasks.yml @@ -66,7 +66,6 @@ - fvt-sls - fvt-data-dictionary - fvt-run-suite - - fvt-wait-for-install - name: Generate Tasks (FVT Launchers) ansible.builtin.template: From 80001a4665eb7cb3146b65f937b56e735d2dba7c Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Thu, 6 Jun 2024 20:25:38 -0300 Subject: [PATCH 03/22] [patch] Missing parameter --- tekton/src/pipelines/update.yml.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tekton/src/pipelines/update.yml.j2 b/tekton/src/pipelines/update.yml.j2 index f2201f7bef..1e7c6860a0 100644 --- a/tekton/src/pipelines/update.yml.j2 +++ b/tekton/src/pipelines/update.yml.j2 @@ -26,6 +26,10 @@ spec: - name: pipelinerun_name type: string description: name of the installation pipelinerun that must be tracked til completion + - name: launchfvt_upgrade + type: string + default: "" # Considered False when not informed + description: "Set this to any value other than 'true' to disable launch of the pre and post upgrade tests pipeline (running before and after upgrade process happens)" {% endif %} # Tekton Pipeline image pull policy (for ibmmas/cli images) From 6ba79c7607e97be71890fdc53f4e0c5dab1acabf Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Fri, 7 Jun 2024 17:31:15 -0300 Subject: [PATCH 04/22] [patch] Fix --- tekton/src/pipelines/update.yml.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tekton/src/pipelines/update.yml.j2 b/tekton/src/pipelines/update.yml.j2 index 1e7c6860a0..8f1347908a 100644 --- a/tekton/src/pipelines/update.yml.j2 +++ b/tekton/src/pipelines/update.yml.j2 @@ -252,7 +252,11 @@ spec: kind: Task name: mas-devops-ibm-catalogs runAfter: +{% if wait_for_install == true %} + - launchfvt-upgrade-pre +{% else %} - pre-update-check +{% endif %} params: - name: devops_suite_name value: update-catalog From 517a83873646da8246ea23e1080ab61b5e77162a Mon Sep 17 00:00:00 2001 From: unnati-solanki-git <131964221+unnati-solanki-git@users.noreply.github.com> Date: Thu, 13 Jun 2024 09:21:23 +0530 Subject: [PATCH 05/22] [minor] IVT launcher changes (#1014) --- image/cli/masfvt/ivt.yml | 59 +++++++ image/cli/masfvt/templates/mas-ivt.yml.j2 | 58 +++++++ tekton/generate-tekton-pipelines.yml | 1 + tekton/generate-tekton-tasks.yml | 1 + tekton/src/pipelines/fvt-launcher.yml.j2 | 24 +++ tekton/src/pipelines/ivt.yml.j2 | 60 +++++++ tekton/src/pipelines/taskdefs/ivt/ivt.yml.j2 | 7 - .../src/tasks/fvt-launcher/launchivt.yml.j2 | 146 ++++++++++++++++++ 8 files changed, 349 insertions(+), 7 deletions(-) create mode 100644 image/cli/masfvt/ivt.yml create mode 100644 image/cli/masfvt/templates/mas-ivt.yml.j2 create mode 100644 tekton/src/pipelines/ivt.yml.j2 create mode 100644 tekton/src/tasks/fvt-launcher/launchivt.yml.j2 diff --git a/image/cli/masfvt/ivt.yml b/image/cli/masfvt/ivt.yml new file mode 100644 index 0000000000..b86be84291 --- /dev/null +++ b/image/cli/masfvt/ivt.yml @@ -0,0 +1,59 @@ +--- +- hosts: localhost + any_errors_fatal: true + vars: + # Image Pull Policy + image_pull_policy: "{{ lookup('env', 'IMAGE_PULL_POLICY') }}" + # MAS Details + mas_app_channel_manage: "{{ lookup('env', 'MAS_APP_CHANNEL_MANAGE') }}" + mas_app_channel_monitor: "{{ lookup('env', 'MAS_APP_CHANNEL_MONITOR') }}" + mas_instance_id: "{{ lookup('env', 'MAS_INSTANCE_ID') }}" + mas_workspace_id: "{{ lookup('env', 'MAS_WORKSPACE_ID') }}" + # FVT Configuration + fvt_image_registry: "{{ lookup('env', 'FVT_IMAGE_REGISTRY') }}" + fvt_artifactory_username: "{{ lookup('env', 'FVT_ARTIFACTORY_USERNAME') }}" + fvt_artifactory_token: "{{ lookup('env', 'FVT_ARTIFACTORY_TOKEN') }}" + fvt_digest_manage: "{{ lookup('env', 'FVT_DIGEST_MANAGE') }}" + fvt_digest_manage_pytest: "{{ lookup('env', 'FVT_DIGEST_MANAGE_PYTEST') }}" + fvt_digest_ctf: "{{ lookup('env', 'FVT_DIGEST_CTF') }}" + # Black and white listing + fvt_blacklist: "{{ lookup('env', 'FVT_BLACKLIST') }}" + fvt_whitelist: "{{ lookup('env', 'FVT_WHITELIST') }}" + # Pipeline Run Info + devops_build_number: "{{ lookup('env', 'DEVOPS_BUILD_NUMBER') | default('0', True) }}" + pipelinerun_name: "{{ lookup('env', 'PIPELINERUN_NAME') | default('mas-fvt-manage', True) }}-{{ devops_build_number }}" + pipelinerun_namespace: "{{ lookup('env', 'PIPELINERUN_NAMESPACE') | default('mas-' ~ mas_instance_id ~ '-pipelines', True) }}" + # Test Data + ldap_url: "{{ lookup('env', 'LDAP_URL') }}" + ldap_base_dn: "{{ lookup('env', 'LDAP_BASE_DN') }}" + ldap_bind_dn: "{{ lookup('env', 'LDAP_BIND_DN') }}" + ldap_bind_password: "{{ lookup('env', 'LDAP_BIND_PASSWORD') }}" + ldap_user_map: "{{ lookup('env', 'LDAP_USER_MAP') }}" + ldap_cert_alias: "{{ lookup('env', 'LDAP_CERT_ALIAS') }}" + ldap_crt: "{{ lookup('env', 'LDAP_CRT') }}" + tasks: + - name: "Debug" + debug: + msg: + - "pipelinerun_name ................ {{ pipelinerun_name }}" + - "pipelinerun_namespace ........... {{ pipelinerun_namespace }}" + - "" + - "mas_app_channel_monitor ......... {{ mas_app_channel_monitor }}" + - "mas_app_channel_manage .......... {{ mas_app_channel_manage }}" + - "mas_instance_id ................. {{ mas_instance_id }}" + - "mas_workspace_id ................ {{ mas_workspace_id }}" + - "" + - "fvt_image_registry .............. {{ fvt_image_registry }}" + - "fvt_artifactory_username ........ {{ fvt_artifactory_username }}" + - "fvt_artifactory_token ........... {{ fvt_artifactory_token }}" + - "fvt_digest_manage ............... {{ fvt_digest_manage }}" + - "fvt_digest_manage_pytest ........ {{ fvt_digest_manage_pytest }}" + - "fvt_digest_ctf .................. {{ fvt_digest_ctf }}" + - "" + - "fvt_blacklist ................... {{ fvt_blacklist }}" + - "fvt_whitelist ................... {{ fvt_whitelist }}" + + - name: "Start fvt-manage pipeline" + kubernetes.core.k8s: + apply: true + template: templates/mas-ivt.yml.j2 diff --git a/image/cli/masfvt/templates/mas-ivt.yml.j2 b/image/cli/masfvt/templates/mas-ivt.yml.j2 new file mode 100644 index 0000000000..066519a2dc --- /dev/null +++ b/image/cli/masfvt/templates/mas-ivt.yml.j2 @@ -0,0 +1,58 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + name: "{{ pipelinerun_name }}" + namespace: "{{ pipelinerun_namespace }}" + labels: + tekton.dev/pipeline: mas-ivt +spec: + pipelineRef: + name: mas-ivt + + serviceAccountName: pipeline + timeouts: + pipeline: "8h" + + params: + # Pull Policy + - name: image_pull_policy + value: "{{ image_pull_policy }}" + + # MAS Info + - name: mas_app_channel_manage + value: "{{ mas_app_channel_manage }}" + - name: mas_instance_id + value: "{{ mas_instance_id }}" + - name: mas_workspace_id + value: "{{ mas_workspace_id }}" + - name: mas_app_channel_monitor + value: "{{ mas_app_channel_monitor }}" + + # Registry + - name: fvt_image_registry + value: "{{ fvt_image_registry }}" + - name: fvt_artifactory_username + value: "{{ fvt_artifactory_username }}" + - name: fvt_artifactory_token + value: "{{ fvt_artifactory_token }}" + + # Digests of manage + - name: fvt_digest_manage + value: "{{ fvt_digest_manage }}" + - name: fvt_digest_manage_pytest + value: "{{ fvt_digest_manage_pytest }}" + + # Digests of monitor + - name: fvt_digest_ctf + value: "{{ fvt_digest_ctf }}" + + workspaces: + # The generated configuration files + - name: shared-configs + persistentVolumeClaim: + claimName: config-pvc + # PodTemplates configurations + - name: shared-pod-templates + secret: + secretName: pipeline-pod-templates diff --git a/tekton/generate-tekton-pipelines.yml b/tekton/generate-tekton-pipelines.yml index 2fc4eaf445..795f1e22db 100644 --- a/tekton/generate-tekton-pipelines.yml +++ b/tekton/generate-tekton-pipelines.yml @@ -50,6 +50,7 @@ - rollback - uninstall - fvt-launcher + - ivt # 2. Generate Pipelines # ------------------------------------------------------------------------- diff --git a/tekton/generate-tekton-tasks.yml b/tekton/generate-tekton-tasks.yml index 00a72baf13..f9d4877ce8 100644 --- a/tekton/generate-tekton-tasks.yml +++ b/tekton/generate-tekton-tasks.yml @@ -85,6 +85,7 @@ - launchfvt-visualinspection - launchfvt-upgrade-post - launchfvt-upgrade-pre + - launchivt # 4. Generate Tasks (IVT) # ------------------------------------------------------------------------- diff --git a/tekton/src/pipelines/fvt-launcher.yml.j2 b/tekton/src/pipelines/fvt-launcher.yml.j2 index 1b9c19d3b6..650fb511e6 100644 --- a/tekton/src/pipelines/fvt-launcher.yml.j2 +++ b/tekton/src/pipelines/fvt-launcher.yml.j2 @@ -67,6 +67,10 @@ spec: type: string default: "true" description: "Set this to any falue other than 'true' to disable launch of the Visual Inspection FVT pipeline after app-cfg-visualinspection completes" + - name: launchivt + type: string + default: "true" + description: "Set this to any falue other than 'true' to disable launch of the IVT pipeline after applications FVT completes" tasks: # 1. MAS Core FVT @@ -784,6 +788,26 @@ spec: - approval-optimizer - approval-predict # Infers Manage, Monitor and IoT completed - approval-visualinspection + - launchivt + + # 11. IVT + # ------------------------------------------------------------------------- + - name: launchivt + taskRef: + kind: Task + name: mas-launchivt + params: + - name: image_pull_policy + value: $(params.image_pull_policy) + - name: pipelinerun_name + value: "$(params.mas_instance_id)-ivt" + when: + - input: $(params.launchivt) + operator: in + values: ["true", "True"] + runAfter: + - approval-manage + - approval-monitor finally: # Collect must-gather diff --git a/tekton/src/pipelines/ivt.yml.j2 b/tekton/src/pipelines/ivt.yml.j2 new file mode 100644 index 0000000000..8280bd5899 --- /dev/null +++ b/tekton/src/pipelines/ivt.yml.j2 @@ -0,0 +1,60 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: Pipeline +metadata: + name: mas-ivt +spec: + workspaces: + # The generated configuration files + - name: shared-configs + # PodTemplates configurations + - name: shared-pod-templates + + params: + # Tekton Pipeline image pull policy (for ibmmas/cli images) + - name: image_pull_policy + type: string + default: IfNotPresent + description: Pull policy for pipeline container images + + # MAS Configuration + - name: mas_app_channel_manage + type: string + default: "" + - name: mas_instance_id + type: string + default: "" + - name: mas_workspace_id + type: string + default: "" + - name: mas_app_channel_monitor + type: string + default: "" + + # FVT Configuration + - name: fvt_image_registry + type: string + default: "" + - name: fvt_artifactory_username + type: string + default: "" + - name: fvt_artifactory_token + type: string + default: "" + + # Image Digests + - name: fvt_digest_manage + type: string + default: "" + - name: fvt_digest_manage_pytest + type: string + default: "" + + - name: fvt_digest_ctf + type: string + default: "" + + tasks: + # IVT + # ------------------------------------------------------------------------- + {{ lookup('template', 'taskdefs/ivt/ivt.yml.j2') | indent(4) }} \ No newline at end of file diff --git a/tekton/src/pipelines/taskdefs/ivt/ivt.yml.j2 b/tekton/src/pipelines/taskdefs/ivt/ivt.yml.j2 index 7e7a7c0952..98a64cc853 100644 --- a/tekton/src/pipelines/taskdefs/ivt/ivt.yml.j2 +++ b/tekton/src/pipelines/taskdefs/ivt/ivt.yml.j2 @@ -1,7 +1,3 @@ -# TODO: Integrate this into a new ivt-manage-monitor pipeline (once we have manage-base healthy, no point atm) - -# Note: fvt-manage-last-phase is the last test of Manage Core. IVT must start after that. - # ------------------------------------------------------------- # Manage x Monitor - Data Dictionary # - Requires in the same pipeline: @@ -43,6 +39,3 @@ workspaces: - name: configs workspace: shared-configs - runAfter: - - launchfvt-manage - - launchfvt-monitor diff --git a/tekton/src/tasks/fvt-launcher/launchivt.yml.j2 b/tekton/src/tasks/fvt-launcher/launchivt.yml.j2 new file mode 100644 index 0000000000..bc303235af --- /dev/null +++ b/tekton/src/tasks/fvt-launcher/launchivt.yml.j2 @@ -0,0 +1,146 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: Task +metadata: + name: mas-launchivt +spec: + params: + # Control the image pull policy for the FVT container image + - name: image_pull_policy + type: string + default: IfNotPresent + + - name: pipelinerun_name + type: string + + steps: + - name: start-pipelinerun + image: quay.io/ibmmas/cli:latest + imagePullPolicy: $(params.image_pull_policy) + command: + - ansible-playbook + - /masfvt/ivt.yml + env: + - name: IMAGE_PULL_POLICY + value: $(params.image_pull_policy) + - name: PIPELINERUN_NAME + value: $(params.pipelinerun_name) + - name: PIPELINERUN_NAMESPACE + value: $(context.taskRun.namespace) + + # Lookups from mas-devops + # ----------------------------------------------------------------------- + - name: DEVOPS_BUILD_NUMBER + valueFrom: + secretKeyRef: + name: mas-devops + key: DEVOPS_BUILD_NUMBER + optional: true + - name: MAS_INSTANCE_ID + valueFrom: + secretKeyRef: + name: mas-devops + key: MAS_INSTANCE_ID + optional: false + + # Lookups from mas-fvt + # ----------------------------------------------------------------------- + - name: FVT_IMAGE_REGISTRY + valueFrom: + secretKeyRef: + name: mas-fvt + key: FVT_IMAGE_REGISTRY + optional: false + - name: FVT_ARTIFACTORY_USERNAME + valueFrom: + secretKeyRef: + name: mas-fvt + key: FVT_ARTIFACTORY_USERNAME + optional: false + - name: FVT_ARTIFACTORY_TOKEN + valueFrom: + secretKeyRef: + name: mas-fvt + key: FVT_ARTIFACTORY_TOKEN + optional: false + + # Lookups from mas-fvt-manage + # ----------------------------------------------------------------------- + # Framework Information + - name: MAS_APP_CHANNEL_MANAGE + valueFrom: + secretKeyRef: + name: mas-fvt-manage + key: MAS_APP_CHANNEL_MANAGE + optional: false + - name: MAS_APP_CHANNEL_MONITOR + valueFrom: + secretKeyRef: + name: mas-fvt-monitor + key: MAS_APP_CHANNEL_MONITOR + optional: false + - name: MAS_WORKSPACE_ID + valueFrom: + secretKeyRef: + name: mas-fvt-manage + key: MAS_WORKSPACE_ID + optional: false + # Digests + - name: FVT_DIGEST_MANAGE + valueFrom: + secretKeyRef: + name: mas-fvt-manage + key: FVT_DIGEST_MANAGE + optional: false + - name: FVT_DIGEST_MANAGE_PYTEST + valueFrom: + secretKeyRef: + name: mas-fvt-manage + key: FVT_DIGEST_MANAGE_PYTEST + optional: false + - name: FVT_DIGEST_CTF + valueFrom: + secretKeyRef: + name: mas-fvt-monitor + key: FVT_DIGEST_CTF + optional: false + + # Black and white listing + - name: FVT_BLACKLIST + valueFrom: + secretKeyRef: + name: mas-fvt-manage + key: FVT_BLACKLIST_IS + optional: false + - name: FVT_WHITELIST + valueFrom: + secretKeyRef: + name: mas-fvt-manage + key: FVT_WHITELIST_IS + optional: false + + - name: wait-for-pipelinerun + image: quay.io/ibmmas/cli:latest + imagePullPolicy: $(params.image_pull_policy) + # 50 retries at 10 minute intervals = just over 8 hours + command: + - /opt/app-root/src/wait-for-tekton.sh + env: + - name: TYPE + value: pipelinerun + - name: NAME + value: $(params.pipelinerun_name) + - name: SUFFIX + valueFrom: + secretKeyRef: + name: mas-devops + key: DEVOPS_BUILD_NUMBER + optional: true + - name: NAMESPACE + value: $(context.taskRun.namespace) + - name: DELAY + value: "600" + - name: MAX_RETRIES + value: "50" + - name: IGNORE_FAILURE + value: "True" From 6af6fd85b379be8b3078b084461f0d9f4ee263f7 Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Thu, 13 Jun 2024 10:56:21 -0300 Subject: [PATCH 06/22] [patch] Typos --- tekton/src/pipelines/fvt-launcher.yml.j2 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tekton/src/pipelines/fvt-launcher.yml.j2 b/tekton/src/pipelines/fvt-launcher.yml.j2 index 1b9c19d3b6..b86ac08e8e 100644 --- a/tekton/src/pipelines/fvt-launcher.yml.j2 +++ b/tekton/src/pipelines/fvt-launcher.yml.j2 @@ -34,39 +34,39 @@ spec: - name: launchfvt_core type: string default: "true" - description: "Set this to any falue other than 'true' to disable launch of the SLS & Core FVT pipelines after suite-verify completes" + description: "Set this to any value other than 'true' to disable launch of the SLS & Core FVT pipelines after suite-verify completes" - name: launchfvt_assist type: string default: "true" - description: "Set this to any falue other than 'true' to disable launch of the Assist FVT pipeline after app-cfg-assist completes" + description: "Set this to any value other than 'true' to disable launch of the Assist FVT pipeline after app-cfg-assist completes" - name: launchfvt_iot type: string default: "true" - description: "Set this to any falue other than 'true' to disable launch of the IoT FVT pipeline after app-cfg-iot completes" + description: "Set this to any value other than 'true' to disable launch of the IoT FVT pipeline after app-cfg-iot completes" - name: launchfvt_manage type: string default: "true" - description: "Set this to any falue other than 'true' to disable launch of the Manage FVT pipeline after app-cfg-manage completes" + description: "Set this to any value other than 'true' to disable launch of the Manage FVT pipeline after app-cfg-manage completes" - name: launchfvt_mobile type: string default: "true" - description: "Set this to any falue other than 'true' to disable launch of the Mobile FVT pipeline after app-cfg-manage completes" + description: "Set this to any value other than 'true' to disable launch of the Mobile FVT pipeline after app-cfg-manage completes" - name: launchfvt_monitor type: string default: "true" - description: "Set this to any falue other than 'true' to disable launch of the Monitor FVT pipeline after app-cfg-monitor completes" + description: "Set this to any value other than 'true' to disable launch of the Monitor FVT pipeline after app-cfg-monitor completes" - name: launchfvt_optimizer type: string default: "true" - description: "Set this to any falue other than 'true' to disable launch of the Optimizer FVT pipeline after app-cfg-optimizer completes" + description: "Set this to any value other than 'true' to disable launch of the Optimizer FVT pipeline after app-cfg-optimizer completes" - name: launchfvt_predict type: string default: "true" - description: "Set this to any falue other than 'true' to disable launch of the Predict FVT pipeline after app-cfg-predict completes" + description: "Set this to any value other than 'true' to disable launch of the Predict FVT pipeline after app-cfg-predict completes" - name: launchfvt_visualinspection type: string default: "true" - description: "Set this to any falue other than 'true' to disable launch of the Visual Inspection FVT pipeline after app-cfg-visualinspection completes" + description: "Set this to any value other than 'true' to disable launch of the Visual Inspection FVT pipeline after app-cfg-visualinspection completes" tasks: # 1. MAS Core FVT From 6dbad46af2cb7e5fe546fc0d54fe7b56cec283ba Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Thu, 13 Jun 2024 13:00:10 -0300 Subject: [PATCH 07/22] [patch] Structure maange-is pipeline in phases --- tekton/src/pipelines/fvt-manage-is.yml.j2 | 20 +-- .../taskdefs/fvt-manage-is/acm.yml.j2 | 28 --- .../taskdefs/fvt-manage-is/aviation.yml.j2 | 44 ----- .../taskdefs/fvt-manage-is/health.yml.j2 | 119 ------------- .../taskdefs/fvt-manage-is/hse.yml.j2 | 28 --- .../fvt-manage-is/maintmanager.yml.j2 | 58 ------ .../taskdefs/fvt-manage-is/nuclear.yml.j2 | 28 --- .../{scheduler.yml.j2 => phase1.yml.j2} | 144 ++++++++++++++- .../taskdefs/fvt-manage-is/phase2.yml.j2 | 120 +++++++++++++ .../taskdefs/fvt-manage-is/phase3.yml.j2 | 168 ++++++++++++++++++ .../taskdefs/fvt-manage-is/phase4.yml.j2 | 135 ++++++++++++++ .../fvt-manage-is/serviceprovider.yml.j2 | 30 ---- .../taskdefs/fvt-manage-is/spatial.yml.j2 | 60 ------- .../fvt-manage-is/transportation.yml.j2 | 28 --- 14 files changed, 569 insertions(+), 441 deletions(-) delete mode 100644 tekton/src/pipelines/taskdefs/fvt-manage-is/acm.yml.j2 delete mode 100644 tekton/src/pipelines/taskdefs/fvt-manage-is/aviation.yml.j2 delete mode 100644 tekton/src/pipelines/taskdefs/fvt-manage-is/health.yml.j2 delete mode 100644 tekton/src/pipelines/taskdefs/fvt-manage-is/hse.yml.j2 delete mode 100644 tekton/src/pipelines/taskdefs/fvt-manage-is/maintmanager.yml.j2 delete mode 100644 tekton/src/pipelines/taskdefs/fvt-manage-is/nuclear.yml.j2 rename tekton/src/pipelines/taskdefs/fvt-manage-is/{scheduler.yml.j2 => phase1.yml.j2} (52%) create mode 100644 tekton/src/pipelines/taskdefs/fvt-manage-is/phase2.yml.j2 create mode 100644 tekton/src/pipelines/taskdefs/fvt-manage-is/phase3.yml.j2 create mode 100644 tekton/src/pipelines/taskdefs/fvt-manage-is/phase4.yml.j2 delete mode 100644 tekton/src/pipelines/taskdefs/fvt-manage-is/serviceprovider.yml.j2 delete mode 100644 tekton/src/pipelines/taskdefs/fvt-manage-is/spatial.yml.j2 delete mode 100644 tekton/src/pipelines/taskdefs/fvt-manage-is/transportation.yml.j2 diff --git a/tekton/src/pipelines/fvt-manage-is.yml.j2 b/tekton/src/pipelines/fvt-manage-is.yml.j2 index 26d4ed486c..e0da9bf864 100644 --- a/tekton/src/pipelines/fvt-manage-is.yml.j2 +++ b/tekton/src/pipelines/fvt-manage-is.yml.j2 @@ -63,7 +63,7 @@ spec: # - Add User into Security Group # - Set User's Default Site # ---------------------------------------- - - name: fvt-manage-setup-is # convention: use fvt-manage-, as the value of fvt_test_suite parameter + - name: fvt-manage-setup-is {{ lookup('template', 'taskdefs/fvt-manage/api/taskref.yml.j2') | indent(6) }} params: {{ lookup('template', 'taskdefs/fvt-manage/api/params.yml.j2') | indent(8) }} @@ -73,17 +73,7 @@ spec: # ---------------------------------------- # Industry Solution Tests # ---------------------------------------- - {{ lookup('template', 'taskdefs/fvt-manage-is/scheduler.yml.j2') | indent(4) }} - {{ lookup('template', 'taskdefs/fvt-manage-is/maintmanager.yml.j2') | indent(4) }} - {{ lookup('template', 'taskdefs/fvt-manage-is/acm.yml.j2') | indent(4) }} - {{ lookup('template', 'taskdefs/fvt-manage-is/aviation.yml.j2') | indent(4) }} - {{ lookup('template', 'taskdefs/fvt-manage-is/hse.yml.j2') | indent(4) }} - {{ lookup('template', 'taskdefs/fvt-manage-is/nuclear.yml.j2') | indent(4) }} - {{ lookup('template', 'taskdefs/fvt-manage-is/serviceprovider.yml.j2') | indent(4) }} - {{ lookup('template', 'taskdefs/fvt-manage-is/spatial.yml.j2') | indent(4) }} - {{ lookup('template', 'taskdefs/fvt-manage-is/transportation.yml.j2') | indent(4) }} - {{ lookup('template', 'taskdefs/fvt-manage-is/health.yml.j2') | indent(4) }} - - # Tests within _others will be re-introduced later - # ------------------------ - {# {{ lookup('template', 'taskdefs/fvt-manage-is/aviation.yml.j2') | indent(4) }} #} + {{ lookup('template', 'taskdefs/fvt-manage-is/phase1.yml.j2') | indent(4) }} + {{ lookup('template', 'taskdefs/fvt-manage-is/phase2.yml.j2') | indent(4) }} + {{ lookup('template', 'taskdefs/fvt-manage-is/phase3.yml.j2') | indent(4) }} + {{ lookup('template', 'taskdefs/fvt-manage-is/phase4.yml.j2') | indent(4) }} diff --git a/tekton/src/pipelines/taskdefs/fvt-manage-is/acm.yml.j2 b/tekton/src/pipelines/taskdefs/fvt-manage-is/acm.yml.j2 deleted file mode 100644 index eeed36dd30..0000000000 --- a/tekton/src/pipelines/taskdefs/fvt-manage-is/acm.yml.j2 +++ /dev/null @@ -1,28 +0,0 @@ -# ------------------ -# ACM - API Tests -# ------------------ -- name: fvt-manage-acm-api - {{ lookup('template', 'taskdefs/fvt-manage/api/taskref.yml.j2') | indent(2) }} - params: - {{ lookup('template', 'taskdefs/fvt-manage/api/params.yml.j2') | indent(4) }} - - name: fvt_test_suite - value: acm-api - runAfter: - - fvt-manage-setup-is # Tests must always start after fvt-manage-setup-is - -# ------------------ -# ACM - UI -# ------------------ -- name: fvt-manage-acm-ui - {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} - {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} - params: - {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} - - name: fvt_test_suite - value: acm-1 - - name: fvt_mas_appws_component - value: acm - - name: fvt_test_driver - value: tpae - runAfter: - - fvt-manage-setup-is # Tests must always start after fvt-manage-setup-is diff --git a/tekton/src/pipelines/taskdefs/fvt-manage-is/aviation.yml.j2 b/tekton/src/pipelines/taskdefs/fvt-manage-is/aviation.yml.j2 deleted file mode 100644 index 742cc94aeb..0000000000 --- a/tekton/src/pipelines/taskdefs/fvt-manage-is/aviation.yml.j2 +++ /dev/null @@ -1,44 +0,0 @@ -# ------------------ -# Aviation - API Tests -# ------------------ -- name: fvt-manage-aviation-api - {{ lookup('template', 'taskdefs/fvt-manage/api/taskref.yml.j2') | indent(2) }} - params: - {{ lookup('template', 'taskdefs/fvt-manage/api/params.yml.j2') | indent(4) }} - - name: fvt_test_suite - value: aviation-api - runAfter: - - fvt-manage-setup-is # Tests must always start after fvt-manage-setup-is - -# ------------------ -# Aviation - UI -# TODO: Aviation has a different setup that does not require setup-is. IS team will need to review that -# ------------------ - -{# - name: fvt-manage-aviation-ui-setup - {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} - {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} - params: - {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} - - name: fvt_test_suite - value: mfa-setup - - name: fvt_mas_appws_component - value: aviation - - name: fvt_test_driver - value: tpae - runAfter: - - fvt-manage-setup-is # Tests must always start after fvt-manage-setup-is - -- name: fvt-manage-aviation-ui - {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} - {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} - params: - {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} - - name: fvt_test_suite - value: mfa-1 - - name: fvt_mas_appws_component - value: aviation - - name: fvt_test_driver - value: tpae - runAfter: - - fvt-manage-aviation-ui-setup #} diff --git a/tekton/src/pipelines/taskdefs/fvt-manage-is/health.yml.j2 b/tekton/src/pipelines/taskdefs/fvt-manage-is/health.yml.j2 deleted file mode 100644 index df9779ba1b..0000000000 --- a/tekton/src/pipelines/taskdefs/fvt-manage-is/health.yml.j2 +++ /dev/null @@ -1,119 +0,0 @@ -## Health Prepare User Data -- name: fvt-health-testng-preparedata - params: - - name: mas_instance_id - value: $(params.mas_instance_id) - - name: mas_workspace_id - value: $(params.mas_workspace_id) - - - name: fvt_image_registry - value: $(params.fvt_image_registry) - - name: fvt_image_namespace - value: fvt-health - - name: fvt_image_name - value: fvt-health-preparedata - - name: fvt_image_digest - value: $(params.fvt_digest_health_preparedata) - - name: fvt_test_suite - value: prepare - - name: product_channel - value: $(params.mas_app_channel_manage) - - name: product_id - value: ibm-mas-health - - name: browserstack_remoteserver - value: http::@/wd/hub # we need to set it somewhere or discover it from inside the container - - taskRef: - kind: Task - name: mas-fvt-run-suite - # Only if we've set a digest of the Health FVT to run - when: - - input: "$(params.fvt_digest_health_preparedata)" - operator: notin - values: [""] - - input: "$(params.mas_app_channel_manage)" - operator: notin - values: [""] - workspaces: - - name: configs - workspace: shared-configs - -## All Health test suites on desktop -- name: fvt-health-testng-desktop - params: - - name: mas_instance_id - value: $(params.mas_instance_id) - - name: mas_workspace_id - value: $(params.mas_workspace_id) - - - name: fvt_image_registry - value: $(params.fvt_image_registry) - - name: fvt_image_namespace - value: fvt-health - - name: fvt_image_name - value: fvt-health-testng - - name: fvt_image_digest - value: $(params.fvt_digest_health_testng) - - name: fvt_test_suite - value: testng-health-minimal - - name: product_channel - value: $(params.mas_app_channel_manage) - - name: product_id - value: ibm-mas-health - - name: browserstack_remoteserver - value: http::@/wd/hub # we need to set it somewhere or discover it from inside the container - - taskRef: - kind: Task - name: mas-fvt-run-suite - # Only if we've set a digest of the Health FVT to run - when: - - input: "$(params.fvt_digest_health_testng)" - operator: notin - values: [""] - - input: "$(params.mas_app_channel_manage)" - operator: notin - values: [""] - runAfter: - - fvt-health-testng-preparedata - workspaces: - - name: configs - workspace: shared-configs - -## All Health test suites in Python -- name: fvt-health-python - params: - - name: mas_instance_id - value: $(params.mas_instance_id) - - name: mas_workspace_id - value: $(params.mas_workspace_id) - - - name: fvt_image_registry - value: $(params.fvt_image_registry) - - name: fvt_image_namespace - value: fvt-health - - name: fvt_image_name - value: fvt-health-python - - name: fvt_image_digest - value: $(params.fvt_digest_health_python) - - name: product_channel - value: $(params.mas_app_channel_manage) - - name: product_id - value: ibm-mas-health - - taskRef: - kind: Task - name: mas-fvt-run-suite - # Only if we've set a digest of the Health FVT to run - when: - - input: "$(params.fvt_digest_health_python)" - operator: notin - values: [""] - - input: "$(params.mas_app_channel_manage)" - operator: notin - values: [""] - runAfter: - - fvt-health-testng-preparedata - workspaces: - - name: configs - workspace: shared-configs diff --git a/tekton/src/pipelines/taskdefs/fvt-manage-is/hse.yml.j2 b/tekton/src/pipelines/taskdefs/fvt-manage-is/hse.yml.j2 deleted file mode 100644 index cf396aee73..0000000000 --- a/tekton/src/pipelines/taskdefs/fvt-manage-is/hse.yml.j2 +++ /dev/null @@ -1,28 +0,0 @@ -# ------------------ -# HSE - API Tests -# ------------------ -- name: fvt-manage-hse-api - {{ lookup('template', 'taskdefs/fvt-manage/api/taskref.yml.j2') | indent(2) }} - params: - {{ lookup('template', 'taskdefs/fvt-manage/api/params.yml.j2') | indent(4) }} - - name: fvt_test_suite - value: hse-api - runAfter: - - fvt-manage-setup-is # Tests must always start after fvt-manage-setup-is - -# ------------------ -# HSE - UI -# ------------------ -- name: fvt-manage-hse-ui - {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} - {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} - params: - {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} - - name: fvt_test_suite - value: hse-1 - - name: fvt_mas_appws_component - value: hse - - name: fvt_test_driver - value: tpae - runAfter: - - fvt-manage-setup-is # Tests must always start after fvt-manage-setup-is diff --git a/tekton/src/pipelines/taskdefs/fvt-manage-is/maintmanager.yml.j2 b/tekton/src/pipelines/taskdefs/fvt-manage-is/maintmanager.yml.j2 deleted file mode 100644 index 55736ae2b5..0000000000 --- a/tekton/src/pipelines/taskdefs/fvt-manage-is/maintmanager.yml.j2 +++ /dev/null @@ -1,58 +0,0 @@ -# ------------------ -# Maintenance Manager - API Tests -# ------------------ -- name: fvt-manage-maintmanager-api - {{ lookup('template', 'taskdefs/fvt-manage/api/taskref.yml.j2') | indent(2) }} - params: - {{ lookup('template', 'taskdefs/fvt-manage/api/params.yml.j2') | indent(4) }} - - name: fvt_test_suite - value: maintmanager-api - runAfter: - - fvt-manage-setup-is # Tests must always start after fvt-manage-setup-is - -# ------------------ -# Maintenance Manager - UI (Setup) -# ------------------ -- name: fvt-manage-maintmanager-setup - {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} - {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} - params: - {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} - - name: fvt_test_suite - value: maintmanager-setup-data - - name: fvt_mas_appws_component - value: maintmanager - - name: fvt_test_driver - value: graphite - runAfter: - - fvt-manage-setup-is # Tests must always start after fvt-manage-setup-is - -{# # Maintenance Manager - BVT -- name: fvt-manage-maintmanager-bvt - {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} - {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} - params: - {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} - - name: fvt_test_suite - value: maintmanager-bvt - - name: fvt_mas_appws_component - value: maintmanager - - name: fvt_test_driver - value: graphite - runAfter: - - fvt-manage-maintmanager-setup - -# Maintenance Manager - FVT -- name: fvt-manage-maintmanager-fvt - {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} - {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} - params: - {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} - - name: fvt_test_suite - value: maintmanager-fvt - - name: fvt_mas_appws_component - value: maintmanager - - name: fvt_test_driver - value: graphite - runAfter: - - fvt-manage-maintmanager-setup #} diff --git a/tekton/src/pipelines/taskdefs/fvt-manage-is/nuclear.yml.j2 b/tekton/src/pipelines/taskdefs/fvt-manage-is/nuclear.yml.j2 deleted file mode 100644 index 1173ff14e8..0000000000 --- a/tekton/src/pipelines/taskdefs/fvt-manage-is/nuclear.yml.j2 +++ /dev/null @@ -1,28 +0,0 @@ -# ------------------ -# Nuclear - API Tests -# ------------------ -- name: fvt-manage-nuclear-api - {{ lookup('template', 'taskdefs/fvt-manage/api/taskref.yml.j2') | indent(2) }} - params: - {{ lookup('template', 'taskdefs/fvt-manage/api/params.yml.j2') | indent(4) }} - - name: fvt_test_suite - value: nuclear-api - runAfter: - - fvt-manage-setup-is # Tests must always start after fvt-manage-setup-is - -# ------------------ -# Nuclear - UI -# ------------------ -- name: fvt-manage-nuclear-ui - {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} - {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} - params: - {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} - - name: fvt_test_suite - value: nuc-1 - - name: fvt_mas_appws_component - value: nuclear - - name: fvt_test_driver - value: tpae - runAfter: - - fvt-manage-setup-is # Tests must always start after fvt-manage-setup-is diff --git a/tekton/src/pipelines/taskdefs/fvt-manage-is/scheduler.yml.j2 b/tekton/src/pipelines/taskdefs/fvt-manage-is/phase1.yml.j2 similarity index 52% rename from tekton/src/pipelines/taskdefs/fvt-manage-is/scheduler.yml.j2 rename to tekton/src/pipelines/taskdefs/fvt-manage-is/phase1.yml.j2 index caee36c125..73a5449fc4 100644 --- a/tekton/src/pipelines/taskdefs/fvt-manage-is/scheduler.yml.j2 +++ b/tekton/src/pipelines/taskdefs/fvt-manage-is/phase1.yml.j2 @@ -1,4 +1,142 @@ +# ------------------------------------------------------------- +# PHASE 1 +# - fvt-health-testng-preparedata # Health +# - fvt-health-testng-desktop # Health +# - fvt-health-python # Health +# - fvt-manage-scheduler-api # Scheduler +# - fvt-manage-scheduler-setup # Scheduler +# ------------------------------------------------------------- + +# ------------------ +# Health # ------------------ + +## Health Prepare User Data +- name: fvt-health-testng-preparedata + params: + - name: mas_instance_id + value: $(params.mas_instance_id) + - name: mas_workspace_id + value: $(params.mas_workspace_id) + + - name: fvt_image_registry + value: $(params.fvt_image_registry) + - name: fvt_image_namespace + value: fvt-health + - name: fvt_image_name + value: fvt-health-preparedata + - name: fvt_image_digest + value: $(params.fvt_digest_health_preparedata) + - name: fvt_test_suite + value: prepare + - name: product_channel + value: $(params.mas_app_channel_manage) + - name: product_id + value: ibm-mas-health + - name: browserstack_remoteserver + value: http::@/wd/hub # we need to set it somewhere or discover it from inside the container + + taskRef: + kind: Task + name: mas-fvt-run-suite + # Only if we've set a digest of the Health FVT to run + when: + - input: "$(params.fvt_digest_health_preparedata)" + operator: notin + values: [""] + - input: "$(params.mas_app_channel_manage)" + operator: notin + values: [""] + workspaces: + - name: configs + workspace: shared-configs + runAfter: + - fvt-manage-setup-is + +## All Health test suites on desktop +- name: fvt-health-testng-desktop + params: + - name: mas_instance_id + value: $(params.mas_instance_id) + - name: mas_workspace_id + value: $(params.mas_workspace_id) + + - name: fvt_image_registry + value: $(params.fvt_image_registry) + - name: fvt_image_namespace + value: fvt-health + - name: fvt_image_name + value: fvt-health-testng + - name: fvt_image_digest + value: $(params.fvt_digest_health_testng) + - name: fvt_test_suite + value: testng-health-minimal + - name: product_channel + value: $(params.mas_app_channel_manage) + - name: product_id + value: ibm-mas-health + - name: browserstack_remoteserver + value: http::@/wd/hub # we need to set it somewhere or discover it from inside the container + + taskRef: + kind: Task + name: mas-fvt-run-suite + # Only if we've set a digest of the Health FVT to run + when: + - input: "$(params.fvt_digest_health_testng)" + operator: notin + values: [""] + - input: "$(params.mas_app_channel_manage)" + operator: notin + values: [""] + workspaces: + - name: configs + workspace: shared-configs + runAfter: + - fvt-health-testng-preparedata + +## All Health test suites in Python +- name: fvt-health-python + params: + - name: mas_instance_id + value: $(params.mas_instance_id) + - name: mas_workspace_id + value: $(params.mas_workspace_id) + + - name: fvt_image_registry + value: $(params.fvt_image_registry) + - name: fvt_image_namespace + value: fvt-health + - name: fvt_image_name + value: fvt-health-python + - name: fvt_image_digest + value: $(params.fvt_digest_health_python) + - name: product_channel + value: $(params.mas_app_channel_manage) + - name: product_id + value: ibm-mas-health + + taskRef: + kind: Task + name: mas-fvt-run-suite + # Only if we've set a digest of the Health FVT to run + when: + - input: "$(params.fvt_digest_health_python)" + operator: notin + values: [""] + - input: "$(params.mas_app_channel_manage)" + operator: notin + values: [""] + workspaces: + - name: configs + workspace: shared-configs + runAfter: + - fvt-health-testng-preparedata + +# ------------------ +# Scheduler +# ------------------ + # Scheduler - API Tests # ------------------ - name: fvt-manage-scheduler-api @@ -8,9 +146,9 @@ - name: fvt_test_suite value: scheduler-api runAfter: - - fvt-manage-setup-is # Tests must always start after fvt-manage-setup-is + - fvt-manage-setup-is + -# ------------------ # Scheduler - UI Tests # ------------------ @@ -27,7 +165,7 @@ - name: fvt_test_driver value: tpae runAfter: - - fvt-manage-setup-is # Tests must always start after fvt-manage-setup-is + - fvt-manage-setup-is {# # UI - name: fvt-manage-scheduler-1 diff --git a/tekton/src/pipelines/taskdefs/fvt-manage-is/phase2.yml.j2 b/tekton/src/pipelines/taskdefs/fvt-manage-is/phase2.yml.j2 new file mode 100644 index 0000000000..9a0884fa41 --- /dev/null +++ b/tekton/src/pipelines/taskdefs/fvt-manage-is/phase2.yml.j2 @@ -0,0 +1,120 @@ +# ------------------------------------------------------------- +# PHASE 2 +# - fvt-manage-acm-api # ACM +# - fvt-manage-acm-ui # ACM +# - fvt-manage-hse-api # HSE +# - fvt-manage-hse-ui # HSE +# - fvt-manage-serviceprovider-api # Service Provider +# - fvt-manage-serviceprovider-ui # Service Provider +# ------------------------------------------------------------- + +# ------------------ +# ACM +# ------------------ + +# ACM - API Tests +# ------------------ +- name: fvt-manage-acm-api + {{ lookup('template', 'taskdefs/fvt-manage/api/taskref.yml.j2') | indent(2) }} + params: + {{ lookup('template', 'taskdefs/fvt-manage/api/params.yml.j2') | indent(4) }} + - name: fvt_test_suite + value: acm-api + runAfter: + - fvt-health-testng-desktop + - fvt-health-python + - fvt-manage-scheduler-api + - fvt-manage-scheduler-setup + +# ACM - UI +# ------------------ +- name: fvt-manage-acm-ui + {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} + {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} + params: + {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} + - name: fvt_test_suite + value: acm-1 + - name: fvt_mas_appws_component + value: acm + - name: fvt_test_driver + value: tpae + runAfter: + - fvt-health-testng-desktop + - fvt-health-python + - fvt-manage-scheduler-api + - fvt-manage-scheduler-setup + +# ------------------ +# HSE +# ------------------ + +# HSE - API Tests +# ------------------ +- name: fvt-manage-hse-api + {{ lookup('template', 'taskdefs/fvt-manage/api/taskref.yml.j2') | indent(2) }} + params: + {{ lookup('template', 'taskdefs/fvt-manage/api/params.yml.j2') | indent(4) }} + - name: fvt_test_suite + value: hse-api + runAfter: + - fvt-health-testng-desktop + - fvt-health-python + - fvt-manage-scheduler-api + - fvt-manage-scheduler-setup + +# HSE - UI +# ------------------ +- name: fvt-manage-hse-ui + {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} + {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} + params: + {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} + - name: fvt_test_suite + value: hse-1 + - name: fvt_mas_appws_component + value: hse + - name: fvt_test_driver + value: tpae + runAfter: + - fvt-health-testng-desktop + - fvt-health-python + - fvt-manage-scheduler-api + - fvt-manage-scheduler-setup + +# ------------------ +# Service Provider +# ------------------ + +# Service Provider - API Tests +# ------------------ +- name: fvt-manage-serviceprovider-api + {{ lookup('template', 'taskdefs/fvt-manage/api/taskref.yml.j2') | indent(2) }} + params: + {{ lookup('template', 'taskdefs/fvt-manage/api/params.yml.j2') | indent(4) }} + - name: fvt_test_suite + value: serviceprovider-api + runAfter: + - fvt-health-testng-desktop + - fvt-health-python + - fvt-manage-scheduler-api + - fvt-manage-scheduler-setup + +# Service Provider - UI +# ------------------ +- name: fvt-manage-serviceprovider-ui + {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} + {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} + params: + {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} + - name: fvt_test_suite + value: sp-1 + - name: fvt_mas_appws_component + value: serviceprovider + - name: fvt_test_driver + value: tpae + runAfter: + - fvt-health-testng-desktop + - fvt-health-python + - fvt-manage-scheduler-api + - fvt-manage-scheduler-setup diff --git a/tekton/src/pipelines/taskdefs/fvt-manage-is/phase3.yml.j2 b/tekton/src/pipelines/taskdefs/fvt-manage-is/phase3.yml.j2 new file mode 100644 index 0000000000..7fd333d18b --- /dev/null +++ b/tekton/src/pipelines/taskdefs/fvt-manage-is/phase3.yml.j2 @@ -0,0 +1,168 @@ +# ------------------------------------------------------------- +# PHASE 3 +# - fvt-manage-nuclear-api # Nuclear +# - fvt-manage-nuclear-ui # Nuclear +# - fvt-manage-transportation-api # Transportation +# - fvt-manage-transportation-ui # Transportation +# - fvt-manage-lbs-api # LBS +# - fvt-manage-lbs-spatial-ui # LBS +# - fvt-manage-lbs-utilities-ui # LBS +# - fvt-manage-lbs-linear-ui # LBS +# ------------------------------------------------------------- + +# ------------------ +# Nuclear +# ------------------ + +# Nuclear - API Tests +# ------------------ +- name: fvt-manage-nuclear-api + {{ lookup('template', 'taskdefs/fvt-manage/api/taskref.yml.j2') | indent(2) }} + params: + {{ lookup('template', 'taskdefs/fvt-manage/api/params.yml.j2') | indent(4) }} + - name: fvt_test_suite + value: nuclear-api + runAfter: + - fvt-manage-acm-api + - fvt-manage-acm-ui + - fvt-manage-hse-api + - fvt-manage-hse-ui + - fvt-manage-serviceprovider-api + - fvt-manage-serviceprovider-ui + +# Nuclear - UI +# ------------------ +- name: fvt-manage-nuclear-ui + {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} + {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} + params: + {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} + - name: fvt_test_suite + value: nuc-1 + - name: fvt_mas_appws_component + value: nuclear + - name: fvt_test_driver + value: tpae + runAfter: + - fvt-manage-acm-api + - fvt-manage-acm-ui + - fvt-manage-hse-api + - fvt-manage-hse-ui + - fvt-manage-serviceprovider-api + - fvt-manage-serviceprovider-ui + + +# ------------------ +# Transportation +# ------------------ + +# Transportation - API Tests +# ------------------ +- name: fvt-manage-transportation-api + {{ lookup('template', 'taskdefs/fvt-manage/api/taskref.yml.j2') | indent(2) }} + params: + {{ lookup('template', 'taskdefs/fvt-manage/api/params.yml.j2') | indent(4) }} + - name: fvt_test_suite + value: transportation-api + runAfter: + - fvt-manage-acm-api + - fvt-manage-acm-ui + - fvt-manage-hse-api + - fvt-manage-hse-ui + - fvt-manage-serviceprovider-api + - fvt-manage-serviceprovider-ui + +# Transportation - UI +# ------------------ +- name: fvt-manage-transportation-ui + {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} + {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} + params: + {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} + - name: fvt_test_suite + value: tr-1 + - name: fvt_mas_appws_component + value: transportation + - name: fvt_test_driver + value: tpae + runAfter: + - fvt-manage-acm-api + - fvt-manage-acm-ui + - fvt-manage-hse-api + - fvt-manage-hse-ui + - fvt-manage-serviceprovider-api + - fvt-manage-serviceprovider-ui + + +# ------------------ +# LBS +# ------------------ + +# LBS - API Tests +# ------------------ +- name: fvt-manage-lbs-api + {{ lookup('template', 'taskdefs/fvt-manage/api/taskref.yml.j2') | indent(2) }} + params: + {{ lookup('template', 'taskdefs/fvt-manage/api/params.yml.j2') | indent(4) }} + - name: fvt_test_suite + value: lbs-api + runAfter: + - fvt-manage-acm-api + - fvt-manage-acm-ui + - fvt-manage-hse-api + - fvt-manage-hse-ui + - fvt-manage-serviceprovider-api + - fvt-manage-serviceprovider-ui + +# LBS - UI +# ------------------ + +# Manage FVT - Spatial +- name: fvt-manage-lbs-spatial-ui + {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} + {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} + params: + {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} + - name: fvt_test_suite + value: lbs-spatial-1 + - name: fvt_mas_appws_component + value: spatial + - name: fvt_test_driver + value: tpae + runAfter: + - fvt-manage-acm-api + - fvt-manage-acm-ui + - fvt-manage-hse-api + - fvt-manage-hse-ui + - fvt-manage-serviceprovider-api + - fvt-manage-serviceprovider-ui + +# Manage FVT - Utilities +- name: fvt-manage-lbs-utilities-ui + {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} + {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} + params: + {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} + - name: fvt_test_suite + value: lbs-utilities-1 + - name: fvt_mas_appws_component + value: spatial + - name: fvt_test_driver + value: tpae + runAfter: + - fvt-manage-lbs-spatial-ui + +# Manage FVT - Linear +- name: fvt-manage-lbs-linear-ui + {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} + {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} + params: + {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} + - name: fvt_test_suite + value: lbs-linear-1 + - name: fvt_mas_appws_component + value: spatial + - name: fvt_test_driver + value: tpae + runAfter: + - fvt-manage-lbs-utilities-ui diff --git a/tekton/src/pipelines/taskdefs/fvt-manage-is/phase4.yml.j2 b/tekton/src/pipelines/taskdefs/fvt-manage-is/phase4.yml.j2 new file mode 100644 index 0000000000..9a7fcdc02d --- /dev/null +++ b/tekton/src/pipelines/taskdefs/fvt-manage-is/phase4.yml.j2 @@ -0,0 +1,135 @@ +# ------------------------------------------------------------- +# PHASE 4 +# - fvt-manage-maintmanager-api # Maint Manager +# - fvt-manage-maintmanager-setup # Maint Manager +# - fvt-manage-aviation-api # Aviation +# ------------------------------------------------------------- + +# ------------------ +# Maintenance Manager +# ------------------ + +# Maintenance Manager - API Tests +# ------------------ +- name: fvt-manage-maintmanager-api + {{ lookup('template', 'taskdefs/fvt-manage/api/taskref.yml.j2') | indent(2) }} + params: + {{ lookup('template', 'taskdefs/fvt-manage/api/params.yml.j2') | indent(4) }} + - name: fvt_test_suite + value: maintmanager-api + runAfter: + - fvt-manage-nuclear-api + - fvt-manage-nuclear-ui + - fvt-manage-transportation-api + - fvt-manage-transportation-ui + - fvt-manage-lbs-api + - fvt-manage-lbs-linear-ui + +# Maintenance Manager - UI (Setup) +# ------------------ +- name: fvt-manage-maintmanager-setup + {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} + {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} + params: + {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} + - name: fvt_test_suite + value: maintmanager-setup-data + - name: fvt_mas_appws_component + value: maintmanager + - name: fvt_test_driver + value: graphite + runAfter: + - fvt-manage-nuclear-api + - fvt-manage-nuclear-ui + - fvt-manage-transportation-api + - fvt-manage-transportation-ui + - fvt-manage-lbs-api + - fvt-manage-lbs-linear-ui + +{# # Maintenance Manager - BVT +- name: fvt-manage-maintmanager-bvt + {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} + {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} + params: + {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} + - name: fvt_test_suite + value: maintmanager-bvt + - name: fvt_mas_appws_component + value: maintmanager + - name: fvt_test_driver + value: graphite + runAfter: + - fvt-manage-maintmanager-setup + +# Maintenance Manager - FVT +- name: fvt-manage-maintmanager-fvt + {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} + {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} + params: + {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} + - name: fvt_test_suite + value: maintmanager-fvt + - name: fvt_mas_appws_component + value: maintmanager + - name: fvt_test_driver + value: graphite + runAfter: + - fvt-manage-maintmanager-setup #} + + +# ------------------ +# Aviation +# ------------------ + +# Aviation - API Tests +# ------------------ +- name: fvt-manage-aviation-api + {{ lookup('template', 'taskdefs/fvt-manage/api/taskref.yml.j2') | indent(2) }} + params: + {{ lookup('template', 'taskdefs/fvt-manage/api/params.yml.j2') | indent(4) }} + - name: fvt_test_suite + value: aviation-api + runAfter: + - fvt-manage-nuclear-api + - fvt-manage-nuclear-ui + - fvt-manage-transportation-api + - fvt-manage-transportation-ui + - fvt-manage-lbs-api + - fvt-manage-lbs-linear-ui + +# Aviation - UI +# TODO: Aviation has a different setup that does not require setup-is. IS team will need to review that +# ------------------ + +{# - name: fvt-manage-aviation-ui-setup + {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} + {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} + params: + {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} + - name: fvt_test_suite + value: mfa-setup + - name: fvt_mas_appws_component + value: aviation + - name: fvt_test_driver + value: tpae + runAfter: + - fvt-manage-nuclear-api + - fvt-manage-nuclear-ui + - fvt-manage-transportation-api + - fvt-manage-transportation-ui + - fvt-manage-lbs-api + - fvt-manage-lbs-linear-ui + +- name: fvt-manage-aviation-ui + {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} + {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} + params: + {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} + - name: fvt_test_suite + value: mfa-1 + - name: fvt_mas_appws_component + value: aviation + - name: fvt_test_driver + value: tpae + runAfter: + - fvt-manage-aviation-ui-setup #} diff --git a/tekton/src/pipelines/taskdefs/fvt-manage-is/serviceprovider.yml.j2 b/tekton/src/pipelines/taskdefs/fvt-manage-is/serviceprovider.yml.j2 deleted file mode 100644 index c79f877ac4..0000000000 --- a/tekton/src/pipelines/taskdefs/fvt-manage-is/serviceprovider.yml.j2 +++ /dev/null @@ -1,30 +0,0 @@ -# ------------------ -# Service Provider - API Tests -# ------------------ -- name: fvt-manage-serviceprovider-api - {{ lookup('template', 'taskdefs/fvt-manage/api/taskref.yml.j2') | indent(2) }} - params: - {{ lookup('template', 'taskdefs/fvt-manage/api/params.yml.j2') | indent(4) }} - - name: fvt_test_suite - value: serviceprovider-api - runAfter: - - fvt-manage-setup-is # Tests must always start after fvt-manage-setup-is - -# ------------------ -# Service Provider - UI -# ------------------ - -# Manage FVT - Service Provider -- name: fvt-manage-serviceprovider-ui - {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} - {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} - params: - {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} - - name: fvt_test_suite - value: sp-1 - - name: fvt_mas_appws_component - value: serviceprovider - - name: fvt_test_driver - value: tpae - runAfter: - - fvt-manage-setup-is # Tests must always start after fvt-manage-setup-is \ No newline at end of file diff --git a/tekton/src/pipelines/taskdefs/fvt-manage-is/spatial.yml.j2 b/tekton/src/pipelines/taskdefs/fvt-manage-is/spatial.yml.j2 deleted file mode 100644 index b4c2bc80a3..0000000000 --- a/tekton/src/pipelines/taskdefs/fvt-manage-is/spatial.yml.j2 +++ /dev/null @@ -1,60 +0,0 @@ -# ------------------ -# LBS - API Tests -# ------------------ -- name: fvt-manage-lbs-api - {{ lookup('template', 'taskdefs/fvt-manage/api/taskref.yml.j2') | indent(2) }} - params: - {{ lookup('template', 'taskdefs/fvt-manage/api/params.yml.j2') | indent(4) }} - - name: fvt_test_suite - value: lbs-api - runAfter: - - fvt-manage-setup-is # Tests must always start after fvt-manage-setup-is - -# ------------------ -# LBS - UI -# ------------------ - -# Manage FVT - Spatial -- name: fvt-manage-lbs-spatial-ui - {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} - {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} - params: - {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} - - name: fvt_test_suite - value: lbs-spatial-1 - - name: fvt_mas_appws_component - value: spatial - - name: fvt_test_driver - value: tpae - runAfter: - - fvt-manage-setup-is - -# Manage FVT - Utilities -- name: fvt-manage-lbs-utilities-ui - {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} - {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} - params: - {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} - - name: fvt_test_suite - value: lbs-utilities-1 - - name: fvt_mas_appws_component - value: spatial - - name: fvt_test_driver - value: tpae - runAfter: - - fvt-manage-lbs-spatial-ui - -# Manage FVT - Linear -- name: fvt-manage-lbs-linear-ui - {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} - {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} - params: - {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} - - name: fvt_test_suite - value: lbs-linear-1 - - name: fvt_mas_appws_component - value: spatial - - name: fvt_test_driver - value: tpae - runAfter: - - fvt-manage-lbs-utilities-ui diff --git a/tekton/src/pipelines/taskdefs/fvt-manage-is/transportation.yml.j2 b/tekton/src/pipelines/taskdefs/fvt-manage-is/transportation.yml.j2 deleted file mode 100644 index 871533876b..0000000000 --- a/tekton/src/pipelines/taskdefs/fvt-manage-is/transportation.yml.j2 +++ /dev/null @@ -1,28 +0,0 @@ -# ------------------ -# Transportation - API Tests -# ------------------ -- name: fvt-manage-transportation-api - {{ lookup('template', 'taskdefs/fvt-manage/api/taskref.yml.j2') | indent(2) }} - params: - {{ lookup('template', 'taskdefs/fvt-manage/api/params.yml.j2') | indent(4) }} - - name: fvt_test_suite - value: transportation-api - runAfter: - - fvt-manage-setup-is # Tests must always start after fvt-manage-setup-is - -# ------------------ -# Transportation - UI -# ------------------ -- name: fvt-manage-transportation-ui - {{ lookup('template', 'taskdefs/fvt-manage/ui/taskref.yml.j2') | indent(2) }} - {{ lookup('template', 'taskdefs/fvt-manage/ui/when.yml.j2') | indent(2) }} - params: - {{ lookup('template', 'taskdefs/fvt-manage/ui/params.yml.j2') | indent(4) }} - - name: fvt_test_suite - value: tr-1 - - name: fvt_mas_appws_component - value: transportation - - name: fvt_test_driver - value: tpae - runAfter: - - fvt-manage-setup-is # Tests must always start after fvt-manage-setup-is From 6d23b86631f1f17047dc6c4d84f4f1fde69cfb69 Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Thu, 13 Jun 2024 13:30:24 -0300 Subject: [PATCH 08/22] [minor] Added launchfvt-is in fvt-launcher --- tekton/src/pipelines/fvt-launcher.yml.j2 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tekton/src/pipelines/fvt-launcher.yml.j2 b/tekton/src/pipelines/fvt-launcher.yml.j2 index 3271bf3305..74489fe856 100644 --- a/tekton/src/pipelines/fvt-launcher.yml.j2 +++ b/tekton/src/pipelines/fvt-launcher.yml.j2 @@ -47,6 +47,10 @@ spec: type: string default: "true" description: "Set this to any value other than 'true' to disable launch of the Manage FVT pipeline after app-cfg-manage completes" + - name: launchfvt_manage_is + type: string + default: "true" + description: "Set this to any value other than 'true' to disable launch of the Manage Industry Solutions FVT pipeline after app-cfg-manage completes" - name: launchfvt_mobile type: string default: "true" @@ -374,6 +378,22 @@ spec: values: ["true", "True"] runAfter: - waitfor-manage + + - name: launchfvt-manage-is + params: + - name: image_pull_policy + value: $(params.image_pull_policy) + - name: pipelinerun_name + value: "$(params.mas_instance_id)-fvt-manage-is" + taskRef: + kind: Task + name: mas-launchfvt-manage-is + when: + - input: $(params.launchfvt_manage_is) + operator: in + values: ["true", "True"] + runAfter: + - waitfor-manage - name: approval-manage taskRef: @@ -397,6 +417,7 @@ spec: values: ["true", "True"] runAfter: - launchfvt-manage + - launchfvt-manage-is # 6. Application FVT - Mobile From 5f2957a6511d61c5a14e16d6dac5252acb04f3f0 Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Thu, 13 Jun 2024 21:28:57 -0300 Subject: [PATCH 09/22] [minor] Move manage-setup to fvt-launcher --- tekton/src/params/fvt.yml.j2 | 64 ------------------- tekton/src/pipelines/fvt-launcher.yml.j2 | 28 +++++++- tekton/src/pipelines/fvt-sls.yml.j2 | 19 +++--- .../taskdefs/fvt-manage/api/params.yml.j2 | 6 +- .../taskdefs/fvt-manage/phase1.yml.j2 | 13 ---- .../taskdefs/fvt-manage/phase2.yml.j2 | 4 +- tekton/src/tasks/fvt/fvt-manage-pytest.yml.j2 | 23 +++---- 7 files changed, 49 insertions(+), 108 deletions(-) delete mode 100644 tekton/src/params/fvt.yml.j2 diff --git a/tekton/src/params/fvt.yml.j2 b/tekton/src/params/fvt.yml.j2 deleted file mode 100644 index 69800e19aa..0000000000 --- a/tekton/src/params/fvt.yml.j2 +++ /dev/null @@ -1,64 +0,0 @@ -# Registry -- name: fvt_image_registry - type: string - default: "" - -# Artifactory Secret -- name: fvt_artifactory_username - type: string - default: "" -- name: fvt_artifactory_token - type: string - default: "" - -# FVT Digests -- name: fvt_digest_iot - type: string - description: FVT Digest - IoT - default: "" -- name: fvt_digest_manage - type: string - description: FVT Digest - Manage - default: "" -- name: fvt_digest_manage_civil_selenium - type: string - description: FVT Digest - Manage Civil - default: "" -- name: fvt_digest_ctf - type: string - description: FVT Digest - Common Test Framework (Predict, Monitor, Optimizer, Visual Inspection) - default: "" -- name: fvt_digest_health_preparedata - type: string - description: FVT Digest - Health - Preparedata - default: "" -- name: fvt_digest_health_testng - type: string - description: FVT Digest - Health - Testng - default: "" -- name: fvt_digest_health_python - type: string - description: FVT Digest - Health - Python - default: "" -- name: fvt_digest_optimizer - type: string - description: FVT Digest - Optimizer - default: "" - -# IVT Digests -- name: ivt_digest_core - type: string - description: IVT Digest - Core - default: "" - -# SLS Digest -- name: fvt_digest_sls - type: string - description: SLS Digest - default: "" - -# Data Dictionary Digest -- name: fvt_digest_data_dictionary - type: string - description: Data Dictionary Digest - default: "" diff --git a/tekton/src/pipelines/fvt-launcher.yml.j2 b/tekton/src/pipelines/fvt-launcher.yml.j2 index 74489fe856..a85dc813df 100644 --- a/tekton/src/pipelines/fvt-launcher.yml.j2 +++ b/tekton/src/pipelines/fvt-launcher.yml.j2 @@ -75,6 +75,16 @@ spec: type: string default: "true" description: "Set this to any value other than 'true' to disable launch of the IVT pipeline after applications FVT completes" + + # Required by Manage Setup (Data Loader) + - name: mas_app_channel_manage + type: string + default: "" + description: "Manage Channel - necessary to run Manage Setup and for the when clause" + - name: fvt_digest_manage_pytest + type: string + default: "" + description: "Manage Pytest FVT Digest - necessary to run Manage Setup and for the when clause" tasks: # 1. MAS Core FVT @@ -362,6 +372,17 @@ spec: values: ["true", "True"] runAfter: - approval-suite-verify + + # Manage Setup (Data Loader) + # Required by fvt-manage, fvt-manage-is, fvt-optimizer and fvt-predict pipelines + - name: manage-setup + {{ lookup('template', 'taskdefs/fvt-manage/api/taskref.yml.j2') | indent(6) }} + params: + {{ lookup('template', 'taskdefs/fvt-manage/api/params.yml.j2') | indent(8) }} + - name: fvt_test_suite + value: base-api-setup + runAfter: + - waitfor-manage - name: launchfvt-manage params: @@ -377,7 +398,7 @@ spec: operator: in values: ["true", "True"] runAfter: - - waitfor-manage + - manage-setup - name: launchfvt-manage-is params: @@ -393,7 +414,7 @@ spec: operator: in values: ["true", "True"] runAfter: - - waitfor-manage + - manage-setup - name: approval-manage taskRef: @@ -578,6 +599,7 @@ spec: values: ["true", "True"] runAfter: - waitfor-optimizer + - manage-setup - name: approval-optimizer taskRef: @@ -854,3 +876,5 @@ spec: workspaces: # Shared storage to hold mustgather output for tasks - name: shared-mustgather + # The generated configuration files + - name: shared-configs diff --git a/tekton/src/pipelines/fvt-sls.yml.j2 b/tekton/src/pipelines/fvt-sls.yml.j2 index 5bae988491..2f6f1794f1 100644 --- a/tekton/src/pipelines/fvt-sls.yml.j2 +++ b/tekton/src/pipelines/fvt-sls.yml.j2 @@ -11,15 +11,16 @@ spec: - name: shared-pod-templates params: - # 1. Common Parameters - # ------------------------------------------------------------------------- - {{ lookup('template', params_src_dir ~ '/common.yml.j2') | indent(4) }} - - # 2. Additional Params for FVT - # ------------------------------------------------------------------------- - {{ lookup('template', params_src_dir ~ '/fvt.yml.j2') | indent(4) }} - - # SLS Namespace + - name: mas_instance_id + type: string + default: "" + - name: fvt_image_registry + type: string + default: "" + - name: fvt_digest_sls + type: string + description: SLS Digest + default: "" - name: sls_namespace type: string description: SLS Namespace diff --git a/tekton/src/pipelines/taskdefs/fvt-manage/api/params.yml.j2 b/tekton/src/pipelines/taskdefs/fvt-manage/api/params.yml.j2 index 4746c24b1f..9d6f56e234 100644 --- a/tekton/src/pipelines/taskdefs/fvt-manage/api/params.yml.j2 +++ b/tekton/src/pipelines/taskdefs/fvt-manage/api/params.yml.j2 @@ -1,7 +1,5 @@ - name: mas_instance_id value: $(params.mas_instance_id) -- name: mas_workspace_id - value: $(params.mas_workspace_id) - name: fvt_image_registry value: $(params.fvt_image_registry) - name: fvt_image_namespace @@ -13,6 +11,4 @@ - name: product_channel value: $(params.mas_app_channel_manage) - name: product_id - value: ibm-mas-manage -- name: artifactory_token - value: $(params.fvt_artifactory_token) \ No newline at end of file + value: ibm-mas-manage \ No newline at end of file diff --git a/tekton/src/pipelines/taskdefs/fvt-manage/phase1.yml.j2 b/tekton/src/pipelines/taskdefs/fvt-manage/phase1.yml.j2 index d3f0b2d17a..30a5c68cd3 100644 --- a/tekton/src/pipelines/taskdefs/fvt-manage/phase1.yml.j2 +++ b/tekton/src/pipelines/taskdefs/fvt-manage/phase1.yml.j2 @@ -2,7 +2,6 @@ # ------------------------------------------------------------- # PHASE 1 # - ivt-manage-base-api (pytest) -# - fvt-manage-setup (pytest) # ------------------------------------------------------------- # Manage Integration @@ -17,15 +16,3 @@ value: base-api-ivt runAfter: - ivtcore-manage - -# Manage FVT Setup -# - Required by all tests after phase 1 in fvt-manage pipeline -# - Required by fvt-manage-is, fvt-mobile, fvt-optimizer and fvt-predict pipelines -- name: fvt-manage-base-api-setup - {{ lookup('template', 'taskdefs/fvt-manage/api/taskref.yml.j2') | indent(2) }} - params: - {{ lookup('template', 'taskdefs/fvt-manage/api/params.yml.j2') | indent(4) }} - - name: fvt_test_suite - value: base-api-setup - runAfter: - - fvt-manage-base-api-ivt diff --git a/tekton/src/pipelines/taskdefs/fvt-manage/phase2.yml.j2 b/tekton/src/pipelines/taskdefs/fvt-manage/phase2.yml.j2 index cd19e7dc2c..26a860f227 100644 --- a/tekton/src/pipelines/taskdefs/fvt-manage/phase2.yml.j2 +++ b/tekton/src/pipelines/taskdefs/fvt-manage/phase2.yml.j2 @@ -12,7 +12,7 @@ - name: fvt_test_suite value: base-api-system runAfter: - - fvt-manage-base-api-setup + - fvt-manage-base-api-ivt # Manage FVT MIF - name: fvt-manage-base-api-mif @@ -22,4 +22,4 @@ - name: fvt_test_suite value: base-api-mif runAfter: - - fvt-manage-base-api-setup + - fvt-manage-base-api-ivt diff --git a/tekton/src/tasks/fvt/fvt-manage-pytest.yml.j2 b/tekton/src/tasks/fvt/fvt-manage-pytest.yml.j2 index 2a3383f422..820d35b91d 100644 --- a/tekton/src/tasks/fvt/fvt-manage-pytest.yml.j2 +++ b/tekton/src/tasks/fvt/fvt-manage-pytest.yml.j2 @@ -55,16 +55,6 @@ spec: - name: mas_instance_id type: string description: Instance ID of the target test environment - - name: mas_workspace_id - type: string - description: Workspace ID in MAS to use for running the tests - - # Test-specific Information (all optional) - # ------------------------------------------------------------------------- - - name: artifactory_token - type: string - description: Artifactory API Key (required by fvt-ibm-mas-manage to pull test container content) - default: "" stepTemplate: name: 'fvt-manage-pytest' @@ -95,7 +85,11 @@ spec: - name: INSTANCE_ID value: "$(params.mas_instance_id)" - name: WORKSPACE_ID - value: "$(params.mas_workspace_id)" + valueFrom: + secretKeyRef: + name: mas-fvt-manage + key: MAS_WORKSPACE_ID + optional: false - name: FVT_TEST_SUITE_PREFIX value: $(params.fvt_test_suite_prefix) @@ -108,8 +102,11 @@ spec: value: "$(params.fvt_enable_debug)" - name: ARTIFACTORY_TOKEN - value: $(params.artifactory_token) - + valueFrom: + secretKeyRef: + name: mas-fvt + key: FVT_ARTIFACTORY_TOKEN + optional: false - name: ARTIFACTORY_UPLOAD_DIR valueFrom: secretKeyRef: From ad568765b9d4c8a89767580683e1bf56cf9f2d21 Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Thu, 13 Jun 2024 22:37:10 -0300 Subject: [PATCH 10/22] [patch] Add escape route to waitfor-installation task --- tekton/src/pipelines/fvt-launcher.yml.j2 | 49 ++++++++++++++---------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/tekton/src/pipelines/fvt-launcher.yml.j2 b/tekton/src/pipelines/fvt-launcher.yml.j2 index a85dc813df..c328b6049e 100644 --- a/tekton/src/pipelines/fvt-launcher.yml.j2 +++ b/tekton/src/pipelines/fvt-launcher.yml.j2 @@ -788,6 +788,27 @@ spec: runAfter: - launchfvt-visualinspection + # 11. IVT + # ------------------------------------------------------------------------- + - name: launchivt + taskRef: + kind: Task + name: mas-launchivt + params: + - name: image_pull_policy + value: $(params.image_pull_policy) + - name: pipelinerun_name + value: "$(params.mas_instance_id)-ivt" + when: + - input: $(params.launchivt) + operator: in + values: ["true", "True"] + # Currently there is only one task testing Manage and Monitor, no point to + # run IVT after all approvals are obtained. + runAfter: + - approval-manage + - approval-monitor + # Last Sync Point # ------------------------------------------------------------------------- # Guarantee installation pipeline ran till the end; @@ -796,8 +817,8 @@ spec: # Note: this task will start once all the FVTs are approved and will start at the # same time install's post-verify starts. It means its timeout must be higher than # post-verify + sync-install, which will set the flag needed to finalize this fvt-launcher - # - Escape Route: none - # - Ignore Failures: false + # - Escape Route: INSTALL_STATUS != "" (i.e. FAILED) + # - Ignore Failures: False # ------------------------------------------------------------------------- - name: waitfor-installation taskRef: @@ -814,6 +835,11 @@ spec: value: INSTALL_STATUS - name: configmap_target_value value: Completed + # Escape route + - name: escape_configmap_name + value: sync-install + - name: escape_configmap_key + value: INSTALL_STATUS # 25 retries at 5 minute intervals = 2 hours - name: delay value: "300" @@ -833,25 +859,6 @@ spec: - approval-visualinspection - launchivt - # 11. IVT - # ------------------------------------------------------------------------- - - name: launchivt - taskRef: - kind: Task - name: mas-launchivt - params: - - name: image_pull_policy - value: $(params.image_pull_policy) - - name: pipelinerun_name - value: "$(params.mas_instance_id)-ivt" - when: - - input: $(params.launchivt) - operator: in - values: ["true", "True"] - runAfter: - - approval-manage - - approval-monitor - finally: # Collect must-gather # ------------------------------------------------------------------------- From a3e3243f4661e03fb03169fa008b08b93626dfb3 Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Thu, 13 Jun 2024 23:00:51 -0300 Subject: [PATCH 11/22] [patch] Remove addressed TODO comments --- tekton/src/pipelines/fvt-launcher.yml.j2 | 3 --- 1 file changed, 3 deletions(-) diff --git a/tekton/src/pipelines/fvt-launcher.yml.j2 b/tekton/src/pipelines/fvt-launcher.yml.j2 index c328b6049e..cdd32b9fb8 100644 --- a/tekton/src/pipelines/fvt-launcher.yml.j2 +++ b/tekton/src/pipelines/fvt-launcher.yml.j2 @@ -9,9 +9,6 @@ # 7. app-cfg-predict ............ Triggered after Predict is installed and configured # 8. app-cft-visualinspection ... Triggered after Visual Inspection is installed and configured -# TODO: Manage component sub-pipelines need to be integrated (fvt-manage-civil, fvt-manage-is) -# TODO: Mobile sub-pipelines need to be integrated (fvt-mobile) .. should this be fvt-manage-mobile, is it testing anything mobile that is outside scope of Manage application? - apiVersion: tekton.dev/v1beta1 kind: Pipeline metadata: From 1ea05e08adaf0828801dd765b2b9bb21f761057e Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Fri, 14 Jun 2024 01:56:26 -0300 Subject: [PATCH 12/22] [minor] Modified wait-for-config to receive more than one cm target --- image/cli/app-root/src/wait-for-configmap.sh | 24 +++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/image/cli/app-root/src/wait-for-configmap.sh b/image/cli/app-root/src/wait-for-configmap.sh index 4aa20b05f6..f3959855c0 100644 --- a/image/cli/app-root/src/wait-for-configmap.sh +++ b/image/cli/app-root/src/wait-for-configmap.sh @@ -68,6 +68,24 @@ do esac done +# KEY_VALUE=$(oc -n ${NAMESPACE} get configmap/${CONFIGMAP_NAME} -o jsonpath="{.data.${CONFIGMAP_KEY}}" 2> /dev/null) +# echo "KEY_VALUE = $KEY_VALUE" +# echo "CONFIGMAP_TARGET_VALUE = $CONFIGMAP_TARGET_VALUE" +# if [[ "${CONFIGMAP_TARGET_VALUE}" == *"$KEY_VALUE"* ]]; then +# echo "KEY_VALUE is in CONFIGMAP_TARGET_VALUE" +# else +# echo "KEY_VALUE is NOT in CONFIGMAP_TARGET_VALUE" +# fi + +# if [[ "${CONFIGMAP_TARGET_VALUE}" != *"$KEY_VALUE"* ]]; then +# echo "KEY_VALUE is NOT CONFIGMAP_TARGET_VALUE" +# else +# echo "KEY_VALUE is in CONFIGMAP_TARGET_VALUE" +# fi + +# exit 0 + + if [[ -z "$CONFIGMAP_NAME" || -z "$CONFIGMAP_KEY" || -z "$NAMESPACE" ]]; then echo "NAMESPACE, CONFIGMAP_NAME, and CONFIGMAP_KEY must all be defined, there is nothing to wait for." exit 0 @@ -128,12 +146,12 @@ elif [[ "$KEY_VALUE" == "" && -z "${CONFIGMAP_TARGET_VALUE}" ]]; then else echo "Waiting for configmap/${CONFIGMAP_NAME} in ${NAMESPACE} to contain key '${CONFIGMAP_KEY}' with value '${CONFIGMAP_TARGET_VALUE}' ..." KEY_VALUE=$(oc -n ${NAMESPACE} get configmap/${CONFIGMAP_NAME} -o jsonpath="{.data.${CONFIGMAP_KEY}}" 2> /dev/null) - while [[ "$KEY_VALUE" != "${CONFIGMAP_TARGET_VALUE}" && "$RETRIES_USED" -le "$MAX_RETRIES" ]]; do + while [[ "${CONFIGMAP_TARGET_VALUE}" != *"$KEY_VALUE"* && "$RETRIES_USED" -le "$MAX_RETRIES" ]]; do echo "[$RETRIES_USED/$MAX_RETRIES] ${CONFIGMAP_KEY}=${KEY_VALUE} does not equal '${CONFIGMAP_TARGET_VALUE}' yet in configmap/${CONFIGMAP_NAME}. Waiting ${DELAY} seconds before checking again" sleep $DELAY KEY_VALUE=$(oc -n ${NAMESPACE} get configmap/${CONFIGMAP_NAME} -o jsonpath="{.data.${CONFIGMAP_KEY}}" 2> /dev/null) - if [[ "${KEY_VALUE}" != "${CONFIGMAP_TARGET_VALUE}" && -n "${ESCAPE_CONFIGMAP_NAME}" ]]; then + if [[ "${CONFIGMAP_TARGET_VALUE}" != *"${KEY_VALUE}"* && -n "${ESCAPE_CONFIGMAP_NAME}" ]]; then # Check if the entire install pipeline has stopped so we can exit early ESCAPE_VALUE=$(oc -n ${NAMESPACE} get configmap/${ESCAPE_CONFIGMAP_NAME} -o jsonpath="{.data.${ESCAPE_CONFIGMAP_KEY}}" 2> /dev/null) if [[ "$ESCAPE_VALUE" != "" ]]; then @@ -148,7 +166,7 @@ else done echo - if [[ "$KEY_VALUE" == "${CONFIGMAP_TARGET_VALUE}" ]]; then + if [[ "${CONFIGMAP_TARGET_VALUE}" == *"$KEY_VALUE"* ]]; then echo "Located key ${CONFIGMAP_KEY} in configmap/${CONFIGMAP_NAME} with value '${CONFIGMAP_TARGET_VALUE}'" exit 0 else From 62a6cf3da6b04a9e044d96cdb277bdbc752f6d50 Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Fri, 14 Jun 2024 01:57:25 -0300 Subject: [PATCH 13/22] [patch] Add Succeeded as possible target in post-install --- tekton/src/pipelines/fvt-launcher.yml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tekton/src/pipelines/fvt-launcher.yml.j2 b/tekton/src/pipelines/fvt-launcher.yml.j2 index cdd32b9fb8..90a45296ee 100644 --- a/tekton/src/pipelines/fvt-launcher.yml.j2 +++ b/tekton/src/pipelines/fvt-launcher.yml.j2 @@ -831,7 +831,7 @@ spec: - name: configmap_key value: INSTALL_STATUS - name: configmap_target_value - value: Completed + value: Completed,Succeeded # Escape route - name: escape_configmap_name value: sync-install From 08318272f56b0d6b36167d46f183988936d9d33a Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Fri, 14 Jun 2024 03:06:27 -0300 Subject: [PATCH 14/22] [patch] Update parameter description --- tekton/src/pipelines/fvt-launcher.yml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tekton/src/pipelines/fvt-launcher.yml.j2 b/tekton/src/pipelines/fvt-launcher.yml.j2 index 90a45296ee..53757ea07d 100644 --- a/tekton/src/pipelines/fvt-launcher.yml.j2 +++ b/tekton/src/pipelines/fvt-launcher.yml.j2 @@ -71,7 +71,7 @@ spec: - name: launchivt type: string default: "true" - description: "Set this to any value other than 'true' to disable launch of the IVT pipeline after applications FVT completes" + description: "Set this to any value other than 'true' to disable launch of the IVT pipeline at the end of applications FVT" # Required by Manage Setup (Data Loader) - name: mas_app_channel_manage From 1976e2d1cdec5552edd9af7fe66cdffe405f444b Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Fri, 14 Jun 2024 04:44:13 -0300 Subject: [PATCH 15/22] [patch] Added leo-miran --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 42fd5aa33d..e961f5326f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @durera @andrercm @sanjayprab @terenceq @whitfiea @alequint +* @durera @andrercm @sanjayprab @terenceq @whitfiea @alequint @leo-miran From f8151f35b3f1f180a46c35104510f4f79bdf2019 Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Fri, 14 Jun 2024 05:23:14 -0300 Subject: [PATCH 16/22] [patch] Fix --- tekton/src/tasks/fvt/fvt-manage-pytest.yml.j2 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tekton/src/tasks/fvt/fvt-manage-pytest.yml.j2 b/tekton/src/tasks/fvt/fvt-manage-pytest.yml.j2 index 820d35b91d..6d89c9bd61 100644 --- a/tekton/src/tasks/fvt/fvt-manage-pytest.yml.j2 +++ b/tekton/src/tasks/fvt/fvt-manage-pytest.yml.j2 @@ -85,11 +85,11 @@ spec: - name: INSTANCE_ID value: "$(params.mas_instance_id)" - name: WORKSPACE_ID - valueFrom: - secretKeyRef: - name: mas-fvt-manage - key: MAS_WORKSPACE_ID - optional: false + valueFrom: + secretKeyRef: + name: mas-fvt-manage + key: MAS_WORKSPACE_ID + optional: false - name: FVT_TEST_SUITE_PREFIX value: $(params.fvt_test_suite_prefix) From fd2ed867a3cda9d0bc67e656aa41dae45894db9d Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Fri, 14 Jun 2024 10:18:55 -0300 Subject: [PATCH 17/22] [patch] Fix criteria to run waitfor-manage --- tekton/src/pipelines/fvt-launcher.yml.j2 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tekton/src/pipelines/fvt-launcher.yml.j2 b/tekton/src/pipelines/fvt-launcher.yml.j2 index 53757ea07d..0eead3a893 100644 --- a/tekton/src/pipelines/fvt-launcher.yml.j2 +++ b/tekton/src/pipelines/fvt-launcher.yml.j2 @@ -361,12 +361,16 @@ spec: - name: ignore_failure value: "False" when: - - input: $(params.launchfvt_manage)$(params.launchfvt_mobile) - operator: in - values: ["true", "True", "truetrue", "TrueTrue", "falsetrue", "FalseTrue", "truefalse", "TrueFalse"] + - input: "$(params.mas_app_channel_manage)" + operator: notin + values: [""] - input: $(params.sync_with_install) operator: in values: ["true", "True"] + # If any of these launchers are meant to run we need to wait for manage before triggering setup + - input: $(params.launchfvt_manage)$(params.launchfvt_mobile)$(params.launchfvt_manage_is)$(params.launchfvt_optimizer)$(params.launchfvt_predict)$(params.launchivt) + operator: notin + values: ["falsefalsefalsefalsefalsefalse"] # case senstive to simplify (here is how launchfvt flags are in fvt template repos) runAfter: - approval-suite-verify From 714afea618e54a53e1f826c29a124ceb08459e7e Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Fri, 14 Jun 2024 10:38:13 -0300 Subject: [PATCH 18/22] [patch] Fix tekton build filters --- build/bin/build-tekton.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/bin/build-tekton.sh b/build/bin/build-tekton.sh index 76c32a7954..3ebb138fe7 100755 --- a/build/bin/build-tekton.sh +++ b/build/bin/build-tekton.sh @@ -59,7 +59,7 @@ for FILE in $TASK_FILES; do FILE_NAME=$(basename $FILE) addToFile $FILE $TARGET_FILE_FVT - if [[ ! "$FILE_NAME" == fvt-* ]] + if [[ ! "$FILE_NAME" == fvt-* ]] && [[ ! "$FILE_NAME" == ivt-* ]] && [[ ! "$FILE_NAME" == launchfvt-* ]] then addToFile $FILE $TARGET_FILE fi @@ -69,7 +69,7 @@ for FILE in $PIPELINE_FILES; do FILE_NAME=$(basename $FILE) addToFile $FILE $TARGET_FILE_FVT - if [[ ! "$FILE_NAME" == fvt-* ]] && [[ ! "$FILE_NAME" == *-after-install.yaml ]] && [[ ! "$FILE_NAME" == *-with-fvt.yaml ]] + if [[ ! "$FILE_NAME" == fvt-* ]] && [[ ! "$FILE_NAME" == ivt-* ]] && [[ ! "$FILE_NAME" == *-after-install.yaml ]] && [[ ! "$FILE_NAME" == *-with-fvt.yaml ]] then addToFile $FILE $TARGET_FILE fi From 6cc22cc4103af7d4abd2c6cbaec296a31d4abecd Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Fri, 14 Jun 2024 12:00:26 -0300 Subject: [PATCH 19/22] [patch] Debug --- image/cli/app-root/src/wait-for-configmap.sh | 31 +++++++++----------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/image/cli/app-root/src/wait-for-configmap.sh b/image/cli/app-root/src/wait-for-configmap.sh index f3959855c0..92deae127c 100644 --- a/image/cli/app-root/src/wait-for-configmap.sh +++ b/image/cli/app-root/src/wait-for-configmap.sh @@ -68,23 +68,20 @@ do esac done -# KEY_VALUE=$(oc -n ${NAMESPACE} get configmap/${CONFIGMAP_NAME} -o jsonpath="{.data.${CONFIGMAP_KEY}}" 2> /dev/null) -# echo "KEY_VALUE = $KEY_VALUE" -# echo "CONFIGMAP_TARGET_VALUE = $CONFIGMAP_TARGET_VALUE" -# if [[ "${CONFIGMAP_TARGET_VALUE}" == *"$KEY_VALUE"* ]]; then -# echo "KEY_VALUE is in CONFIGMAP_TARGET_VALUE" -# else -# echo "KEY_VALUE is NOT in CONFIGMAP_TARGET_VALUE" -# fi - -# if [[ "${CONFIGMAP_TARGET_VALUE}" != *"$KEY_VALUE"* ]]; then -# echo "KEY_VALUE is NOT CONFIGMAP_TARGET_VALUE" -# else -# echo "KEY_VALUE is in CONFIGMAP_TARGET_VALUE" -# fi - -# exit 0 - +echo "" +echo "Namespace .................. $NAMESPACE" +echo "Config Map ................. $CONFIGMAP_NAME" +echo "Config Map Key ............. $CONFIGMAP_KEY" +echo "Config Map Initial Value.... $CONFIGMAP_INITIAL_VALUE" +echo "Config Map Target Value..... $CONFIGMAP_TARGET_VALUE" +echo "" +echo "Escape Config Map .......... $ESCAPE_CONFIGMAP_NAME" +echo "Escape Config Map Key ...... $ESCAPE_CONFIGMAP_KEY" +echo "" +echo "Max Retries ................ $MAX_RETRIES" +echo "Delay ...................... $DELAY" +echo "Ignore Failure ............. $IGNORE_FAILURE" +echo "" if [[ -z "$CONFIGMAP_NAME" || -z "$CONFIGMAP_KEY" || -z "$NAMESPACE" ]]; then echo "NAMESPACE, CONFIGMAP_NAME, and CONFIGMAP_KEY must all be defined, there is nothing to wait for." From 3948a6ea604e3b7c340efab4c0939e6830514481 Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Fri, 14 Jun 2024 12:47:59 -0300 Subject: [PATCH 20/22] [patch] Text --- image/cli/app-root/src/wait-for-configmap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/image/cli/app-root/src/wait-for-configmap.sh b/image/cli/app-root/src/wait-for-configmap.sh index 92deae127c..285cb6ca98 100644 --- a/image/cli/app-root/src/wait-for-configmap.sh +++ b/image/cli/app-root/src/wait-for-configmap.sh @@ -69,15 +69,15 @@ do done echo "" +echo "Inputs" +echo "------------------------------------------------------------------" echo "Namespace .................. $NAMESPACE" echo "Config Map ................. $CONFIGMAP_NAME" echo "Config Map Key ............. $CONFIGMAP_KEY" echo "Config Map Initial Value.... $CONFIGMAP_INITIAL_VALUE" echo "Config Map Target Value..... $CONFIGMAP_TARGET_VALUE" -echo "" echo "Escape Config Map .......... $ESCAPE_CONFIGMAP_NAME" echo "Escape Config Map Key ...... $ESCAPE_CONFIGMAP_KEY" -echo "" echo "Max Retries ................ $MAX_RETRIES" echo "Delay ...................... $DELAY" echo "Ignore Failure ............. $IGNORE_FAILURE" From 4cc6b1c329e865797e0bde03fa8c7d9b7f8788b0 Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Fri, 14 Jun 2024 14:29:30 -0300 Subject: [PATCH 21/22] [patch] Fix secret name in manage-is task --- tekton/src/tasks/fvt-launcher/launchfvt-manage-is.yml.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tekton/src/tasks/fvt-launcher/launchfvt-manage-is.yml.j2 b/tekton/src/tasks/fvt-launcher/launchfvt-manage-is.yml.j2 index cdca1f66f6..012ab94836 100644 --- a/tekton/src/tasks/fvt-launcher/launchfvt-manage-is.yml.j2 +++ b/tekton/src/tasks/fvt-launcher/launchfvt-manage-is.yml.j2 @@ -95,19 +95,19 @@ spec: - name: FVT_DIGEST_HEALTH_PREPAREDATA valueFrom: secretKeyRef: - name: mas-fvt-manage-is + name: mas-fvt-manage key: FVT_DIGEST_HEALTH_PREPAREDATA optional: false - name: FVT_DIGEST_HEALTH_TESTNG valueFrom: secretKeyRef: - name: mas-fvt-manage-is + name: mas-fvt-manage key: FVT_DIGEST_HEALTH_TESTNG optional: false - name: FVT_DIGEST_HEALTH_PYTHON valueFrom: secretKeyRef: - name: mas-fvt-manage-is + name: mas-fvt-manage key: FVT_DIGEST_HEALTH_PYTHON optional: false # Black and white listing From f04377bd064c1268c0887164f58ce919fa2d0383 Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Fri, 14 Jun 2024 17:35:47 -0300 Subject: [PATCH 22/22] [patch] Fix criteria of approve-manage task --- tekton/src/pipelines/fvt-launcher.yml.j2 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tekton/src/pipelines/fvt-launcher.yml.j2 b/tekton/src/pipelines/fvt-launcher.yml.j2 index 0eead3a893..bd16980f34 100644 --- a/tekton/src/pipelines/fvt-launcher.yml.j2 +++ b/tekton/src/pipelines/fvt-launcher.yml.j2 @@ -367,10 +367,10 @@ spec: - input: $(params.sync_with_install) operator: in values: ["true", "True"] - # If any of these launchers are meant to run we need to wait for manage before triggering setup + # All these launchers require manage in place to then run setup, therefore the criteria - input: $(params.launchfvt_manage)$(params.launchfvt_mobile)$(params.launchfvt_manage_is)$(params.launchfvt_optimizer)$(params.launchfvt_predict)$(params.launchivt) operator: notin - values: ["falsefalsefalsefalsefalsefalse"] # case senstive to simplify (here is how launchfvt flags are in fvt template repos) + values: ["falsefalsefalsefalsefalsefalse"] # case sensitive to simplify (here is how launchfvt flags are in fvt template repos) runAfter: - approval-suite-verify @@ -431,9 +431,10 @@ spec: - name: configmap_value value: approved when: - - input: $(params.launchfvt_manage)$(params.launchfvt_mobile) - operator: in - values: ["true", "True", "truetrue", "TrueTrue", "falsetrue", "FalseTrue", "truefalse", "TrueFalse"] + # Same criteria used in waitfor-manage task + - input: $(params.launchfvt_manage)$(params.launchfvt_mobile)$(params.launchfvt_manage_is)$(params.launchfvt_optimizer)$(params.launchfvt_predict)$(params.launchivt) + operator: notin + values: ["falsefalsefalsefalsefalsefalse"] # case sensitive to simplify (here is how launchfvt flags are in fvt template repos) - input: $(params.sync_with_install) operator: in values: ["true", "True"]