From 023c0788cdc5e33ddc68f0c60bc324cc6c109d69 Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Wed, 22 Feb 2023 23:49:35 -0300 Subject: [PATCH 1/4] [minor] new mas-fvt-manage task --- tekton/generate-tekton-tasks.yml | 1 + .../pipelines/taskdefs/fvt-apps/manage.yml.j2 | 147 +++------------ tekton/src/tasks/fvt/fvt-manage.yml.j2 | 169 ++++++++++++++++++ 3 files changed, 190 insertions(+), 127 deletions(-) create mode 100644 tekton/src/tasks/fvt/fvt-manage.yml.j2 diff --git a/tekton/generate-tekton-tasks.yml b/tekton/generate-tekton-tasks.yml index a531bb65eb..cf70c3130b 100644 --- a/tekton/generate-tekton-tasks.yml +++ b/tekton/generate-tekton-tasks.yml @@ -49,6 +49,7 @@ - fvt-assist - fvt-core - fvt-core-ui + - fvt-manage - fvt-run-suite # 4. Generate Tasks (Suite) diff --git a/tekton/src/pipelines/taskdefs/fvt-apps/manage.yml.j2 b/tekton/src/pipelines/taskdefs/fvt-apps/manage.yml.j2 index baaeef2850..c57b41deb3 100644 --- a/tekton/src/pipelines/taskdefs/fvt-apps/manage.yml.j2 +++ b/tekton/src/pipelines/taskdefs/fvt-apps/manage.yml.j2 @@ -38,7 +38,7 @@ value: $(params.test_phase) taskRef: kind: Task - name: mas-fvt-run-suite + name: mas-fvt-manage # Only if we've set a version of the Manage FVT to run when: - input: "$(params.fvt_version_manage)" @@ -86,7 +86,7 @@ value: $(params.fvt_artifactory_apikey) taskRef: kind: Task - name: mas-fvt-run-suite + name: mas-fvt-manage # Only if we've set a version of the Manage ACM FVT to run when: - input: "$(params.fvt_version_manage_acm)" @@ -141,7 +141,7 @@ value: $(params.test_phase) taskRef: kind: Task - name: mas-fvt-run-suite + name: mas-fvt-manage # Only if we've set a version of the Manage ACM FVT to run when: - input: "$(params.fvt_version_manage_acm)" @@ -196,7 +196,7 @@ value: $(params.test_phase) taskRef: kind: Task - name: mas-fvt-run-suite + name: mas-fvt-manage # Only if we've set a version of the Manage Aviation FVT to run when: - input: "$(params.fvt_version_manage_aviation)" @@ -251,7 +251,7 @@ value: $(params.test_phase) taskRef: kind: Task - name: mas-fvt-run-suite + name: mas-fvt-manage # Only if we've set a version of the Manage HSE FVT to run when: - input: "$(params.fvt_version_manage_hse)" @@ -306,7 +306,7 @@ value: $(params.test_phase) taskRef: kind: Task - name: mas-fvt-run-suite + name: mas-fvt-manage # Only if we've set a version of the Manage Nuclear FVT to run when: - input: "$(params.fvt_version_manage_nuclear)" @@ -354,7 +354,7 @@ value: $(params.fvt_artifactory_apikey) taskRef: kind: Task - name: mas-fvt-run-suite + name: mas-fvt-manage # Only if we've set a version of the Manage Service Provider FVT to run when: - input: "$(params.fvt_version_manage_serviceprovider)" @@ -409,7 +409,7 @@ value: $(params.test_phase) taskRef: kind: Task - name: mas-fvt-run-suite + name: mas-fvt-manage # Only if we've set a version of the Manage Service Provider FVT to run when: - input: "$(params.fvt_version_manage_serviceprovider)" @@ -464,7 +464,7 @@ value: $(params.test_phase) taskRef: kind: Task - name: mas-fvt-run-suite + name: mas-fvt-manage # Only if we've set a version of the Manage Spatial FVT to run when: - input: "$(params.fvt_version_manage_spatial)" @@ -512,7 +512,7 @@ value: $(params.fvt_artifactory_apikey) taskRef: kind: Task - name: mas-fvt-run-suite + name: mas-fvt-manage # Only if we've set a version of the Manage Transportation FVT to run when: - input: "$(params.fvt_version_manage_transportation)" @@ -567,7 +567,7 @@ value: $(params.test_phase) taskRef: kind: Task - name: mas-fvt-run-suite + name: mas-fvt-manage # Only if we've set a version of the Manage Transportation FVT to run when: - input: "$(params.fvt_version_manage_transportation)" @@ -617,7 +617,7 @@ value: $(params.fvt_artifactory_apikey) taskRef: kind: Task - name: mas-fvt-run-suite + name: mas-fvt-manage # Only if we've set a version of Civil FVT to run when: - input: "$(params.fvt_version_manage_civil_selenium)" @@ -672,7 +672,7 @@ value: $(params.test_phase) taskRef: kind: Task - name: mas-fvt-run-suite + name: mas-fvt-manage # Only if we've set a version of Civil FVT to run when: - input: "$(params.fvt_version_manage_civil_cypress)" @@ -727,7 +727,7 @@ value: $(params.test_phase) taskRef: kind: Task - name: mas-fvt-run-suite + name: mas-fvt-manage # Only if we've set a version of the IC FVT to run when: - input: "$(params.fvt_version_manage_ic)" @@ -775,7 +775,7 @@ value: $(params.fvt_artifactory_apikey) taskRef: kind: Task - name: mas-fvt-run-suite + name: mas-fvt-manage # Only if we've set a version of the Mobile IC FVT to run when: - input: "$(params.fvt_version_mobileic)" @@ -823,7 +823,7 @@ value: $(params.fvt_artifactory_apikey) taskRef: kind: Task - name: mas-fvt-run-suite + name: mas-fvt-manage # Only if we've set a version of the Manage scheduler FVT to run when: - input: "$(params.fvt_version_manage_scheduler)" @@ -871,7 +871,7 @@ value: $(params.fvt_artifactory_apikey) taskRef: kind: Task - name: mas-fvt-run-suite + name: mas-fvt-manage # Only if we've set a version of the Manage scheduler FVT to run when: - input: "$(params.fvt_version_manage_scheduler)" @@ -919,7 +919,7 @@ value: $(params.fvt_artifactory_apikey) taskRef: kind: Task - name: mas-fvt-run-suite + name: mas-fvt-manage # Only if we've set a version of the Manage Transportation FVT to run when: - input: "$(params.fvt_version_manage_mobile_setup)" @@ -967,7 +967,7 @@ value: $(params.fvt_artifactory_apikey) taskRef: kind: Task - name: mas-fvt-run-suite + name: mas-fvt-manage # Only if we've set a version of the Manage Maintenance Manager FVT to run when: - input: "$(params.fvt_version_manage_maintmanager)" @@ -1015,7 +1015,7 @@ value: $(params.fvt_artifactory_apikey) taskRef: kind: Task - name: mas-fvt-run-suite + name: mas-fvt-manage # Only if we've set a version of the Manage Health FVT to run when: - input: "$(params.fvt_version_manage_health)" @@ -1029,110 +1029,3 @@ workspaces: - name: configs workspace: shared-configs - - -# This task is failing, which blows up the entire pipeline -# See: https://ibm-watson-iot.slack.com/archives/C02BEENFM1P/p1663346212349879 -# # FVT6.8.1 Manage FVT - Health (HP-createHPusers) -# - name: fvt-health-createusers -# params: -# - name: mas_instance_id -# value: $(params.mas_instance_id) -# - name: mas_workspace_id -# value: $(params.mas_workspace_id) -# -# - name: devops_mongo_uri -# value: $(params.devops_mongo_uri) -# - name: devops_build_number -# value: $(params.devops_build_number) -# - name: devops_cos_crn -# value: $(params.devops_cos_crn) -# - name: ibmcloud_apikey -# value: $(params.ibmcloud_apikey) -# - name: fvt_image_registry -# -# value: $(params.fvt_image_registry) -# - name: fvt_image_namespace -# value: fvt-manage -# - name: fvt_image_name -# value: fvt-ibm-mas-manage -# - name: fvt_image_version -# value: $(params.fvt_version_health) -# - name: fvt_test_suite -# value: HP-createHPusers # Keyword for Health create users -# - name: product_channel -# value: $(params.mas_app_channel_manage) -# - name: product_id -# value: ibm-mas-manage -# - name: artifactory_apikey -# value: $(params.fvt_artifactory_apikey) -# - name: test_type -# value: $(params.test_type) -# - name: test_phase -# value: $(params.test_phase) -# taskRef: -# kind: Task -# name: mas-fvt-run-suite -# # Only if we've set a version of the Health FVT to run -# when: -# - input: "$(params.fvt_version_health)" -# operator: notin -# values: ["skip"] -# - input: "$(params.mas_app_channel_manage)" -# operator: notin -# values: [""] -# runAfter: -# - ivtcore-manage - -# This test would also fail since above test failed -# # FVT6.8.2 Manage FVT - Health (HP-BVT) -# - name: fvt-health-bvt -# params: -# - name: mas_instance_id -# value: $(params.mas_instance_id) -# - name: mas_workspace_id -# value: $(params.mas_workspace_id) -# -# - name: devops_mongo_uri -# value: $(params.devops_mongo_uri) -# - name: devops_build_number -# value: $(params.devops_build_number) -# - name: devops_cos_crn -# value: $(params.devops_cos_crn) -# - name: ibmcloud_apikey -# value: $(params.ibmcloud_apikey) -# -# - name: fvt_image_registry -# value: $(params.fvt_image_registry) -# - name: fvt_image_namespace -# value: fvt-manage -# - name: fvt_image_name -# value: fvt-ibm-mas-manage -# - name: fvt_image_version -# value: $(params.fvt_version_health) -# - name: fvt_test_suite -# value: HP-BVT # Keyword for Health BVT -# - name: product_channel -# value: $(params.mas_app_channel_manage) -# - name: product_id -# value: ibm-mas-manage -# - name: artifactory_apikey -# value: $(params.fvt_artifactory_apikey) -# -# - name: test_type -# value: $(params.test_type) -# - name: test_phase -# value: $(params.test_phase) -# taskRef: -# kind: Task -# name: mas-fvt-run-suite -# # Only if we've set a version of the Health FVT to run -# when: -# - input: "$(params.fvt_version_health)" -# operator: notin -# values: ["skip"] -# - input: "$(params.mas_app_channel_manage)" -# operator: notin -# values: [""] -# runAfter: -# - fvt-health-createusers diff --git a/tekton/src/tasks/fvt/fvt-manage.yml.j2 b/tekton/src/tasks/fvt/fvt-manage.yml.j2 new file mode 100644 index 0000000000..aeb5bd1743 --- /dev/null +++ b/tekton/src/tasks/fvt/fvt-manage.yml.j2 @@ -0,0 +1,169 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: Task +metadata: + name: mas-fvt-manage +spec: + params: + # Control the image pull policy for the FVT container image + - name: image_pull_policy + type: string + default: IfNotPresent + + # Test Container Information + # ------------------------------------------------------------------------- + - name: fvt_image_registry + type: string + description: FVT Container Image Registry (required) + - name: fvt_image_namespace + type: string + description: FVT Image namespace + default: mas-devops + - name: fvt_image_name + type: string + description: FVT Container Image + - name: fvt_image_version + type: string + description: FVT Container Image Version + default: latest + + # Test Framework Information + # ------------------------------------------------------------------------- + - name: fvt_enable_debug + type: string + description: Turn on debug logging (verbose mode) + default: "true" + - name: fvt_test_suite + type: string + description: If the FVT container image contains multiple suites, use this to control the suite that will be executed + default: "" + - name: devops_mongo_uri + type: string + description: Mongo URI for recording test results (optional) + default: "" + - name: devops_build_number + type: string + description: Build number to record test result (optional) + default: "" + - name: product_id + type: string + description: Product ID under test + default: ibm-mas + - name: product_channel + type: string + description: "Subscription channel for the product (todo: have the test code look this up instead)" + default: "" + - 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 + - name: devops_cos_crn + type: string + description: Object Storage Resource Instance Id in IBM Cloud (optional) + default: "" + - name: devops_cos_upload_folder + type: string + description: Directory inside container that will be uploaded to Object Storage (optional) + default: "" + - name: ibmcloud_apikey + description: IBM Cloud API Key to access Object Storage resource (optional) + default: "" + + # Test-specific Information (all optional) + # ------------------------------------------------------------------------- + - name: ddp_apikey + type: string + description: Partium username (required by fvt-adoptionusagereporter) + default: "" + - name: partium_username + type: string + description: Partium username (required by fvt-coreapi-workspacemgmt) + default: "" + - name: partium_password + type: string + description: Partium password (required by fvt-coreapi-workspacemgmt) + default: "" + - name: artifactory_apikey + type: string + description: Artifactory API Key (required by fvt-ibm-mas-manage and fvt-ibm-mas-safety to pull test container content) + default: "" + + # Optional parameters to categorize result to be persisted + # ------------------------------------------------------------------------- + - name: test_type + type: string + description: Optional. Used to different upgrade tests from other type of tests + default: "" + - name: test_phase + type: string + description: Optional. Used to categorize the phase of pipeline this test is running. Used by integrated pipelines like upgrade-test + default: "" + + stepTemplate: + name: 'fvt-run-$(params.fvt_image_name)' + env: + - name: PRODUCT_ID + value: $(params.product_id) + - name: PRODUCT_CHANNEL + value: $(params.product_channel) + + - name: DEVOPS_MONGO_URI + value: $(params.devops_mongo_uri) + - name: BUILD_NUM + value: $(params.devops_build_number) + + - name: IBMADMIN_ENABLED + value: "true" + + - name: NAMESPACE + value: "mas-$(params.mas_instance_id)-core" + - name: INSTANCE_ID + value: "$(params.mas_instance_id)" + - name: WORKSPACE_ID + value: "$(params.mas_workspace_id)" + + - name: FVT_TEST_SUITE + value: $(params.fvt_test_suite) + - name: FVT_ENABLE_DEBUG + value: "$(params.fvt_enable_debug)" + + - name: DDP_APIKEY + value: $(params.ddp_apikey) + - name: PARTIUM_USERNAME + value: $(params.partium_username) + - name: PARTIUM_PASSWORD + value: $(params.partium_password) + - name: ARTIFACTORY_APIKEY + value: $(params.artifactory_apikey) + + - name: DEVOPS_COS_CRN + value: $(params.devops_cos_crn) + - name: DEVOPS_COS_UPLOAD_FOLDER + value: $(params.devops_cos_upload_folder) + - name: IBMCLOUD_APIKEY + value: $(params.ibmcloud_apikey) + + # Optional parameters to categorize result to be persisted + - name: TEST_TYPE + value: $(params.test_type) + - name: TEST_PHASE + value: $(params.test_phase) + steps: + - image: '$(params.fvt_image_registry)/$(params.fvt_image_namespace)/$(params.fvt_image_name):$(params.fvt_image_version)' + imagePullPolicy: $(params.image_pull_policy) + timeout: 6h # Ensure bad FVTs don't run forever .. want this to be smaller, but urgh, teams have already created huge suites that run for hours instead of multiple smaller suites + onError: continue # Ensure bad FVTs don't break the pipeline + resources: {} + workingDir: /opt/ibm/test/src + volumeMounts: + - mountPath: /dev/shm + name: dshm + volumes: + - name: dshm + emptyDir: + medium: Memory + + workspaces: + - name: configs From 51bb5863cedcef3089092f83df6a37f30be0ce69 Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Thu, 23 Feb 2023 21:25:23 -0300 Subject: [PATCH 2/4] [minor] fvt-manage-regr pipeline and fvt-manage task --- tekton/generate-tekton-pipelines.yml | 1 + tekton/src/pipelines/fvt-manage-regr.yml.j2 | 197 ++++++++++++++++++ .../taskdefs/fvt-apps/manage-regr.yml.j2 | 58 ++++++ tekton/src/tasks/fvt/fvt-manage.yml.j2 | 18 +- 4 files changed, 265 insertions(+), 9 deletions(-) create mode 100644 tekton/src/pipelines/fvt-manage-regr.yml.j2 create mode 100644 tekton/src/pipelines/taskdefs/fvt-apps/manage-regr.yml.j2 diff --git a/tekton/generate-tekton-pipelines.yml b/tekton/generate-tekton-pipelines.yml index 2ef7025d94..6683799464 100644 --- a/tekton/generate-tekton-pipelines.yml +++ b/tekton/generate-tekton-pipelines.yml @@ -31,5 +31,6 @@ - uninstall - fvt-assist - fvt-core + - fvt-manage-regr - upgrade - update diff --git a/tekton/src/pipelines/fvt-manage-regr.yml.j2 b/tekton/src/pipelines/fvt-manage-regr.yml.j2 new file mode 100644 index 0000000000..b365f1c193 --- /dev/null +++ b/tekton/src/pipelines/fvt-manage-regr.yml.j2 @@ -0,0 +1,197 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: Pipeline +metadata: + name: mas-fvt-manage-regr +spec: + workspaces: + # The generated configuration files + - name: shared-configs + # Any pre-generated configs that will be copied into the shared-configs workspace during suite-install + - name: shared-additional-configs + # The SLS entitlement key file that will be installed during install-sls. + - name: shared-entitlement + # Shared storage to hold mustgather output for tasks + - name: shared-mustgather + + params: + # 1. Common Parameters + # ------------------------------------------------------------------------- + {{ lookup('template', params_src_dir ~ '/common.yml.j2') | indent(4) }} + + # 2. Installation + # ------------------------------------------------------------------------- + {{ lookup('template', params_src_dir ~ '/install.yml.j2') | indent(4) }} + + # 3. Additional Params for FVT + # ------------------------------------------------------------------------- + {{ lookup('template', params_src_dir ~ '/fvt.yml.j2') | indent(4) }} + + tasks: + # Content + # ------- + # 1. Setup Cluster-wide Dependencies & Configure Cluster Monitoring + # 2. Install Universal Dependencies + # 4. Other Dependecies + # 5. Install & Configure IBM MAS + # 9. Install & Configure Manage + + + # 1. Setup Cluster-wide Dependencies & Configure Cluster Monitoring + # ------------------------------------------------------------------------- + # 1.1 IBM Operator Catalog + {{ lookup('template', 'taskdefs/cluster-setup/ibm-catalogs.yml.j2') | indent(4) }} + + # 1.2 IBM Cloud Pak Foundational Services + {{ lookup('template', 'taskdefs/cluster-setup/common-services.yml.j2') | indent(4) }} + runAfter: + - ibm-catalogs + + # 1.3 IBM Certificate Manager + {{ lookup('template', 'taskdefs/cluster-setup/cert-manager.yml.j2') | indent(4) }} + runAfter: + - common-services + + # 1.4 Red Hat Service Binding Operator + {{ lookup('template', 'taskdefs/cluster-setup/sbo.yml.j2') | indent(4) }} + + # 1.5 Configure Cluster Monitoring + {{ lookup('template', 'taskdefs/cluster-setup/cluster-monitoring.yml.j2') | indent(4) }} + + + # 2. Install Universal Dependencies + # ------------------------------------------------------------------------- + # 2.1 MongoDb + {{ lookup('template', 'taskdefs/dependencies/mongo.yml.j2') | indent(4) }} + runAfter: + - cert-manager + + # 2.2 AMQStreams (Kafka) + {{ lookup('template', 'taskdefs/dependencies/kafka.yml.j2') | indent(4) }} + runAfter: + - cluster-monitoring + + # 2.3 Db2 + # 2.3.1 System Db2 + {{ lookup('template', 'taskdefs/dependencies/db2.yml.j2', template_vars={'suffix': 'system'}) | indent(4) }} + runAfter: + - cert-manager + + # 2.3.2 Dedicated Manage Db2 + {{ lookup('template', 'taskdefs/dependencies/db2.yml.j2', template_vars={'suffix': 'manage'}) | indent(4) }} + runAfter: + - db2-system + + # 2.4 IBM SLS + {{ lookup('template', 'taskdefs/dependencies/sls.yml.j2') | indent(4) }} + runAfter: + - mongodb + + # 2.5 UDS + {{ lookup('template', 'taskdefs/dependencies/uds.yml.j2') | indent(4) }} + runAfter: + - common-services + + + # 3. Other Dependecies + # ------------------------------------------------------------------------- + # 3.1 Install Cloud Object Storage (COS) + {{ lookup('template', 'taskdefs/dependencies/cos.yml.j2') | indent(4) }} + + # 3.2 Configure COS in MAS + {{ lookup('template', 'taskdefs/core/suite-config-cos.yml.j2') | indent(4) }} + runAfter: + - fvt-operatormaturity + - cos + + # 4. Install & Configure IBM MAS + # ------------------------------------------------------------------------- + # 4.1 Configure Workspace + {{ lookup('template', 'taskdefs/core/gencfg-workspace.yml.j2') | indent(4) }} + + # 4.2 DNS Setup + {{ lookup('template', 'taskdefs/core/suite-dns.yml.j2') | indent(4) }} + runAfter: + - cert-manager + + # 4.3 Suite Installation + {{ lookup('template', 'taskdefs/core/suite-install.yml.j2') | indent(4) }} + runAfter: + - sbo + - sls + - uds + - gencfg-workspace + - suite-dns + + # 4.4 Suite Configuration + {{ lookup('template', 'taskdefs/core/suite-config.yml.j2') | indent(4) }} + runAfter: + - suite-install + + # 4.5 Suite Verification + {{ lookup('template', 'taskdefs/core/suite-verify.yml.j2') | indent(4) }} + runAfter: + - suite-config + + # 4.6 Configure Db2 in MAS + {{ lookup('template', 'taskdefs/core/suite-config-db2.yml.j2') | indent(4) }} + runAfter: + - db2-system + - db2-manage + + # 4.7 Configure Kafka in MAS + {{ lookup('template', 'taskdefs/core/suite-config-kafka.yml.j2') | indent(4) }} + runAfter: + - kafka + + # 5. Install & Configure Manage + # ------------------------------------------------------------------------- + # 5.1. Prepare database for Maxinst + {{ lookup('template', 'taskdefs/apps/db2-setup-system.yml.j2') | indent(4) }} + runAfter: + - suite-config-db2 + {{ lookup('template', 'taskdefs/apps/db2-setup-manage.yml.j2') | indent(4) }} + runAfter: + - suite-config-db2 + + # 5.2 Manage Install + {{ lookup('template', 'taskdefs/apps/manage-app.yml.j2') | indent(4) }} + runAfter: + - suite-db2-setup-system + - suite-db2-setup-manage + + # 5.3 Configure Manage workspace + {{ lookup('template', 'taskdefs/apps/manage-workspace.yml.j2') | indent(4) }} + runAfter: + - app-install-manage + + + # 6. Manage FVT + # ------------------------------------------------------------------------- + {{ lookup('template', 'taskdefs/fvt-apps/manage.yml.j2') | indent(4) }} + + # 7. Manage Mobile FVT + # ------------------------------------------------------------------------- + {{ lookup('template', 'taskdefs/fvt-apps/mobile.yml.j2') | indent(4) }} + + # 8. Manage Regression + # ------------------------------------------------------------------------- + {{ lookup('template', 'taskdefs/fvt-apps/manage-regr.yml.j2') | indent(4) }} + + + # Mustgather executed in finally block. Use suite_mustgather_download + # playbook to retrieve the output on your local machine + # ------------------------------------------------------------------------- + finally: + - name: suite-mustgather + params: + - name: base_output_dir + value: "/workspace/mustgather/$(context.pipelineRun.name)" + - name: mas_instance_id + value: $(params.mas_instance_id) + taskRef: + kind: Task + name: mas-devops-suite-mustgather + workspaces: + - name: mustgather + workspace: shared-mustgather diff --git a/tekton/src/pipelines/taskdefs/fvt-apps/manage-regr.yml.j2 b/tekton/src/pipelines/taskdefs/fvt-apps/manage-regr.yml.j2 new file mode 100644 index 0000000000..57bafbd154 --- /dev/null +++ b/tekton/src/pipelines/taskdefs/fvt-apps/manage-regr.yml.j2 @@ -0,0 +1,58 @@ +# Manage Regression FVT +- name: fvt-manage-workorder # convention: use fvt-manage-, as the value of fvt_test_suite parameter + params: + - name: mas_instance_id + value: $(params.mas_instance_id) + - name: mas_workspace_id + value: $(params.mas_workspace_id) + + - name: devops_mongo_uri + value: $(params.devops_mongo_uri) + - name: devops_build_number + value: $(params.devops_build_number) + - name: devops_cos_crn + value: $(params.devops_cos_crn) + - name: ibmcloud_apikey + value: $(params.ibmcloud_apikey) + + - name: fvt_image_registry + value: $(params.fvt_image_registry) + - name: fvt_image_namespace + value: fvt-manage + - name: fvt_image_name + value: fvt-ibm-mas-manage + - name: fvt_image_version + value: $(params.fvt_version_manage) + - name: fvt_test_suite + value: workorder + - name: product_channel + value: $(params.mas_app_channel_manage) + - name: product_id + value: ibm-mas-manage + - name: artifactory_apikey + value: $(params.fvt_artifactory_apikey) + + - name: test_type + value: $(params.test_type) + - name: test_phase + value: $(params.test_phase) + taskRef: + kind: Task + name: mas-fvt-manage + # Only if we've set a version of the Manage FVT to run + when: + - input: "$(params.fvt_version_manage)" + operator: notin + values: ["skip"] + - input: "$(params.mas_app_channel_manage)" + operator: notin + values: [""] + runAfter: + - fvt-manage-setup # regression tasks depend on fvt-manage-setup or, eventually, any subsequent task in case of Manage Industry Solutions + workspaces: + - name: configs + workspace: shared-configs + +# Manage Regression FVT - IndSol 1 +# Manage Regression FVT - IndSol 2 +# Manage Regression FVT - IndSol 3 diff --git a/tekton/src/tasks/fvt/fvt-manage.yml.j2 b/tekton/src/tasks/fvt/fvt-manage.yml.j2 index aeb5bd1743..5b40d9d828 100644 --- a/tekton/src/tasks/fvt/fvt-manage.yml.j2 +++ b/tekton/src/tasks/fvt/fvt-manage.yml.j2 @@ -15,13 +15,6 @@ spec: - name: fvt_image_registry type: string description: FVT Container Image Registry (required) - - name: fvt_image_namespace - type: string - description: FVT Image namespace - default: mas-devops - - name: fvt_image_name - type: string - description: FVT Container Image - name: fvt_image_version type: string description: FVT Container Image Version @@ -37,6 +30,10 @@ spec: type: string description: If the FVT container image contains multiple suites, use this to control the suite that will be executed default: "" + - name: fvt_mas_appws_component + type: string + description: Manage product that will be tested by this task. Use official names as expected by Manage operators + default: "base" - name: devops_mongo_uri type: string description: Mongo URI for recording test results (optional) @@ -102,7 +99,7 @@ spec: default: "" stepTemplate: - name: 'fvt-run-$(params.fvt_image_name)' + name: 'fvt-manage' env: - name: PRODUCT_ID value: $(params.product_id) @@ -126,6 +123,9 @@ spec: - name: FVT_TEST_SUITE value: $(params.fvt_test_suite) + - name: FVT_MAS_APPWS_COMPONENT + value: $(params.fvt_mas_appws_component) + - name: FVT_ENABLE_DEBUG value: "$(params.fvt_enable_debug)" @@ -151,7 +151,7 @@ spec: - name: TEST_PHASE value: $(params.test_phase) steps: - - image: '$(params.fvt_image_registry)/$(params.fvt_image_namespace)/$(params.fvt_image_name):$(params.fvt_image_version)' + - image: '$(params.fvt_image_registry)/fvt-manage/fvt-ibm-mas-manage:$(params.fvt_image_version)' imagePullPolicy: $(params.image_pull_policy) timeout: 6h # Ensure bad FVTs don't run forever .. want this to be smaller, but urgh, teams have already created huge suites that run for hours instead of multiple smaller suites onError: continue # Ensure bad FVTs don't break the pipeline From b1e75870df05be5c0f2e9af065ad74674e8018ea Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Fri, 24 Feb 2023 00:44:33 -0300 Subject: [PATCH 3/4] [patch] Remove fvt-operatormaturity from manage regression --- tekton/src/pipelines/fvt-manage-regr.yml.j2 | 14 ++++++--- tekton/src/pipelines/install-with-fvt.yml.j2 | 4 +++ .../taskdefs/ivt-core/all-apps.yml.j2 | 31 +++---------------- .../pipelines/taskdefs/ivt-core/manage.yml.j2 | 19 ++++++++++++ 4 files changed, 38 insertions(+), 30 deletions(-) create mode 100644 tekton/src/pipelines/taskdefs/ivt-core/manage.yml.j2 diff --git a/tekton/src/pipelines/fvt-manage-regr.yml.j2 b/tekton/src/pipelines/fvt-manage-regr.yml.j2 index b365f1c193..35d671ad73 100644 --- a/tekton/src/pipelines/fvt-manage-regr.yml.j2 +++ b/tekton/src/pipelines/fvt-manage-regr.yml.j2 @@ -101,7 +101,7 @@ spec: # 3.2 Configure COS in MAS {{ lookup('template', 'taskdefs/core/suite-config-cos.yml.j2') | indent(4) }} runAfter: - - fvt-operatormaturity + - suite-verify - cos # 4. Install & Configure IBM MAS @@ -136,12 +136,14 @@ spec: # 4.6 Configure Db2 in MAS {{ lookup('template', 'taskdefs/core/suite-config-db2.yml.j2') | indent(4) }} runAfter: + - suite-verify - db2-system - db2-manage # 4.7 Configure Kafka in MAS {{ lookup('template', 'taskdefs/core/suite-config-kafka.yml.j2') | indent(4) }} runAfter: + - suite-verify - kafka # 5. Install & Configure Manage @@ -165,16 +167,20 @@ spec: runAfter: - app-install-manage + + # 6. Manage IVT + # ------------------------------------------------------------------------- + {{ lookup('template', 'taskdefs/ivt-core/manage.yml.j2') | indent(4) }} - # 6. Manage FVT + # 7. Manage FVT # ------------------------------------------------------------------------- {{ lookup('template', 'taskdefs/fvt-apps/manage.yml.j2') | indent(4) }} - # 7. Manage Mobile FVT + # 8. Manage Mobile FVT # ------------------------------------------------------------------------- {{ lookup('template', 'taskdefs/fvt-apps/mobile.yml.j2') | indent(4) }} - # 8. Manage Regression + # 9. Manage Regression # ------------------------------------------------------------------------- {{ lookup('template', 'taskdefs/fvt-apps/manage-regr.yml.j2') | indent(4) }} diff --git a/tekton/src/pipelines/install-with-fvt.yml.j2 b/tekton/src/pipelines/install-with-fvt.yml.j2 index f2e5217de4..8c6b53800a 100644 --- a/tekton/src/pipelines/install-with-fvt.yml.j2 +++ b/tekton/src/pipelines/install-with-fvt.yml.j2 @@ -368,7 +368,11 @@ spec: # 16. MAS Core IVT # ------------------------------------------------------------------------- + # 16.1 All Apps IVT (except Manage) {{ lookup('template', 'taskdefs/ivt-core/all-apps.yml.j2') | indent(4) }} + + # 16.2 Manage IVT + {{ lookup('template', 'taskdefs/ivt-core/manage.yml.j2') | indent(4) }} # 17. Application FVT - Assist diff --git a/tekton/src/pipelines/taskdefs/ivt-core/all-apps.yml.j2 b/tekton/src/pipelines/taskdefs/ivt-core/all-apps.yml.j2 index d5a4d8b8b2..80cb53c7ba 100644 --- a/tekton/src/pipelines/taskdefs/ivt-core/all-apps.yml.j2 +++ b/tekton/src/pipelines/taskdefs/ivt-core/all-apps.yml.j2 @@ -61,28 +61,7 @@ - app-cfg-iot -# IVT 4: Core x Manage -# ------------------------------------------------------------------------- -- name: ivtcore-manage - {{ lookup('template', 'taskdefs/ivt-core/common/taskref.yml.j2') | indent(2) }} - params: - {{ lookup('template', 'taskdefs/ivt-core/common/params.yml.j2') | indent(4) }} - - name: product_id - value: ibm-mas-manage - - name: product_channel - value: $(params.mas_app_channel_manage) - when: - - input: "$(params.ivt_version_core)" - operator: notin - values: ["skip"] - - input: "$(params.mas_app_channel_manage)" - operator: notin - values: [""] - runAfter: - - app-cfg-manage - - -# IVT 5: Core x Monitor +# IVT 4: Core x Monitor # ------------------------------------------------------------------------- - name: ivtcore-monitor {{ lookup('template', 'taskdefs/ivt-core/common/taskref.yml.j2') | indent(2) }} @@ -103,7 +82,7 @@ - app-cfg-monitor -# IVT 6: Core x Optimizer +# IVT 5: Core x Optimizer # ------------------------------------------------------------------------- - name: ivtcore-optimizer {{ lookup('template', 'taskdefs/ivt-core/common/taskref.yml.j2') | indent(2) }} @@ -124,7 +103,7 @@ - app-cfg-optimizer -# IVT 7: Core x Predict +# IVT 6: Core x Predict # ------------------------------------------------------------------------- - name: ivtcore-predict {{ lookup('template', 'taskdefs/ivt-core/common/taskref.yml.j2') | indent(2) }} @@ -145,7 +124,7 @@ - app-cfg-predict -# IVT 8: Core x Safety +# IVT 7: Core x Safety # ------------------------------------------------------------------------- - name: ivtcore-safety {{ lookup('template', 'taskdefs/ivt-core/common/taskref.yml.j2') | indent(2) }} @@ -166,7 +145,7 @@ - app-cfg-safety -# IVT 9: Core x Visual Inspection +# IVT 8: Core x Visual Inspection # ------------------------------------------------------------------------- - name: ivtcore-visualinspection {{ lookup('template', 'taskdefs/ivt-core/common/taskref.yml.j2') | indent(2) }} diff --git a/tekton/src/pipelines/taskdefs/ivt-core/manage.yml.j2 b/tekton/src/pipelines/taskdefs/ivt-core/manage.yml.j2 new file mode 100644 index 0000000000..1f2e1175d7 --- /dev/null +++ b/tekton/src/pipelines/taskdefs/ivt-core/manage.yml.j2 @@ -0,0 +1,19 @@ +# IVT 4: Core x Manage +# ------------------------------------------------------------------------- +- name: ivtcore-manage + {{ lookup('template', 'taskdefs/ivt-core/common/taskref.yml.j2') | indent(2) }} + params: + {{ lookup('template', 'taskdefs/ivt-core/common/params.yml.j2') | indent(4) }} + - name: product_id + value: ibm-mas-manage + - name: product_channel + value: $(params.mas_app_channel_manage) + when: + - input: "$(params.ivt_version_core)" + operator: notin + values: ["skip"] + - input: "$(params.mas_app_channel_manage)" + operator: notin + values: [""] + runAfter: + - app-cfg-manage \ No newline at end of file From 6fc8dc4539af762f803d9f4d3b743bbd40ab6015 Mon Sep 17 00:00:00 2001 From: Alexandre Quinteiro Date: Sat, 25 Feb 2023 04:16:38 -0300 Subject: [PATCH 4/4] [patch] Change log --- docs/changes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changes.md b/docs/changes.md index 6999c5de88..17012a97f0 100644 --- a/docs/changes.md +++ b/docs/changes.md @@ -1,5 +1,6 @@ ## Changes +- [`3.14`](https://github.com/ibm-mas/cli/releases/tag/3.14.0) Add manage regression pipeline - [`3.13`](https://github.com/ibm-mas/cli/releases/tag/3.13.0) Add tasks for Manage Industry Solutions and add support for Manage JMS configuration - [`3.12`](https://github.com/ibm-mas/cli/releases/tag/3.12.0) Add support for Feb 2023 catalog - [`3.11`](https://github.com/ibm-mas/cli/releases/tag/3.11.0) Add upgrade-test pipeline and automation to automatically generate PipelineRun resources