diff --git a/catalog/pipelines/.gitkeep b/catalog/pipelines/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/catalog/pipelines/crc-qe-virtualized/0.1/README.md b/catalog/pipelines/crc-qe-virtualized/0.1/README.md new file mode 100644 index 0000000..06f232d --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.1/README.md @@ -0,0 +1,44 @@ +# Overview + +This pipeline allows to run the qe phase on externally build distribution of crc. +The target host will be self provisioned. + +## Params + +TBC + +## Required tasks + +This pipeline relies on several tasks which should be deployed to allow deploy its spec + +```yaml +oc apply -f catalog/task/gather-run-info/0.1/gather-run-info.yaml +oc apply -f catalog/task/gather-crc-info/0.1/gather-crc-info.yaml +oc apply -f catalog/task/crc-preparer/0.2/crc-preparer.yaml +oc apply -f catalog/task/crc-qe-cli/0.1/crc-qe-cli.yaml +oc apply -f catalog/task/infra-fedora-provision/0.1/infra-fedora-provision.yaml +oc apply -f catalog/task/infra-fedora-decommission/0.1/infra-fedora-decommission.yaml +oc apply -f catalog/task/infra-rhel-provision/0.1/infra-rhel-provision.yaml +oc apply -f catalog/task/infra-rhel-decommission/0.1/infra-rhel-decommission.yaml +#REVIEW +oc apply -f catalog/task/gather-run-info/0.1/gather-run-info.yaml +oc apply -f catalog/task/gather-host-info/0.1/gather-host-info.yaml +oc apply -f catalog/task/gather-crc-info/0.1/gather-crc-info.yaml +oc apply -f catalog/task/gather-s3-info/0.1/gather-s3-info.yaml +oc apply -f catalog/task/asset-checker-http/0.1/asset-checker-http.yaml +oc apply -f catalog/task/crc-preparer/0.2/crc-preparer.yaml +oc apply -f catalog/task/crc-builder-tray/0.3/crc-builder-tray-mac-universal.yaml +oc apply -f catalog/task/crc-builder-tray/0.3/crc-builder-tray-x64.yaml +oc apply -f catalog/task/crc-builder-installer/0.3/crc-builder-installer.yaml +oc apply -f orchestrator/catalog/task/crc-qe-cli/0.1/crc-qe-cli.yaml +oc apply -f catalog/task/s3-sink-workspace/0.3/s3-sink-workspace.yaml +oc apply -f catalog/task/url-generator/0.1/url-generator.yamls +``` + +### workspace + +The task uses a workspace to copy files which are required across the pipeline. As an example +the host key is copied to the workspace and the path is exposed through `workspace-resources-path`. + +Then any other task across the pipeline which uses the workspace can access the key to use for ssh into +the target host. diff --git a/catalog/pipelines/crc-qe-virtualized/0.1/crc-qe-virtualized.yaml b/catalog/pipelines/crc-qe-virtualized/0.1/crc-qe-virtualized.yaml new file mode 100644 index 0000000..b7be99e --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.1/crc-qe-virtualized.yaml @@ -0,0 +1,320 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: Pipeline +metadata: + name: crc-qe-virtualized + labels: + app.kubernetes.io/version: "0.1" + redhat.com/product: openshift-local + redhat.com/phase: qe + annotations: + tekton.dev/pipelines.minVersion: "0.24.x" + tekton.dev/categories: qe + tekton.dev/tags: openshift-local, qe, nested virualization + tekton.dev/displayName: "qe for openshift local on linux nested virtualization" + tekton.dev/platforms: "linux/amd64" +spec: + description: >- + This pipeline will run the testing for openshift local on + a specific linux version based on nested virtualization + + workspaces: + - name: pipelines-data + + params: + # Fedora related params + - name: fedora-version + default: '' + # Rhel related params + - name: rhel-version + default: '' + - name: repo-baseos-url + description: baseos repo url to setup on provisioned machine + default: '' + - name: repo-appstream-url + description: appstream repo url to setup on provisioned machine + default: '' + - name: rh-account-secret + description: ocp secret holding the credentials for a valid rh user to subscribe VM. Secret should be accessible to this task. + default: credentials-rh-subs-crcqe-prod + # Common params + - name: target-platform + default: linux + - name: image-id + description: internal id for image on virtualization provider (Openstack image ID) + default: '' + - name: downloadable-url + description: full base url to download ditributables and shasumsfiles + default: https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest + - name: shasum-file + description: file name for shasum to check distributable + default: sha256sum.txt + # QE params + - name: e2e-tag + description: tags to select e2e scnearios. Default empty values which means all scnearios + default: "''" + - name: qe-worspace-subpath + description: subpath on workspace where storing ephemeral qe results + default: qe-results + - name: run-e2e + description: Control if e2e tests are executed. (true or false) + default: 'true' + - name: run-integration + description: Control if integration tests are executed. (true or false) + default: 'true' + # S3 params + - name: s3-data-secret + default: datalake-aws + - name: s3-bucket + default: crcqe-asia + - name: s3-folder-path + description: target folder to store results. (Example release/2.9.0) + + results: + - name: results-url + description: url to get results for the execution + value: $(tasks.url-generator.results.url) + - name: product-version + description: product version tested for this interop + value: $(tasks.crc-info.results.crc-version) + - name: qe-duration + description: amount of time in seconds for qe execution (testing) + value: $(tasks.qe.results.duration) + + tasks: + - name: correlate + taskRef: + name: gather-run-info + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: s3-info + runAfter: + - correlate + taskRef: + name: gather-s3-info + params: + - name: s3-data-secret + value: $(params.s3-data-secret) + - name: bucket + value: $(params.s3-bucket) + - name: folder-path + # only one have value fedora-version or rhel-version + value: $(params.s3-folder-path)/$(params.fedora-version)$(params.rhel-version) + - name: crc-info + runAfter: + - correlate + taskRef: + name: gather-crc-info + params: + - name: platform + value: $(params.target-platform) + - name: provision-fedora + runAfter: + - s3-info + - crc-info + taskRef: + name: infra-fedora-provision + when: + - input: $(params.fedora-version) + operator: notin + values: [''] + params: + - name: id + value: crc-qe-virtualized-fedora + - name: fedora-version + value: $(params.fedora-version) + - name: image-id + value: $(params.image-id) + - name: correlation + value: $(tasks.correlate.results.correlation) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "20m" + - name: provision-rhel + runAfter: + - s3-info + - crc-info + when: + - input: $(params.rhel-version) + operator: notin + values: [''] + taskRef: + name: infra-rhel-provision + params: + - name: id + value: crc-qe-virtualized-rhel + - name: rhel-version + value: $(params.rhel-version) + - name: repo-baseos-url + value: $(params.repo-baseos-url) + - name: repo-appstream-url + value: $(params.repo-appstream-url) + - name: rh-account-secret + value: $(params.rh-account-secret) + - name: image-id + value: $(params.image-id) + - name: correlation + value: $(tasks.correlate.results.correlation) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "45m" + - name: sync-provision + runAfter: + - s3-info + - crc-info + taskRef: + name: infra-syncer + params: + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "20m" + - name: install + runAfter: + - sync-provision + taskRef: + name: crc-preparer + params: + - name: platform + value: $(params.target-platform) + - name: ip + value: $(tasks.sync-provision.results.host) + - name: username + value: $(tasks.sync-provision.results.username) + - name: key + value: $(tasks.sync-provision.results.key-filename) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + # Preparing crc version is only used for target path storage + - name: downloadable-version + value: $(tasks.crc-info.results.crc-version) + - name: downloadable-url + value: $(params.downloadable-url) + - name: shasum-file + value: $(params.shasum-file) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "1h" + - name: qe + runAfter: + - install + taskRef: + name: crc-qe-cli + params: + - name: platform + value: $(params.target-platform) + - name: ip + value: $(tasks.sync-provision.results.host) + - name: username + value: $(tasks.sync-provision.results.username) + - name: key + value: $(tasks.sync-provision.results.key-filename) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: worspace-qe-subpath + value: $(params.qe-worspace-subpath) + # This is used to run e2e and integration containers + # Need to integrate a build from main and make it accessible + # For the time been we are good with latest released version + - name: crc-version + value: $(tasks.crc-info.results.crc-version) + - name: run-e2e + value: $(params.run-e2e) + - name: e2e-tag + value: $(params.e2e-tag) + - name: run-integration + value: $(params.run-integration) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "5h" + - name: datalake-sink + runAfter: + - qe + taskRef: + name: s3-sink-workspace + params: + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: workspace-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: workspace-subpath + value: $(params.qe-worspace-subpath) + # Do not delete to keep tf state to decomission on final + # This task should be splitted to allow only cleaning up + - name: workspace-cleanup + value: 'false' + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "15m" + - name: url-generator + taskRef: + name: url-generator + runAfter: + - datalake-sink + params: + - name: base-url + value: $(tasks.s3-info.results.download-url) + - name: context + value: $(params.qe-worspace-subpath) + - name: asset-name + value: e2e-non-ux.xml + finally: + - name: decomission-fedora + when: + - input: $(params.fedora-version) + operator: notin + values: [''] + taskRef: + name: infra-fedora-decommission + params: + - name: infra-id + # This is the value composed on infra provision for project + # if we keep the link with provision task if it fails this one will not run + value: crc-qe-virtualized-fedora-$(tasks.correlate.results.correlation) + - name: fedora-version + value: $(params.fedora-version) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "15m" + - name: decomission-rhel + when: + - input: $(params.rhel-version) + operator: notin + values: [''] + taskRef: + name: infra-rhel-decommission + params: + - name: infra-id + # This is the value composed on infra provision for project + # if we keep the link with provision task if it fails this one will not run + value: crc-qe-virtualized-rhel-$(tasks.correlate.results.correlation) + - name: rhel-version + value: $(params.rhel-version) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "15m" + \ No newline at end of file diff --git a/catalog/pipelines/crc-qe-virtualized/0.1/samples/fedora.yaml b/catalog/pipelines/crc-qe-virtualized/0.1/samples/fedora.yaml new file mode 100644 index 0000000..bce8e66 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.1/samples/fedora.yaml @@ -0,0 +1,22 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-fedora37- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: fedora-version + value: Fedora-Cloud-Base-37 + - name: downloadable-url + value: https://download.eng.bos.redhat.com/staging-cds/developer/crc/2.9.0-1/staging + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: 'release/2.9.0' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.1/samples/rhel8.8.0-nightly.yaml b/catalog/pipelines/crc-qe-virtualized/0.1/samples/rhel8.8.0-nightly.yaml new file mode 100644 index 0000000..83e531d --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.1/samples/rhel8.8.0-nightly.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-rhel880- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: rhel-version + value: RHEL-8.8.0-x86_64-nightly-latest + - name: repo-baseos-url + value: 'http://download.eng.bos.redhat.com/rhel-8/nightly/RHEL-8/RHEL-8.8.0-20230127.0/compose/BaseOS/x86_64/os' + - name: repo-appstream-url + value: 'http://download.eng.bos.redhat.com/rhel-8/nightly/RHEL-8/RHEL-8.8.0-20230127.0/compose/AppStream/x86_64/os' + - name: downloadable-url + value: https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: nightly/rhel/RHEL-8.8.0-20230127.0 + - name: run-integration + value: "false" + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + timeout: "5h" \ No newline at end of file diff --git a/catalog/pipelines/crc-qe-virtualized/0.1/samples/rhel9.2.0-nightly.yaml b/catalog/pipelines/crc-qe-virtualized/0.1/samples/rhel9.2.0-nightly.yaml new file mode 100644 index 0000000..3fa8f77 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.1/samples/rhel9.2.0-nightly.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-rhel920- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: rhel-version + value: RHEL-9.2.0-x86_64-nightly-latest + - name: repo-baseos-url + value: 'http://download.eng.bos.redhat.com/rhel-9/nightly/RHEL-9/RHEL-9.2.0-20221219.0/compose/BaseOS/x86_64/os' + - name: repo-appstream-url + value: 'http://download.eng.bos.redhat.com/rhel-9/nightly/RHEL-9/RHEL-9.2.0-20221219.0/compose/AppStream/x86_64/os' + - name: rh-account-secret + value: credentials-rh-subs-crcqe-prod + - name: downloadable-url + value: https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: 'nightly/rhel/RHEL-9.2.0-20221219.0' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + timeout: "5h" \ No newline at end of file diff --git a/catalog/pipelines/crc-qe-virtualized/0.2/README.md b/catalog/pipelines/crc-qe-virtualized/0.2/README.md new file mode 100644 index 0000000..06f232d --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.2/README.md @@ -0,0 +1,44 @@ +# Overview + +This pipeline allows to run the qe phase on externally build distribution of crc. +The target host will be self provisioned. + +## Params + +TBC + +## Required tasks + +This pipeline relies on several tasks which should be deployed to allow deploy its spec + +```yaml +oc apply -f catalog/task/gather-run-info/0.1/gather-run-info.yaml +oc apply -f catalog/task/gather-crc-info/0.1/gather-crc-info.yaml +oc apply -f catalog/task/crc-preparer/0.2/crc-preparer.yaml +oc apply -f catalog/task/crc-qe-cli/0.1/crc-qe-cli.yaml +oc apply -f catalog/task/infra-fedora-provision/0.1/infra-fedora-provision.yaml +oc apply -f catalog/task/infra-fedora-decommission/0.1/infra-fedora-decommission.yaml +oc apply -f catalog/task/infra-rhel-provision/0.1/infra-rhel-provision.yaml +oc apply -f catalog/task/infra-rhel-decommission/0.1/infra-rhel-decommission.yaml +#REVIEW +oc apply -f catalog/task/gather-run-info/0.1/gather-run-info.yaml +oc apply -f catalog/task/gather-host-info/0.1/gather-host-info.yaml +oc apply -f catalog/task/gather-crc-info/0.1/gather-crc-info.yaml +oc apply -f catalog/task/gather-s3-info/0.1/gather-s3-info.yaml +oc apply -f catalog/task/asset-checker-http/0.1/asset-checker-http.yaml +oc apply -f catalog/task/crc-preparer/0.2/crc-preparer.yaml +oc apply -f catalog/task/crc-builder-tray/0.3/crc-builder-tray-mac-universal.yaml +oc apply -f catalog/task/crc-builder-tray/0.3/crc-builder-tray-x64.yaml +oc apply -f catalog/task/crc-builder-installer/0.3/crc-builder-installer.yaml +oc apply -f orchestrator/catalog/task/crc-qe-cli/0.1/crc-qe-cli.yaml +oc apply -f catalog/task/s3-sink-workspace/0.3/s3-sink-workspace.yaml +oc apply -f catalog/task/url-generator/0.1/url-generator.yamls +``` + +### workspace + +The task uses a workspace to copy files which are required across the pipeline. As an example +the host key is copied to the workspace and the path is exposed through `workspace-resources-path`. + +Then any other task across the pipeline which uses the workspace can access the key to use for ssh into +the target host. diff --git a/catalog/pipelines/crc-qe-virtualized/0.2/crc-qe-virtualized.yaml b/catalog/pipelines/crc-qe-virtualized/0.2/crc-qe-virtualized.yaml new file mode 100644 index 0000000..5d4c75e --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.2/crc-qe-virtualized.yaml @@ -0,0 +1,324 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: Pipeline +metadata: + name: crc-qe-virtualized + labels: + app.kubernetes.io/version: "0.1" + redhat.com/product: openshift-local + redhat.com/phase: qe + annotations: + tekton.dev/pipelines.minVersion: "0.24.x" + tekton.dev/categories: qe + tekton.dev/tags: openshift-local, qe, nested virualization + tekton.dev/displayName: "qe for openshift local on linux nested virtualization" + tekton.dev/platforms: "linux/amd64" +spec: + description: >- + This pipeline will run the testing for openshift local on + a specific linux version based on nested virtualization + + workspaces: + - name: pipelines-data + + params: + # Fedora related params + - name: fedora-version + default: '' + # Rhel related params + - name: rhel-version + default: '' + - name: repo-baseos-url + description: baseos repo url to setup on provisioned machine + default: '' + - name: repo-appstream-url + description: appstream repo url to setup on provisioned machine + default: '' + - name: rh-account-secret + description: ocp secret holding the credentials for a valid rh user to subscribe VM. Secret should be accessible to this task. + default: credentials-rh-subs-crcqe-prod + # Common params + - name: target-platform + default: linux + - name: image-id + description: internal id for image on virtualization provider (Openstack image ID) + default: '' + - name: downloadable-url + description: full base url to download ditributables and shasumsfiles + default: https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest + - name: shasum-file + description: file name for shasum to check distributable + default: sha256sum.txt + # QE params + - name: e2e-tag + description: tags to select e2e scnearios. Default empty values which means all scnearios + default: "''" + - name: qe-worspace-subpath + description: subpath on workspace where storing ephemeral qe results + default: qe-results + - name: run-e2e + description: Control if e2e tests are executed. (true or false) + default: 'true' + - name: run-integration + description: Control if integration tests are executed. (true or false) + default: 'true' + # S3 params + - name: s3-data-secret + default: datalake-aws + - name: s3-bucket + default: crcqe-asia + - name: s3-folder-path + description: target folder to store results. (Example release/2.9.0) + + results: + - name: results-url + description: url to get results for the execution + value: $(tasks.url-generator.results.url) + - name: product-version + description: product version tested for this interop + value: $(tasks.crc-info.results.crc-version) + - name: qe-duration + description: amount of time in seconds for qe execution (testing) + value: $(tasks.qe.results.duration) + + tasks: + - name: correlate + taskRef: + name: gather-run-info + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: s3-info + runAfter: + - correlate + taskRef: + name: gather-s3-info + params: + - name: s3-data-secret + value: $(params.s3-data-secret) + - name: bucket + value: $(params.s3-bucket) + - name: folder-path + # only one have value fedora-version or rhel-version + value: $(params.s3-folder-path)/$(params.fedora-version)$(params.rhel-version) + - name: crc-info + runAfter: + - correlate + taskRef: + name: gather-crc-info + params: + - name: platform + value: $(params.target-platform) + - name: provision-fedora + runAfter: + - s3-info + - crc-info + taskRef: + name: infra-management + when: + - input: $(params.fedora-version) + operator: notin + values: [''] + params: + # Need to export the variable to control fedora version + # for time being it only check 37 + # - name: fedora-version + # value: $(params.fedora-version) + - name: project-name + value: crc-qe-virtualized-fedora-$(tasks.correlate.results.correlation) + - name: requestedHostID + value: ol-fedora + - name: operation + value: create + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "20m" + - name: provision-rhel + runAfter: + - s3-info + - crc-info + when: + - input: $(params.rhel-version) + operator: notin + values: [''] + taskRef: + name: infra-rhel-provision + params: + - name: id + value: crc-qe-virtualized-rhel + - name: rhel-version + value: $(params.rhel-version) + - name: repo-baseos-url + value: $(params.repo-baseos-url) + - name: repo-appstream-url + value: $(params.repo-appstream-url) + - name: rh-account-secret + value: $(params.rh-account-secret) + - name: image-id + value: $(params.image-id) + - name: correlation + value: $(tasks.correlate.results.correlation) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "45m" + - name: sync-provision + runAfter: + - s3-info + - crc-info + taskRef: + name: infra-syncer + params: + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "20m" + - name: install + runAfter: + - sync-provision + taskRef: + name: crc-preparer + params: + - name: platform + value: $(params.target-platform) + - name: ip + value: $(tasks.sync-provision.results.host) + - name: username + value: $(tasks.sync-provision.results.username) + - name: key + value: $(tasks.sync-provision.results.key-filename) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + # Preparing crc version is only used for target path storage + - name: downloadable-version + value: $(tasks.crc-info.results.crc-version) + - name: downloadable-url + value: $(params.downloadable-url) + - name: shasum-file + value: $(params.shasum-file) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "1h" + - name: qe + runAfter: + - install + taskRef: + name: crc-qe-cli + params: + - name: platform + value: $(params.target-platform) + - name: ip + value: $(tasks.sync-provision.results.host) + - name: username + value: $(tasks.sync-provision.results.username) + - name: key + value: $(tasks.sync-provision.results.key-filename) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: worspace-qe-subpath + value: $(params.qe-worspace-subpath) + # This is used to run e2e and integration containers + # Need to integrate a build from main and make it accessible + # For the time been we are good with latest released version + - name: crc-version + value: $(tasks.crc-info.results.crc-version) + - name: run-e2e + value: $(params.run-e2e) + - name: e2e-tag + value: $(params.e2e-tag) + - name: run-integration + value: $(params.run-integration) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "5h" + - name: datalake-sink + runAfter: + - qe + taskRef: + name: s3-sink-workspace + params: + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: workspace-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: workspace-subpath + value: $(params.qe-worspace-subpath) + # Do not delete to keep tf state to decomission on final + # This task should be splitted to allow only cleaning up + - name: workspace-cleanup + value: 'false' + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "15m" + - name: url-generator + taskRef: + name: url-generator + runAfter: + - datalake-sink + params: + - name: base-url + value: $(tasks.s3-info.results.download-url) + - name: context + value: $(params.qe-worspace-subpath) + - name: asset-name + value: e2e-non-ux.xml + finally: + - name: decomission-fedora + when: + - input: $(params.fedora-version) + operator: notin + values: [''] + taskRef: + name: infra-management + params: + - name: project-name + value: crc-qe-virtualized-fedora-$(tasks.correlate.results.correlation) + - name: requestedHostID + value: ol-fedora + - name: operation + value: destroy + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "15m" + - name: decomission-rhel + when: + - input: $(params.rhel-version) + operator: notin + values: [''] + taskRef: + name: infra-rhel-decommission + # not supported yet + # onError: continue + params: + - name: infra-id + # This is the value composed on infra provision for project + # if we keep the link with provision task if it fails this one will not run + value: crc-qe-virtualized-rhel-$(tasks.correlate.results.correlation) + - name: rhel-version + value: $(params.rhel-version) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "15m" + \ No newline at end of file diff --git a/catalog/pipelines/crc-qe-virtualized/0.2/samples/fedora.yaml b/catalog/pipelines/crc-qe-virtualized/0.2/samples/fedora.yaml new file mode 100644 index 0000000..bce8e66 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.2/samples/fedora.yaml @@ -0,0 +1,22 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-fedora37- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: fedora-version + value: Fedora-Cloud-Base-37 + - name: downloadable-url + value: https://download.eng.bos.redhat.com/staging-cds/developer/crc/2.9.0-1/staging + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: 'release/2.9.0' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.2/samples/rhel8.8.0-nightly.yaml b/catalog/pipelines/crc-qe-virtualized/0.2/samples/rhel8.8.0-nightly.yaml new file mode 100644 index 0000000..abfb471 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.2/samples/rhel8.8.0-nightly.yaml @@ -0,0 +1,30 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-rhel880- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: image-id + value: cc3f9770-50ad-4fa2-8614-39cd98d8f5a1 + - name: rhel-version + value: RHEL-8.8.0-20230413.2 + - name: repo-baseos-url + value: 'http://download.eng.bos.redhat.com/rhel-8/nightly/RHEL-8/RHEL-8.8.0-20230413.2/compose/BaseOS/x86_64/os' + - name: repo-appstream-url + value: 'http://download.eng.bos.redhat.com/rhel-8/nightly/RHEL-8/RHEL-8.8.0-20230413.2/compose/AppStream/x86_64/os' + - name: downloadable-url + value: https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: nightly/rhel/RHEL-8.8.0-20230413.2 + - name: run-integration + value: "false" + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + timeout: "5h" \ No newline at end of file diff --git a/catalog/pipelines/crc-qe-virtualized/0.2/samples/rhel9.2.0-nightly.yaml b/catalog/pipelines/crc-qe-virtualized/0.2/samples/rhel9.2.0-nightly.yaml new file mode 100644 index 0000000..6df4c58 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.2/samples/rhel9.2.0-nightly.yaml @@ -0,0 +1,30 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-rhel920- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: image-id + value: 9185cfce-b2ba-47a5-af2f-17146652bcfe + - name: rhel-version + value: RHEL-9.2.0-20230414.17 + - name: repo-baseos-url + value: 'http://download.eng.bos.redhat.com/rhel-9/nightly/RHEL-9/RHEL-9.2.0-20230414.17/compose/BaseOS/x86_64/os' + - name: repo-appstream-url + value: 'http://download.eng.bos.redhat.com/rhel-9/nightly/RHEL-9/RHEL-9.2.0-20230414.17/compose/AppStream/x86_64/os' + - name: rh-account-secret + value: credentials-rh-subs-crcqe-prod + - name: downloadable-url + value: https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: 'nightly/rhel/RHEL-9.2.0-20230414.17' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + timeout: "5h" \ No newline at end of file diff --git a/catalog/pipelines/crc-qe-virtualized/0.3/README.md b/catalog/pipelines/crc-qe-virtualized/0.3/README.md new file mode 100644 index 0000000..06f232d --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.3/README.md @@ -0,0 +1,44 @@ +# Overview + +This pipeline allows to run the qe phase on externally build distribution of crc. +The target host will be self provisioned. + +## Params + +TBC + +## Required tasks + +This pipeline relies on several tasks which should be deployed to allow deploy its spec + +```yaml +oc apply -f catalog/task/gather-run-info/0.1/gather-run-info.yaml +oc apply -f catalog/task/gather-crc-info/0.1/gather-crc-info.yaml +oc apply -f catalog/task/crc-preparer/0.2/crc-preparer.yaml +oc apply -f catalog/task/crc-qe-cli/0.1/crc-qe-cli.yaml +oc apply -f catalog/task/infra-fedora-provision/0.1/infra-fedora-provision.yaml +oc apply -f catalog/task/infra-fedora-decommission/0.1/infra-fedora-decommission.yaml +oc apply -f catalog/task/infra-rhel-provision/0.1/infra-rhel-provision.yaml +oc apply -f catalog/task/infra-rhel-decommission/0.1/infra-rhel-decommission.yaml +#REVIEW +oc apply -f catalog/task/gather-run-info/0.1/gather-run-info.yaml +oc apply -f catalog/task/gather-host-info/0.1/gather-host-info.yaml +oc apply -f catalog/task/gather-crc-info/0.1/gather-crc-info.yaml +oc apply -f catalog/task/gather-s3-info/0.1/gather-s3-info.yaml +oc apply -f catalog/task/asset-checker-http/0.1/asset-checker-http.yaml +oc apply -f catalog/task/crc-preparer/0.2/crc-preparer.yaml +oc apply -f catalog/task/crc-builder-tray/0.3/crc-builder-tray-mac-universal.yaml +oc apply -f catalog/task/crc-builder-tray/0.3/crc-builder-tray-x64.yaml +oc apply -f catalog/task/crc-builder-installer/0.3/crc-builder-installer.yaml +oc apply -f orchestrator/catalog/task/crc-qe-cli/0.1/crc-qe-cli.yaml +oc apply -f catalog/task/s3-sink-workspace/0.3/s3-sink-workspace.yaml +oc apply -f catalog/task/url-generator/0.1/url-generator.yamls +``` + +### workspace + +The task uses a workspace to copy files which are required across the pipeline. As an example +the host key is copied to the workspace and the path is exposed through `workspace-resources-path`. + +Then any other task across the pipeline which uses the workspace can access the key to use for ssh into +the target host. diff --git a/catalog/pipelines/crc-qe-virtualized/0.3/crc-qe-virtualized.yaml b/catalog/pipelines/crc-qe-virtualized/0.3/crc-qe-virtualized.yaml new file mode 100644 index 0000000..70f99ce --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.3/crc-qe-virtualized.yaml @@ -0,0 +1,387 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: Pipeline +metadata: + name: crc-qe-virtualized + labels: + app.kubernetes.io/version: "0.3" + redhat.com/product: openshift-local + redhat.com/phase: qe + annotations: + tekton.dev/pipelines.minVersion: "0.24.x" + tekton.dev/categories: qe + tekton.dev/tags: openshift-local, qe, nested virualization + tekton.dev/displayName: "qe for openshift local" + tekton.dev/platforms: "linux/amd64" +spec: + description: >- + This pipeline will run the testing for openshift local on + a specific linux version based on nested virtualization + + workspaces: + - name: pipelines-data + + params: + - name: target-platform + description: param to inform on which platform will act the pipeline + default: linux + # Windows related params + - name: windows-featurepack + description: windows feature pack (default "22h2-pro") + default: 22h2-pro + - name: windows-version + description: Major version for windows desktop 10 or 11 (default "11") + default: '11' + - name: azure-credentials-secret + description: ocp secret holding the azure credentials. Secret should be accessible to this task. + default: az-crcqe-bot + # Fedora related params + - name: fedora-version + default: '' + # Rhel related params + - name: rhel-version + default: '' + - name: repo-baseos-url + description: baseos repo url to setup on provisioned machine + default: '' + - name: repo-appstream-url + description: appstream repo url to setup on provisioned machine + default: '' + - name: rh-account-secret + description: ocp secret holding the credentials for a valid rh user to subscribe VM. Secret should be accessible to this task. + default: credentials-rh-subs-crcqe-prod + - name: image-id + description: internal id for image on virtualization provider (Openstack image ID) + default: '' + # CRC params + - name: downloadable-url + description: full base url to download ditributables and shasumsfiles + default: https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest + - name: shasum-file + description: file name for shasum to check distributable + default: sha256sum.txt + # QE params + - name: e2e-tag + description: tags to select e2e scnearios. Default empty values which means all scnearios + default: "''" + - name: qe-worspace-subpath + description: subpath on workspace where storing ephemeral qe results + default: qe-results + - name: run-e2e + description: Control if e2e tests are executed. (true or false) + default: 'true' + - name: run-integration + description: Control if integration tests are executed. (true or false) + default: 'true' + # S3 params + - name: s3-data-secret + default: datalake-aws + - name: s3-bucket + default: crcqe-asia + - name: s3-folder-path + description: target folder to store results. (Example release/2.9.0) + + results: + - name: results-url + description: url to get results for the execution + value: $(tasks.url-generator.results.url) + - name: product-version + description: product version tested for this interop + value: $(tasks.crc-info.results.crc-version) + - name: qe-duration + description: amount of time in seconds for qe execution (testing) + value: $(tasks.qe.results.duration) + + tasks: + - name: correlate + taskRef: + name: gather-run-info + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: s3-info + runAfter: + - correlate + taskRef: + name: gather-s3-info + params: + - name: s3-data-secret + value: $(params.s3-data-secret) + - name: bucket + value: $(params.s3-bucket) + - name: folder-path + # only one have value fedora-version or rhel-version + value: $(params.s3-folder-path)/$(params.fedora-version)$(params.rhel-version)$(params.windows-version)$(params.windows-featurepack) + - name: crc-info + runAfter: + - correlate + taskRef: + name: gather-crc-info + params: + - name: platform + value: $(params.target-platform) + - name: provision-fedora + runAfter: + - s3-info + - crc-info + taskRef: + name: infra-management + when: + - input: $(params.fedora-version) + operator: notin + values: [''] + params: + # Need to export the variable to control fedora version + # for time being it only check 37 + # - name: fedora-version + # value: $(params.fedora-version) + - name: project-name + value: crc-qe-virtualized-fedora-$(tasks.correlate.results.correlation) + - name: requestedHostID + value: ol-fedora + - name: operation + value: create + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "20m" + - name: provision-rhel + runAfter: + - s3-info + - crc-info + when: + - input: $(params.rhel-version) + operator: notin + values: [''] + taskRef: + name: infra-rhel-provision + params: + - name: id + value: crc-qe-virtualized-rhel + - name: rhel-version + value: $(params.rhel-version) + - name: repo-baseos-url + value: $(params.repo-baseos-url) + - name: repo-appstream-url + value: $(params.repo-appstream-url) + - name: rh-account-secret + value: $(params.rh-account-secret) + - name: image-id + value: $(params.image-id) + - name: correlation + value: $(tasks.correlate.results.correlation) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "45m" + - name: provision-windows + runAfter: + - s3-info + - crc-info + when: + - input: $(params.windows-featurepack) + operator: notin + values: [''] + - input: $(params.windows-version) + operator: notin + values: [''] + taskRef: + name: infra-management-windows + params: + - name: project-name + value: podman-backend-qe-$(tasks.correlate.results.correlation) + - name: operation + value: create + - name: windows-featurepack + value: $(params.windows-featurepack) + - name: windows-version + value: $(params.windows-version) + - name: credentials-secret + value: $(params.azure-credentials-secret) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "20m" + - name: sync-provision + runAfter: + - provision-fedora + - provision-rhel + - provision-windows + taskRef: + name: infra-syncer + params: + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "20m" + - name: install + runAfter: + - sync-provision + taskRef: + name: crc-preparer + params: + - name: platform + value: $(params.target-platform) + - name: ip + value: $(tasks.sync-provision.results.host) + - name: username + value: $(tasks.sync-provision.results.username) + - name: key + value: $(tasks.sync-provision.results.key-filename) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + # Preparing crc version is only used for target path storage + - name: downloadable-version + value: $(tasks.crc-info.results.crc-version) + - name: downloadable-url + value: $(params.downloadable-url) + - name: shasum-file + value: $(params.shasum-file) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "1h" + - name: qe + runAfter: + - install + taskRef: + name: crc-qe-cli + params: + - name: platform + value: $(params.target-platform) + - name: ip + value: $(tasks.sync-provision.results.host) + - name: username + value: $(tasks.sync-provision.results.username) + - name: key + value: $(tasks.sync-provision.results.key-filename) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: worspace-qe-subpath + value: $(params.qe-worspace-subpath) + # This is used to run e2e and integration containers + # Need to integrate a build from main and make it accessible + # For the time been we are good with latest released version + - name: crc-version + value: $(tasks.crc-info.results.crc-version) + - name: run-e2e + value: $(params.run-e2e) + - name: e2e-tag + value: $(params.e2e-tag) + - name: run-integration + value: $(params.run-integration) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "5h" + - name: datalake-sink + runAfter: + - qe + taskRef: + name: s3-sink-workspace + params: + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: workspace-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: workspace-subpath + value: $(params.qe-worspace-subpath) + # Do not delete to keep tf state to decomission on final + # This task should be splitted to allow only cleaning up + - name: workspace-cleanup + value: 'false' + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "15m" + - name: url-generator + taskRef: + name: url-generator + runAfter: + - datalake-sink + params: + - name: base-url + value: $(tasks.s3-info.results.download-url) + - name: context + value: $(params.qe-worspace-subpath) + - name: asset-name + value: e2e-non-ux.xml + finally: + - name: decomission-fedora + when: + - input: $(params.fedora-version) + operator: notin + values: [''] + taskRef: + name: infra-management + params: + - name: project-name + value: crc-qe-virtualized-fedora-$(tasks.correlate.results.correlation) + - name: requestedHostID + value: ol-fedora + - name: operation + value: destroy + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "15m" + - name: decomission-rhel + when: + - input: $(params.rhel-version) + operator: notin + values: [''] + taskRef: + name: infra-rhel-decommission + # not supported yet + # onError: continue + params: + - name: infra-id + # This is the value composed on infra provision for project + # if we keep the link with provision task if it fails this one will not run + value: crc-qe-virtualized-rhel-$(tasks.correlate.results.correlation) + - name: rhel-version + value: $(params.rhel-version) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "15m" + - name: decomission-windows + when: + - input: $(params.windows-featurepack) + operator: notin + values: [''] + - input: $(params.windows-version) + operator: notin + values: [''] + taskRef: + name: infra-management-windows + params: + - name: project-name + value: podman-backend-qe-$(tasks.correlate.results.correlation) + - name: operation + value: destroy + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "15m" + \ No newline at end of file diff --git a/catalog/pipelines/crc-qe-virtualized/0.3/samples/fedora.yaml b/catalog/pipelines/crc-qe-virtualized/0.3/samples/fedora.yaml new file mode 100644 index 0000000..bce8e66 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.3/samples/fedora.yaml @@ -0,0 +1,22 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-fedora37- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: fedora-version + value: Fedora-Cloud-Base-37 + - name: downloadable-url + value: https://download.eng.bos.redhat.com/staging-cds/developer/crc/2.9.0-1/staging + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: 'release/2.9.0' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.3/samples/rhel8.8.0-nightly.yaml b/catalog/pipelines/crc-qe-virtualized/0.3/samples/rhel8.8.0-nightly.yaml new file mode 100644 index 0000000..abfb471 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.3/samples/rhel8.8.0-nightly.yaml @@ -0,0 +1,30 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-rhel880- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: image-id + value: cc3f9770-50ad-4fa2-8614-39cd98d8f5a1 + - name: rhel-version + value: RHEL-8.8.0-20230413.2 + - name: repo-baseos-url + value: 'http://download.eng.bos.redhat.com/rhel-8/nightly/RHEL-8/RHEL-8.8.0-20230413.2/compose/BaseOS/x86_64/os' + - name: repo-appstream-url + value: 'http://download.eng.bos.redhat.com/rhel-8/nightly/RHEL-8/RHEL-8.8.0-20230413.2/compose/AppStream/x86_64/os' + - name: downloadable-url + value: https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: nightly/rhel/RHEL-8.8.0-20230413.2 + - name: run-integration + value: "false" + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + timeout: "5h" \ No newline at end of file diff --git a/catalog/pipelines/crc-qe-virtualized/0.3/samples/rhel9.2.0-nightly.yaml b/catalog/pipelines/crc-qe-virtualized/0.3/samples/rhel9.2.0-nightly.yaml new file mode 100644 index 0000000..6df4c58 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.3/samples/rhel9.2.0-nightly.yaml @@ -0,0 +1,30 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-rhel920- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: image-id + value: 9185cfce-b2ba-47a5-af2f-17146652bcfe + - name: rhel-version + value: RHEL-9.2.0-20230414.17 + - name: repo-baseos-url + value: 'http://download.eng.bos.redhat.com/rhel-9/nightly/RHEL-9/RHEL-9.2.0-20230414.17/compose/BaseOS/x86_64/os' + - name: repo-appstream-url + value: 'http://download.eng.bos.redhat.com/rhel-9/nightly/RHEL-9/RHEL-9.2.0-20230414.17/compose/AppStream/x86_64/os' + - name: rh-account-secret + value: credentials-rh-subs-crcqe-prod + - name: downloadable-url + value: https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: 'nightly/rhel/RHEL-9.2.0-20230414.17' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + timeout: "5h" \ No newline at end of file diff --git a/catalog/pipelines/crc-qe-virtualized/0.3/samples/windows11-22h2-ent.yaml b/catalog/pipelines/crc-qe-virtualized/0.3/samples/windows11-22h2-ent.yaml new file mode 100644 index 0000000..0931d99 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.3/samples/windows11-22h2-ent.yaml @@ -0,0 +1,26 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-windows11-22h2-ent- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: target-platform + value: windows + - name: windows-version + value: '11' + - name: windows-featurepack + value: 22h2-ent + - name: downloadable-url + value: https://developers.redhat.com/content-gateway/rest/mirror2/pub/openshift-v4/clients/crc/2.18.0 + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: 'release/2.18.0' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.3/samples/windows11-22h2-pro.yaml b/catalog/pipelines/crc-qe-virtualized/0.3/samples/windows11-22h2-pro.yaml new file mode 100644 index 0000000..5461f55 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.3/samples/windows11-22h2-pro.yaml @@ -0,0 +1,26 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-windows11-22h2-pro- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: target-platform + value: windows + - name: windows-version + value: '11' + - name: windows-featurepack + value: 22h2-pro + - name: downloadable-url + value: https://developers.redhat.com/content-gateway/rest/mirror2/pub/openshift-v4/clients/crc/2.18.0 + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: 'release/2.18.0' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.4/README.md b/catalog/pipelines/crc-qe-virtualized/0.4/README.md new file mode 100644 index 0000000..06f232d --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.4/README.md @@ -0,0 +1,44 @@ +# Overview + +This pipeline allows to run the qe phase on externally build distribution of crc. +The target host will be self provisioned. + +## Params + +TBC + +## Required tasks + +This pipeline relies on several tasks which should be deployed to allow deploy its spec + +```yaml +oc apply -f catalog/task/gather-run-info/0.1/gather-run-info.yaml +oc apply -f catalog/task/gather-crc-info/0.1/gather-crc-info.yaml +oc apply -f catalog/task/crc-preparer/0.2/crc-preparer.yaml +oc apply -f catalog/task/crc-qe-cli/0.1/crc-qe-cli.yaml +oc apply -f catalog/task/infra-fedora-provision/0.1/infra-fedora-provision.yaml +oc apply -f catalog/task/infra-fedora-decommission/0.1/infra-fedora-decommission.yaml +oc apply -f catalog/task/infra-rhel-provision/0.1/infra-rhel-provision.yaml +oc apply -f catalog/task/infra-rhel-decommission/0.1/infra-rhel-decommission.yaml +#REVIEW +oc apply -f catalog/task/gather-run-info/0.1/gather-run-info.yaml +oc apply -f catalog/task/gather-host-info/0.1/gather-host-info.yaml +oc apply -f catalog/task/gather-crc-info/0.1/gather-crc-info.yaml +oc apply -f catalog/task/gather-s3-info/0.1/gather-s3-info.yaml +oc apply -f catalog/task/asset-checker-http/0.1/asset-checker-http.yaml +oc apply -f catalog/task/crc-preparer/0.2/crc-preparer.yaml +oc apply -f catalog/task/crc-builder-tray/0.3/crc-builder-tray-mac-universal.yaml +oc apply -f catalog/task/crc-builder-tray/0.3/crc-builder-tray-x64.yaml +oc apply -f catalog/task/crc-builder-installer/0.3/crc-builder-installer.yaml +oc apply -f orchestrator/catalog/task/crc-qe-cli/0.1/crc-qe-cli.yaml +oc apply -f catalog/task/s3-sink-workspace/0.3/s3-sink-workspace.yaml +oc apply -f catalog/task/url-generator/0.1/url-generator.yamls +``` + +### workspace + +The task uses a workspace to copy files which are required across the pipeline. As an example +the host key is copied to the workspace and the path is exposed through `workspace-resources-path`. + +Then any other task across the pipeline which uses the workspace can access the key to use for ssh into +the target host. diff --git a/catalog/pipelines/crc-qe-virtualized/0.4/crc-qe-virtualized.yaml b/catalog/pipelines/crc-qe-virtualized/0.4/crc-qe-virtualized.yaml new file mode 100644 index 0000000..8882a44 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.4/crc-qe-virtualized.yaml @@ -0,0 +1,480 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: Pipeline +metadata: + name: crc-qe-virtualized + labels: + app.kubernetes.io/version: "0.4" + redhat.com/product: openshift-local + redhat.com/phase: qe + annotations: + tekton.dev/pipelines.minVersion: "0.24.x" + tekton.dev/categories: qe + tekton.dev/tags: openshift-local, qe, nested virualization + tekton.dev/displayName: "qe for openshift local" + tekton.dev/platforms: "linux/amd64" +spec: + description: >- + This pipeline will run the testing for openshift local on + a specific linux version based on nested virtualization + + workspaces: + - name: pipelines-data + + params: + - name: target-platform + description: param to inform on which platform will act the pipeline (windows, darwin or linux) + default: linux + # Windows related params + - name: windows-featurepack + description: windows feature pack (default "22h2-pro") + # default: 22h2-pro + default: '' + - name: windows-version + description: Major version for windows desktop 10 or 11 (default "11") + # default: '11' + default: '' + - name: windows-vmsize + description: Size of azure machine for running the windows system + default: Standard_D8s_v3 + - name: azure-credentials-secret + description: ocp secret holding the azure credentials. Secret should be accessible to this task. + default: az-crcqe-bot + # Fedora related params + - name: fedora-version + default: '' + # Rhel related params + - name: rhel-version + default: '' + - name: repo-baseos-url + description: baseos repo url to setup on provisioned machine + default: '' + - name: repo-appstream-url + description: appstream repo url to setup on provisioned machine + default: '' + - name: rh-account-secret + description: ocp secret holding the credentials for a valid rh user to subscribe VM. Secret should be accessible to this task. + default: credentials-rh-subs-crcqe-prod + - name: image-id + description: internal id for image on virtualization provider (Openstack image ID) + default: '' + # CRC params + - name: internal-base-url + description: in case of an internal release we can not directly download it but upload fisrt to s3. This setup the base url for the assets to be uploaded + default: "''" + - name: internal-asset-name + description: asset name to be uploaded + default: "''" + - name: internal-shasum-name + description: shasum name to be uploaded + default: "''" + - name: internal-shasum-target-name + description: setup the name for the internal shasum on s3 + default: "''" + - name: downloadable-url + description: full base url to download ditributables and shasumsfiles + default: '' + - name: shasum-file + description: file name for shasum to check distributable + default: sha256sum.txt + # QE params + - name: e2e-tag + description: tags to select e2e scnearios. Default empty values which means all scnearios + default: "''" + - name: qe-worspace-subpath + description: subpath on workspace where storing ephemeral qe results + default: qe-results + - name: run-e2e + description: Control if e2e tests are executed. (true or false) + default: 'true' + - name: run-integration + description: Control if integration tests are executed. (true or false) + default: 'true' + # S3 params + - name: s3-data-secret + default: datalake-aws + - name: s3-bucket + default: crcqe-asia + - name: s3-folder-path + description: target folder to store results. (Example release/2.9.0) + + results: + - name: results-url + description: url to get results for the execution + value: $(tasks.url-generator.results.url) + - name: product-version + description: product version tested for this interop + value: $(tasks.crc-info.results.crc-version) + - name: qe-duration + description: amount of time in seconds for qe execution (testing) + value: $(tasks.qe.results.duration) + + tasks: + - name: correlate + taskRef: + name: gather-run-info + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: s3-info + runAfter: + - correlate + taskRef: + name: gather-s3-info + params: + - name: s3-data-secret + value: $(params.s3-data-secret) + - name: bucket + value: $(params.s3-bucket) + - name: folder-path + # only one have value fedora-version or rhel-version + value: $(params.s3-folder-path)/$(params.fedora-version)$(params.rhel-version)$(params.windows-version)$(params.windows-featurepack) + - name: internal-asset-upload + when: + - input: $(params.internal-base-url) + operator: notin + values: ["''"] + - input: $(params.internal-asset-name) + operator: notin + values: ["''"] + runAfter: + - s3-info + taskRef: + name: s3-sync-http + params: + - name: asset-url + value: $(params.internal-base-url)/$(params.internal-asset-name) + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: s3-asset-name + value: $(params.internal-asset-name) + timeout: "15m" + - name: internal-shasum-upload + when: + - input: $(params.internal-base-url) + operator: notin + values: ["''"] + - input: $(params.internal-shasum-name) + operator: notin + values: ["''"] + runAfter: + - s3-info + taskRef: + name: s3-sync-http + params: + - name: asset-url + value: $(params.internal-base-url)/$(params.internal-shasum-name) + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: s3-asset-name + value: $(params.internal-shasum-name) + timeout: "15m" + - name: url-picker + runAfter: + - s3-info + taskRef: + name: url-picker + params: + - name: internal-base-url + value: $(params.internal-base-url) + - name: public-base-url + value: $(tasks.s3-info.results.download-url) + - name: external-base-url + value: $(params.downloadable-url) + - name: crc-info + runAfter: + - correlate + taskRef: + name: gather-crc-info + params: + - name: platform + value: $(params.target-platform) + - name: provision-fedora + runAfter: + - s3-info + - crc-info + taskRef: + name: infra-management + when: + - input: $(params.fedora-version) + operator: notin + values: [''] + params: + # Need to export the variable to control fedora version + # for time being it only check 37 + # - name: fedora-version + # value: $(params.fedora-version) + - name: project-name + value: crc-qe-virtualized-fedora-$(tasks.correlate.results.correlation) + - name: requestedHostID + value: ol-fedora + - name: operation + value: create + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "20m" + - name: provision-rhel + runAfter: + - s3-info + - crc-info + when: + - input: $(params.rhel-version) + operator: notin + values: [''] + taskRef: + name: infra-rhel-provision + params: + - name: id + value: crc-qe-virtualized-rhel + - name: rhel-version + value: $(params.rhel-version) + - name: repo-baseos-url + value: $(params.repo-baseos-url) + - name: repo-appstream-url + value: $(params.repo-appstream-url) + - name: rh-account-secret + value: $(params.rh-account-secret) + - name: image-id + value: $(params.image-id) + - name: correlation + value: $(tasks.correlate.results.correlation) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "45m" + - name: provision-windows + runAfter: + - s3-info + - crc-info + when: + - input: $(params.windows-featurepack) + operator: notin + values: [''] + - input: $(params.windows-version) + operator: notin + values: [''] + taskRef: + name: infra-management-windows + params: + - name: project-name + value: podman-backend-qe-$(tasks.correlate.results.correlation) + - name: operation + value: create + - name: windows-featurepack + value: $(params.windows-featurepack) + - name: windows-version + value: $(params.windows-version) + - name: vmsize + value: $(params.windows-vmsize) + - name: credentials-secret + value: $(params.azure-credentials-secret) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "20m" + - name: sync-provision + runAfter: + - provision-fedora + - provision-rhel + - provision-windows + taskRef: + name: infra-syncer + params: + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "20m" + - name: install + runAfter: + - sync-provision + - internal-asset-upload + - internal-shasum-upload + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/rhqp/crc-support-tkn:v0.3 + - name: name + value: crc-support + - name: kind + value: task + params: + - name: os + value: $(params.target-platform) + - name: host + value: $(tasks.sync-provision.results.host) + - name: username + value: $(tasks.sync-provision.results.username) + - name: key + value: $(tasks.sync-provision.results.key-filename) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + # Preparing crc version is only used for target path storage + - name: downloadable-version + value: $(tasks.crc-info.results.crc-version) + - name: downloadable-url + # Only accessible url within downloadable-url or internal uploaded composed url + value: $(tasks.url-picker.results.base-url) + - name: shasum-file + value: $(params.shasum-file) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "1h" + - name: qe + runAfter: + - install + taskRef: + name: crc-qe-cli + params: + - name: platform + value: $(params.target-platform) + - name: ip + value: $(tasks.sync-provision.results.host) + - name: username + value: $(tasks.sync-provision.results.username) + - name: key + value: $(tasks.sync-provision.results.key-filename) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: worspace-qe-subpath + value: $(params.qe-worspace-subpath) + # This is used to run e2e and integration containers + # Need to integrate a build from main and make it accessible + # For the time been we are good with latest released version + - name: crc-version + value: $(tasks.crc-info.results.crc-version) + - name: run-e2e + value: $(params.run-e2e) + - name: e2e-tag + value: $(params.e2e-tag) + - name: run-integration + value: $(params.run-integration) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "5h" + - name: datalake-sink + runAfter: + - qe + taskRef: + name: s3-sink-workspace + params: + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: workspace-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: workspace-subpath + value: $(params.qe-worspace-subpath) + # Do not delete to keep tf state to decomission on final + # This task should be splitted to allow only cleaning up + - name: workspace-cleanup + value: 'false' + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "15m" + - name: url-generator + taskRef: + name: url-generator + runAfter: + - datalake-sink + params: + - name: base-url + value: $(tasks.s3-info.results.download-url) + - name: context + value: $(params.qe-worspace-subpath) + - name: asset-name + value: e2e-non-ux.xml + finally: + - name: decomission-fedora + when: + - input: $(params.fedora-version) + operator: notin + values: [''] + taskRef: + name: infra-management + params: + - name: project-name + value: crc-qe-virtualized-fedora-$(tasks.correlate.results.correlation) + - name: requestedHostID + value: ol-fedora + - name: operation + value: destroy + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "15m" + - name: decomission-rhel + when: + - input: $(params.rhel-version) + operator: notin + values: [''] + taskRef: + name: infra-rhel-decommission + # not supported yet + # onError: continue + params: + - name: infra-id + # This is the value composed on infra provision for project + # if we keep the link with provision task if it fails this one will not run + value: crc-qe-virtualized-rhel-$(tasks.correlate.results.correlation) + - name: rhel-version + value: $(params.rhel-version) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "15m" + - name: decomission-windows + when: + - input: $(params.windows-featurepack) + operator: notin + values: [''] + - input: $(params.windows-version) + operator: notin + values: [''] + taskRef: + name: infra-management-windows + params: + - name: project-name + value: podman-backend-qe-$(tasks.correlate.results.correlation) + - name: operation + value: destroy + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "15m" + \ No newline at end of file diff --git a/catalog/pipelines/crc-qe-virtualized/0.4/samples/fedora.yaml b/catalog/pipelines/crc-qe-virtualized/0.4/samples/fedora.yaml new file mode 100644 index 0000000..bce8e66 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.4/samples/fedora.yaml @@ -0,0 +1,22 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-fedora37- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: fedora-version + value: Fedora-Cloud-Base-37 + - name: downloadable-url + value: https://download.eng.bos.redhat.com/staging-cds/developer/crc/2.9.0-1/staging + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: 'release/2.9.0' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.4/samples/rhel8.8.0-nightly.yaml b/catalog/pipelines/crc-qe-virtualized/0.4/samples/rhel8.8.0-nightly.yaml new file mode 100644 index 0000000..abfb471 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.4/samples/rhel8.8.0-nightly.yaml @@ -0,0 +1,30 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-rhel880- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: image-id + value: cc3f9770-50ad-4fa2-8614-39cd98d8f5a1 + - name: rhel-version + value: RHEL-8.8.0-20230413.2 + - name: repo-baseos-url + value: 'http://download.eng.bos.redhat.com/rhel-8/nightly/RHEL-8/RHEL-8.8.0-20230413.2/compose/BaseOS/x86_64/os' + - name: repo-appstream-url + value: 'http://download.eng.bos.redhat.com/rhel-8/nightly/RHEL-8/RHEL-8.8.0-20230413.2/compose/AppStream/x86_64/os' + - name: downloadable-url + value: https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: nightly/rhel/RHEL-8.8.0-20230413.2 + - name: run-integration + value: "false" + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + timeout: "5h" \ No newline at end of file diff --git a/catalog/pipelines/crc-qe-virtualized/0.4/samples/rhel9.2.0-nightly.yaml b/catalog/pipelines/crc-qe-virtualized/0.4/samples/rhel9.2.0-nightly.yaml new file mode 100644 index 0000000..6df4c58 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.4/samples/rhel9.2.0-nightly.yaml @@ -0,0 +1,30 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-rhel920- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: image-id + value: 9185cfce-b2ba-47a5-af2f-17146652bcfe + - name: rhel-version + value: RHEL-9.2.0-20230414.17 + - name: repo-baseos-url + value: 'http://download.eng.bos.redhat.com/rhel-9/nightly/RHEL-9/RHEL-9.2.0-20230414.17/compose/BaseOS/x86_64/os' + - name: repo-appstream-url + value: 'http://download.eng.bos.redhat.com/rhel-9/nightly/RHEL-9/RHEL-9.2.0-20230414.17/compose/AppStream/x86_64/os' + - name: rh-account-secret + value: credentials-rh-subs-crcqe-prod + - name: downloadable-url + value: https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: 'nightly/rhel/RHEL-9.2.0-20230414.17' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + timeout: "5h" \ No newline at end of file diff --git a/catalog/pipelines/crc-qe-virtualized/0.4/samples/windows11-22h2-ent-pre-release.yaml b/catalog/pipelines/crc-qe-virtualized/0.4/samples/windows11-22h2-ent-pre-release.yaml new file mode 100644 index 0000000..d7c13dd --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.4/samples/windows11-22h2-ent-pre-release.yaml @@ -0,0 +1,36 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-windows11-22h2-ent- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: target-platform + value: windows + - name: windows-version + value: '11' + - name: windows-featurepack + value: 22h2-ent + - name: windows-vmsize + value: Standard_D8s_v3 + - name: internal-base-url + value: https://download.eng.bos.redhat.com/etera/crc/2/2.20/2.20.0-1/staging + - name: internal-asset-name + value: crc-windows-installer.zip + - name: internal-shasum-name + value: sha256sum.txt + - name: shasum-file + value: sha256sum.txt + - name: e2e-tag + value: '@basic' + - name: run-integration + value: "false" + - name: s3-folder-path + value: 'release/2.20.0' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.4/samples/windows11-22h2-ent.yaml b/catalog/pipelines/crc-qe-virtualized/0.4/samples/windows11-22h2-ent.yaml new file mode 100644 index 0000000..0931d99 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.4/samples/windows11-22h2-ent.yaml @@ -0,0 +1,26 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-windows11-22h2-ent- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: target-platform + value: windows + - name: windows-version + value: '11' + - name: windows-featurepack + value: 22h2-ent + - name: downloadable-url + value: https://developers.redhat.com/content-gateway/rest/mirror2/pub/openshift-v4/clients/crc/2.18.0 + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: 'release/2.18.0' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.4/samples/windows11-22h2-pro.yaml b/catalog/pipelines/crc-qe-virtualized/0.4/samples/windows11-22h2-pro.yaml new file mode 100644 index 0000000..5461f55 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.4/samples/windows11-22h2-pro.yaml @@ -0,0 +1,26 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-windows11-22h2-pro- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: target-platform + value: windows + - name: windows-version + value: '11' + - name: windows-featurepack + value: 22h2-pro + - name: downloadable-url + value: https://developers.redhat.com/content-gateway/rest/mirror2/pub/openshift-v4/clients/crc/2.18.0 + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: 'release/2.18.0' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.5/README.md b/catalog/pipelines/crc-qe-virtualized/0.5/README.md new file mode 100644 index 0000000..06f232d --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.5/README.md @@ -0,0 +1,44 @@ +# Overview + +This pipeline allows to run the qe phase on externally build distribution of crc. +The target host will be self provisioned. + +## Params + +TBC + +## Required tasks + +This pipeline relies on several tasks which should be deployed to allow deploy its spec + +```yaml +oc apply -f catalog/task/gather-run-info/0.1/gather-run-info.yaml +oc apply -f catalog/task/gather-crc-info/0.1/gather-crc-info.yaml +oc apply -f catalog/task/crc-preparer/0.2/crc-preparer.yaml +oc apply -f catalog/task/crc-qe-cli/0.1/crc-qe-cli.yaml +oc apply -f catalog/task/infra-fedora-provision/0.1/infra-fedora-provision.yaml +oc apply -f catalog/task/infra-fedora-decommission/0.1/infra-fedora-decommission.yaml +oc apply -f catalog/task/infra-rhel-provision/0.1/infra-rhel-provision.yaml +oc apply -f catalog/task/infra-rhel-decommission/0.1/infra-rhel-decommission.yaml +#REVIEW +oc apply -f catalog/task/gather-run-info/0.1/gather-run-info.yaml +oc apply -f catalog/task/gather-host-info/0.1/gather-host-info.yaml +oc apply -f catalog/task/gather-crc-info/0.1/gather-crc-info.yaml +oc apply -f catalog/task/gather-s3-info/0.1/gather-s3-info.yaml +oc apply -f catalog/task/asset-checker-http/0.1/asset-checker-http.yaml +oc apply -f catalog/task/crc-preparer/0.2/crc-preparer.yaml +oc apply -f catalog/task/crc-builder-tray/0.3/crc-builder-tray-mac-universal.yaml +oc apply -f catalog/task/crc-builder-tray/0.3/crc-builder-tray-x64.yaml +oc apply -f catalog/task/crc-builder-installer/0.3/crc-builder-installer.yaml +oc apply -f orchestrator/catalog/task/crc-qe-cli/0.1/crc-qe-cli.yaml +oc apply -f catalog/task/s3-sink-workspace/0.3/s3-sink-workspace.yaml +oc apply -f catalog/task/url-generator/0.1/url-generator.yamls +``` + +### workspace + +The task uses a workspace to copy files which are required across the pipeline. As an example +the host key is copied to the workspace and the path is exposed through `workspace-resources-path`. + +Then any other task across the pipeline which uses the workspace can access the key to use for ssh into +the target host. diff --git a/catalog/pipelines/crc-qe-virtualized/0.5/crc-qe-virtualized.yaml b/catalog/pipelines/crc-qe-virtualized/0.5/crc-qe-virtualized.yaml new file mode 100644 index 0000000..7de5054 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.5/crc-qe-virtualized.yaml @@ -0,0 +1,574 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: Pipeline +metadata: + name: crc-qe-virtualized + labels: + app.kubernetes.io/version: "0.5" + redhat.com/product: openshift-local + redhat.com/phase: qe + annotations: + tekton.dev/pipelines.minVersion: "0.24.x" + tekton.dev/categories: qe + tekton.dev/tags: openshift-local, qe, nested virualization + tekton.dev/displayName: "qe for openshift local" + tekton.dev/platforms: "linux/amd64" +spec: + description: >- + This pipeline will run the testing for openshift local on + a specific linux version based on nested virtualization + + workspaces: + - name: pipelines-data + + params: + - name: target-platform + description: param to inform on which platform will act the pipeline (windows, darwin or linux) + default: linux + + # Windows related params + - name: windows-featurepack + description: windows feature pack (default "22h2-pro") + # default: 22h2-pro + default: '' + - name: windows-version + description: Major version for windows desktop 10 or 11 (default "11") + # default: '11' + default: '' + - name: windows-vmsize + description: Size of azure machine for running the windows system + default: Standard_D8ds_v4 + + # Fedora related params + - name: fedora-version + description: in case requestedHostID set to ol-fedora this param will control the major fedora version (i.e 37, 38,...) + default: '' + # Rhel related params + - name: rhel-version + default: '' + - name: repo-baseos-url + description: baseos repo url to setup on provisioned machine + default: '' + - name: repo-appstream-url + description: appstream repo url to setup on provisioned machine + default: '' + - name: rh-account-secret + description: ocp secret holding the credentials for a valid rh user to subscribe VM. Secret should be accessible to this task. + default: credentials-rh-subs-crcqe-prod + - name: image-id + description: internal id for image on virtualization provider (Openstack image ID) + default: '' + + # Cloud providers creds + - name: azure-credentials-secret + description: ocp secret holding the azure credentials. Secret should be accessible to this task. + default: az-crcqe-bot + - name: aws-credentials-secret + description: secret holding credentials to create infra on aws + default: aws-crcqe-bot + + # CRC params + - name: internal-base-url + description: in case of an internal release we can not directly download it but upload fisrt to s3. This setup the base url for the assets to be uploaded + default: "''" + - name: internal-asset-name + description: asset name to be uploaded + default: "''" + - name: internal-shasum-name + description: shasum name to be uploaded + default: "''" + - name: internal-shasum-target-name + description: setup the name for the internal shasum on s3 + default: "''" + - name: downloadable-url + description: full base url to download ditributables and shasumsfiles + default: '' + - name: shasum-file + description: file name for shasum to check distributable + default: sha256sum.txt + + # QE params + - name: e2e-tag + description: tags to select e2e scnearios. Default empty values which means all scnearios + default: "''" + - name: qe-worspace-subpath + description: subpath on workspace where storing ephemeral qe results + default: qe-results + - name: run-e2e + description: Control if e2e tests are executed. (true or false) + default: 'true' + - name: run-integration + description: Control if integration tests are executed. (true or false) + default: 'true' + + # S3 params (Storage results) + - name: s3-data-secret + default: datalake-aws + - name: s3-bucket + default: crcqe-asia + - name: s3-folder-path + description: target folder to store results. (Example release/2.9.0) + + # Pipeline control params + - name: debug + description: control verbosity and keep instances after run for troubleshooting. + default: 'false' + + results: + - name: results-url + description: url to get results for the execution + value: $(tasks.url-generator.results.url) + - name: product-version + description: product version tested for this interop + value: $(tasks.crc-info.results.crc-version) + - name: qe-duration + description: amount of time in seconds for qe execution (testing) + value: $(tasks.qe.results.duration) + + tasks: + - name: correlate + taskRef: + name: gather-run-info + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: s3-info + runAfter: + - correlate + taskRef: + name: gather-s3-info + params: + - name: s3-data-secret + value: $(params.s3-data-secret) + - name: bucket + value: $(params.s3-bucket) + - name: folder-path + # only one have value fedora-version or rhel-version + value: $(params.s3-folder-path)/$(params.fedora-version)$(params.rhel-version)$(params.windows-version)$(params.windows-featurepack) + - name: internal-asset-upload + when: + - input: $(params.internal-base-url) + operator: notin + values: ["''"] + - input: $(params.internal-asset-name) + operator: notin + values: ["''"] + runAfter: + - s3-info + taskRef: + name: s3-sync-http + params: + - name: asset-url + value: $(params.internal-base-url)/$(params.internal-asset-name) + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: s3-asset-name + value: $(params.internal-asset-name) + timeout: "15m" + - name: internal-shasum-upload + when: + - input: $(params.internal-base-url) + operator: notin + values: ["''"] + - input: $(params.internal-shasum-name) + operator: notin + values: ["''"] + runAfter: + - s3-info + taskRef: + name: s3-sync-http + params: + - name: asset-url + value: $(params.internal-base-url)/$(params.internal-shasum-name) + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: s3-asset-name + value: $(params.internal-shasum-name) + timeout: "15m" + - name: url-picker + runAfter: + - s3-info + taskRef: + name: url-picker + params: + - name: internal-base-url + value: $(params.internal-base-url) + - name: public-base-url + value: $(tasks.s3-info.results.download-url) + - name: external-base-url + value: $(params.downloadable-url) + - name: crc-info + runAfter: + - correlate + taskRef: + name: gather-crc-info + params: + - name: platform + value: $(params.target-platform) + - name: provision-fedora + runAfter: + - s3-info + - crc-info + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/rhqp/qenvs-tkn:v0.0.4-snapshot + - name: name + value: infra-management-aws + - name: kind + value: task + when: + - input: $(params.fedora-version) + operator: notin + values: [''] + params: + # Need to export the variable to control fedora version + # for time being it only check 37 + # - name: fedora-version + # value: $(params.fedora-version) + - name: project-name + value: crc-qe-virtualized-fedora-$(tasks.correlate.results.correlation) + - name: requestedHostID + value: ol-fedora + - name: fedora-version + value: $(params.fedora-version) + - name: operation + value: create + - name: aws-credentials-secret + value: $(params.aws-credentials-secret) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + # TODO need to make this optional on the task, only required for rhel + - name: rh-account-secret + value: $(params.rh-account-secret) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "20m" + - name: provision-rhel + runAfter: + - s3-info + - crc-info + when: + - input: $(params.rhel-version) + operator: notin + values: [''] + taskRef: + name: infra-rhel-provision + params: + - name: id + value: crc-qe-virtualized-rhel + - name: rhel-version + value: $(params.rhel-version) + - name: repo-baseos-url + value: $(params.repo-baseos-url) + - name: repo-appstream-url + value: $(params.repo-appstream-url) + - name: rh-account-secret + value: $(params.rh-account-secret) + - name: image-id + value: $(params.image-id) + - name: correlation + value: $(tasks.correlate.results.correlation) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "45m" + - name: provision-windows + runAfter: + - s3-info + - crc-info + when: + - input: $(params.windows-featurepack) + operator: notin + values: [''] + - input: $(params.windows-version) + operator: notin + values: [''] + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/rhqp/qenvs-tkn:v0.0.4-snapshot + - name: name + value: infra-management-azure + - name: kind + value: task + params: + - name: project-name + value: podman-backend-qe-$(tasks.correlate.results.correlation) + - name: operation + value: create + - name: windows-featurepack + value: $(params.windows-featurepack) + - name: windows-version + value: $(params.windows-version) + - name: vmsize + value: $(params.windows-vmsize) + - name: credentials-secret + value: $(params.azure-credentials-secret) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "20m" + - name: sync-provision + runAfter: + - provision-fedora + - provision-rhel + - provision-windows + taskRef: + name: infra-syncer + params: + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "20m" + - name: install + runAfter: + - sync-provision + - internal-asset-upload + - internal-shasum-upload + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/rhqp/crc-support-tkn:v0.3 + - name: name + value: crc-support + - name: kind + value: task + params: + - name: os + value: $(params.target-platform) + - name: host + value: $(tasks.sync-provision.results.host) + - name: username + value: $(tasks.sync-provision.results.username) + - name: key + value: $(tasks.sync-provision.results.key-filename) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + # Preparing crc version is only used for target path storage + - name: downloadable-version + value: $(tasks.crc-info.results.crc-version) + - name: downloadable-url + # Only accessible url within downloadable-url or internal uploaded composed url + value: $(tasks.url-picker.results.base-url) + - name: shasum-file + value: $(params.shasum-file) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "1h" + - name: qe + runAfter: + - install + taskRef: + name: crc-qe-cli + params: + - name: platform + value: $(params.target-platform) + - name: ip + value: $(tasks.sync-provision.results.host) + - name: username + value: $(tasks.sync-provision.results.username) + - name: key + value: $(tasks.sync-provision.results.key-filename) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: worspace-qe-subpath + value: $(params.qe-worspace-subpath) + # This is used to run e2e and integration containers + # Need to integrate a build from main and make it accessible + # For the time been we are good with latest released version + - name: crc-version + value: $(tasks.crc-info.results.crc-version) + - name: run-e2e + value: $(params.run-e2e) + - name: e2e-tag + value: $(params.e2e-tag) + - name: run-integration + value: $(params.run-integration) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "5h" + - name: datalake-sink + runAfter: + - qe + taskRef: + name: s3-sink-workspace + params: + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: workspace-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: workspace-subpath + value: $(params.qe-worspace-subpath) + # Do not delete to keep tf state to decomission on final + # This task should be splitted to allow only cleaning up + - name: workspace-cleanup + value: 'false' + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "15m" + - name: url-generator + taskRef: + name: url-generator + runAfter: + - datalake-sink + params: + - name: base-url + value: $(tasks.s3-info.results.download-url) + - name: context + value: $(params.qe-worspace-subpath) + - name: asset-name + value: e2e-non-ux.xml + finally: + - name: debug-info + when: + - input: $(params.rhel-version) + operator: notin + values: [''] + - input: $(params.debug) + operator: in + values: ["true"] + taskSpec: + workspaces: + - name: pipelines-data + params: + - name: workspace-resources-path + description: path relative to workspace where to store keys + steps: + - name: show-denug-info + image: registry.access.redhat.com/ubi9/ubi-minimal + script: | + #!/bin/sh + workspace_path=$(workspaces.pipelines-data.path)/$(params.workspace-resources-path) + echo "private key" + cat ${workspace_path}/id_rsa + echo "host" + cat ${workspace_path}/host + echo "username" + cat ${workspace_path}/username + params: + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: decomission-fedora + when: + - input: $(params.fedora-version) + operator: notin + values: [''] + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/rhqp/qenvs-tkn:v0.0.4-snapshot + - name: name + value: infra-management-aws + - name: kind + value: task + params: + - name: project-name + value: crc-qe-virtualized-fedora-$(tasks.correlate.results.correlation) + - name: requestedHostID + value: ol-fedora + - name: operation + value: destroy + - name: aws-credentials-secret + value: $(params.aws-credentials-secret) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + # TODO need to make this optional on the task, only required for rhel + - name: rh-account-secret + value: $(params.rh-account-secret) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "15m" + - name: decomission-rhel + when: + - input: $(params.rhel-version) + operator: notin + values: [''] + - input: $(params.debug) + operator: in + values: ["false"] + taskRef: + name: infra-rhel-decommission + # not supported yet + # onError: continue + params: + - name: infra-id + # This is the value composed on infra provision for project + # if we keep the link with provision task if it fails this one will not run + value: crc-qe-virtualized-rhel-$(tasks.correlate.results.correlation) + - name: rhel-version + value: $(params.rhel-version) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "15m" + - name: decomission-windows + when: + - input: $(params.windows-featurepack) + operator: notin + values: [''] + - input: $(params.windows-version) + operator: notin + values: [''] + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/rhqp/qenvs-tkn:v0.0.4-snapshot + - name: name + value: infra-management-azure + - name: kind + value: task + params: + - name: project-name + value: podman-backend-qe-$(tasks.correlate.results.correlation) + - name: operation + value: destroy + - name: credentials-secret + value: $(params.azure-credentials-secret) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "15m" + + \ No newline at end of file diff --git a/catalog/pipelines/crc-qe-virtualized/0.5/samples/fedora.yaml b/catalog/pipelines/crc-qe-virtualized/0.5/samples/fedora.yaml new file mode 100644 index 0000000..bce8e66 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.5/samples/fedora.yaml @@ -0,0 +1,22 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-fedora37- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: fedora-version + value: Fedora-Cloud-Base-37 + - name: downloadable-url + value: https://download.eng.bos.redhat.com/staging-cds/developer/crc/2.9.0-1/staging + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: 'release/2.9.0' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.5/samples/rhel8.8.0-nightly.yaml b/catalog/pipelines/crc-qe-virtualized/0.5/samples/rhel8.8.0-nightly.yaml new file mode 100644 index 0000000..abfb471 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.5/samples/rhel8.8.0-nightly.yaml @@ -0,0 +1,30 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-rhel880- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: image-id + value: cc3f9770-50ad-4fa2-8614-39cd98d8f5a1 + - name: rhel-version + value: RHEL-8.8.0-20230413.2 + - name: repo-baseos-url + value: 'http://download.eng.bos.redhat.com/rhel-8/nightly/RHEL-8/RHEL-8.8.0-20230413.2/compose/BaseOS/x86_64/os' + - name: repo-appstream-url + value: 'http://download.eng.bos.redhat.com/rhel-8/nightly/RHEL-8/RHEL-8.8.0-20230413.2/compose/AppStream/x86_64/os' + - name: downloadable-url + value: https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: nightly/rhel/RHEL-8.8.0-20230413.2 + - name: run-integration + value: "false" + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + timeout: "5h" \ No newline at end of file diff --git a/catalog/pipelines/crc-qe-virtualized/0.5/samples/rhel9.2.0-nightly.yaml b/catalog/pipelines/crc-qe-virtualized/0.5/samples/rhel9.2.0-nightly.yaml new file mode 100644 index 0000000..6df4c58 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.5/samples/rhel9.2.0-nightly.yaml @@ -0,0 +1,30 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-rhel920- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: image-id + value: 9185cfce-b2ba-47a5-af2f-17146652bcfe + - name: rhel-version + value: RHEL-9.2.0-20230414.17 + - name: repo-baseos-url + value: 'http://download.eng.bos.redhat.com/rhel-9/nightly/RHEL-9/RHEL-9.2.0-20230414.17/compose/BaseOS/x86_64/os' + - name: repo-appstream-url + value: 'http://download.eng.bos.redhat.com/rhel-9/nightly/RHEL-9/RHEL-9.2.0-20230414.17/compose/AppStream/x86_64/os' + - name: rh-account-secret + value: credentials-rh-subs-crcqe-prod + - name: downloadable-url + value: https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: 'nightly/rhel/RHEL-9.2.0-20230414.17' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + timeout: "5h" \ No newline at end of file diff --git a/catalog/pipelines/crc-qe-virtualized/0.5/samples/windows11-22h2-ent-pre-release.yaml b/catalog/pipelines/crc-qe-virtualized/0.5/samples/windows11-22h2-ent-pre-release.yaml new file mode 100644 index 0000000..d7c13dd --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.5/samples/windows11-22h2-ent-pre-release.yaml @@ -0,0 +1,36 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-windows11-22h2-ent- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: target-platform + value: windows + - name: windows-version + value: '11' + - name: windows-featurepack + value: 22h2-ent + - name: windows-vmsize + value: Standard_D8s_v3 + - name: internal-base-url + value: https://download.eng.bos.redhat.com/etera/crc/2/2.20/2.20.0-1/staging + - name: internal-asset-name + value: crc-windows-installer.zip + - name: internal-shasum-name + value: sha256sum.txt + - name: shasum-file + value: sha256sum.txt + - name: e2e-tag + value: '@basic' + - name: run-integration + value: "false" + - name: s3-folder-path + value: 'release/2.20.0' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.5/samples/windows11-22h2-ent.yaml b/catalog/pipelines/crc-qe-virtualized/0.5/samples/windows11-22h2-ent.yaml new file mode 100644 index 0000000..0931d99 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.5/samples/windows11-22h2-ent.yaml @@ -0,0 +1,26 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-windows11-22h2-ent- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: target-platform + value: windows + - name: windows-version + value: '11' + - name: windows-featurepack + value: 22h2-ent + - name: downloadable-url + value: https://developers.redhat.com/content-gateway/rest/mirror2/pub/openshift-v4/clients/crc/2.18.0 + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: 'release/2.18.0' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.5/samples/windows11-22h2-pro.yaml b/catalog/pipelines/crc-qe-virtualized/0.5/samples/windows11-22h2-pro.yaml new file mode 100644 index 0000000..5461f55 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.5/samples/windows11-22h2-pro.yaml @@ -0,0 +1,26 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-windows11-22h2-pro- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: target-platform + value: windows + - name: windows-version + value: '11' + - name: windows-featurepack + value: 22h2-pro + - name: downloadable-url + value: https://developers.redhat.com/content-gateway/rest/mirror2/pub/openshift-v4/clients/crc/2.18.0 + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: 'release/2.18.0' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.6/README.md b/catalog/pipelines/crc-qe-virtualized/0.6/README.md new file mode 100644 index 0000000..06f232d --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.6/README.md @@ -0,0 +1,44 @@ +# Overview + +This pipeline allows to run the qe phase on externally build distribution of crc. +The target host will be self provisioned. + +## Params + +TBC + +## Required tasks + +This pipeline relies on several tasks which should be deployed to allow deploy its spec + +```yaml +oc apply -f catalog/task/gather-run-info/0.1/gather-run-info.yaml +oc apply -f catalog/task/gather-crc-info/0.1/gather-crc-info.yaml +oc apply -f catalog/task/crc-preparer/0.2/crc-preparer.yaml +oc apply -f catalog/task/crc-qe-cli/0.1/crc-qe-cli.yaml +oc apply -f catalog/task/infra-fedora-provision/0.1/infra-fedora-provision.yaml +oc apply -f catalog/task/infra-fedora-decommission/0.1/infra-fedora-decommission.yaml +oc apply -f catalog/task/infra-rhel-provision/0.1/infra-rhel-provision.yaml +oc apply -f catalog/task/infra-rhel-decommission/0.1/infra-rhel-decommission.yaml +#REVIEW +oc apply -f catalog/task/gather-run-info/0.1/gather-run-info.yaml +oc apply -f catalog/task/gather-host-info/0.1/gather-host-info.yaml +oc apply -f catalog/task/gather-crc-info/0.1/gather-crc-info.yaml +oc apply -f catalog/task/gather-s3-info/0.1/gather-s3-info.yaml +oc apply -f catalog/task/asset-checker-http/0.1/asset-checker-http.yaml +oc apply -f catalog/task/crc-preparer/0.2/crc-preparer.yaml +oc apply -f catalog/task/crc-builder-tray/0.3/crc-builder-tray-mac-universal.yaml +oc apply -f catalog/task/crc-builder-tray/0.3/crc-builder-tray-x64.yaml +oc apply -f catalog/task/crc-builder-installer/0.3/crc-builder-installer.yaml +oc apply -f orchestrator/catalog/task/crc-qe-cli/0.1/crc-qe-cli.yaml +oc apply -f catalog/task/s3-sink-workspace/0.3/s3-sink-workspace.yaml +oc apply -f catalog/task/url-generator/0.1/url-generator.yamls +``` + +### workspace + +The task uses a workspace to copy files which are required across the pipeline. As an example +the host key is copied to the workspace and the path is exposed through `workspace-resources-path`. + +Then any other task across the pipeline which uses the workspace can access the key to use for ssh into +the target host. diff --git a/catalog/pipelines/crc-qe-virtualized/0.6/crc-qe-virtualized.yaml b/catalog/pipelines/crc-qe-virtualized/0.6/crc-qe-virtualized.yaml new file mode 100644 index 0000000..83de78e --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.6/crc-qe-virtualized.yaml @@ -0,0 +1,675 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: Pipeline +metadata: + name: crc-qe-virtualized + labels: + app.kubernetes.io/version: "0.6" + redhat.com/product: openshift-local + redhat.com/phase: qe + annotations: + tekton.dev/pipelines.minVersion: "0.24.x" + tekton.dev/categories: qe + tekton.dev/tags: openshift-local, qe, nested virualization + tekton.dev/displayName: "qe for openshift local" + tekton.dev/platforms: "linux/amd64" +spec: + description: >- + This pipeline will run the testing for openshift local on + a specific linux version based on nested virtualization + + workspaces: + - name: pipelines-data + # This is required when targets are spin on AWS + - name: aws-credentials + # optional: true + description: | + ocp secret holding the aws credentials. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: aws-${name} + labels: + app.kubernetes.io/component: ${name} + app.kubernetes.io/part-of: qe-platform + type: Opaque + data: + access-key: ${access_key} + secret-key: ${secret_key} + region: ${region} + # This is required when targets are spin on Azure + - name: az-credentials + # optional: true + description: | + ocp secret holding the azure credentials. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: az-${name} + labels: + app.kubernetes.io/component: ${name} + app.kubernetes.io/part-of: qe-platform + type: Opaque + data: + tenant_id: ${tenant_id} + subscription_id: ${subscription_id} + client_id: ${client_id} + client_secret: ${client_secret} + - name: rh-account-secret + optional: true + description: | + ocp secret holding the credentials for a valid rh user to subscribe VM. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: credentials-${configname} + type: Opaque + data: + user: ${user} + password: ${password} + - name: reportportal-credentials + description: | + ocp secret holding the report portal credentials. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: XXX + type: Opaque + data: + token: XXXX + url: XXXX + project: XXXX + + params: + # Windows related params + - name: windows-featurepack + description: windows feature pack (default "22h2-pro") + # default: 22h2-pro + default: "''" + - name: windows-version + description: Major version for windows desktop 10 or 11 (default "11") + # default: '11' + default: "''" + - name: windows-vmsize + description: Size of azure machine for running the windows system + default: Standard_D8ds_v4 + + # Fedora related params + - name: fedora-version + description: Fedora Cloud version (i.e 39, 38, 37...) + default: "''" + + # Rhel related params + - name: rhel-version + description: Major.Minor RHEL version (i.e 9.3, 9.2, 9,1...) + default: "''" + + # CRC params + - name: internal-base-url + description: in case of an internal release we can not directly download it but upload fisrt to s3. This setup the base url for the assets to be uploaded + default: "''" + - name: internal-asset-name + description: asset name to be uploaded + default: "''" + - name: internal-shasum-name + description: shasum name to be uploaded + default: "''" + - name: internal-shasum-target-name + description: setup the name for the internal shasum on s3 + default: "''" + - name: downloadable-url + description: full base url to download ditributables and shasumsfiles + default: '' + - name: shasum-file + description: file name for shasum to check distributable + default: sha256sum.txt + + # QE params + - name: e2e-tag + description: tags to select e2e scnearios. Default empty values which means all scnearios + default: "''" + - name: qe-worspace-subpath + description: subpath on workspace where storing ephemeral qe results + default: qe-results + - name: run-e2e + description: Control if e2e tests are executed. (true or false) + default: 'true' + - name: run-integration + description: Control if integration tests are executed. (true or false) + default: 'true' + + # S3 params (Storage results) + - name: s3-data-secret + default: datalake-aws + - name: s3-bucket + default: crcqe-asia + - name: s3-folder-path + description: target folder to store results. (Example release/2.9.0) + + # Pipeline control params + - name: debug + description: control verbosity and keep instances after run for troubleshooting. + default: 'false' + + results: + - name: results-url + description: url to get results for the execution + value: $(tasks.url-generator.results.url) + - name: product-version + description: product version tested for this interop + value: $(tasks.crc-info.results.crc-version) + - name: qe-duration + description: amount of time in seconds for qe execution (testing) + value: $(tasks.qe.results.duration) + + tasks: + - name: correlate + taskRef: + name: gather-run-info + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: host-info + runAfter: + - correlate + params: + - name: fedora-version + value: $(params.fedora-version) + - name: rhel-version + value: $(params.rhel-version) + - name: windows-version + value: $(params.windows-version)$(params.windows-featurepack) + taskSpec: + params: + - name: fedora-version + - name: rhel-version + - name: windows-version + results: + - name: id + - name: platform + steps: + - image: registry.access.redhat.com/ubi9/ubi-minimal + script: | + #!/bin/sh + platform="linux" + id="" + if [[ $(params.fedora-version) != "" ]]; then + id="fedora-x86-$(params.fedora-version)" + fi + if [[ $(params.rhel-version) != "" ]]; then + id="rhel-x86-$(params.rhel-version)" + fi + if [[ $(params.windows-version) != "" ]]; then + platform="windows" + id="windows-x86-$(params.windows-version)" + fi + echo -n "${id}" | tee $(results.id.path) + echo -n "${platform}" | tee $(results.platform.path) + - name: s3-info + runAfter: + - host-info + taskRef: + name: gather-s3-info + params: + - name: s3-data-secret + value: $(params.s3-data-secret) + - name: bucket + value: $(params.s3-bucket) + - name: folder-path + value: $(params.s3-folder-path)/$(tasks.host-info.results.id) + - name: internal-asset-upload + when: + - input: $(params.internal-base-url) + operator: notin + values: ["''"] + - input: $(params.internal-asset-name) + operator: notin + values: ["''"] + runAfter: + - s3-info + taskRef: + name: s3-sync-http + params: + - name: asset-url + value: $(params.internal-base-url)/$(params.internal-asset-name) + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: s3-asset-name + value: $(params.internal-asset-name) + timeout: "15m" + - name: internal-shasum-upload + when: + - input: $(params.internal-base-url) + operator: notin + values: ["''"] + - input: $(params.internal-shasum-name) + operator: notin + values: ["''"] + runAfter: + - s3-info + taskRef: + name: s3-sync-http + params: + - name: asset-url + value: $(params.internal-base-url)/$(params.internal-shasum-name) + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: s3-asset-name + value: $(params.internal-shasum-name) + timeout: "15m" + - name: url-picker + runAfter: + - s3-info + taskRef: + name: url-picker + params: + - name: internal-base-url + value: $(params.internal-base-url) + - name: public-base-url + value: $(tasks.s3-info.results.download-url) + - name: external-base-url + value: $(params.downloadable-url) + - name: crc-info + runAfter: + - host-info + taskRef: + name: gather-crc-info + params: + - name: platform + value: $(tasks.host-info.results.platform) + - name: provision-fedora + runAfter: + - s3-info + - crc-info + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/rhqp/qenvs-tkn:v0.6.2 + - name: name + value: infra-aws-fedora + - name: kind + value: task + when: + - input: $(params.fedora-version) + operator: notin + values: ["''"] + params: + - name: project-name + value: crc-qe-virtualized-fedora-$(tasks.correlate.results.correlation) + - name: version + value: $(params.fedora-version) + - name: operation + value: create + - name: ws-output-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: storage + workspace: pipelines-data + - name: aws-credentials + workspace: aws-credentials + timeout: "20m" + - name: provision-rhel + runAfter: + - s3-info + - crc-info + when: + - input: $(params.rhel-version) + operator: notin + values: ["''"] + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/rhqp/qenvs-tkn:v0.6.2 + - name: name + value: infra-aws-rhel + - name: kind + value: task + params: + - name: project-name + value: crc-qe-virtualized-rhel-$(tasks.correlate.results.correlation) + - name: version + value: $(params.rhel-version) + - name: operation + value: create + - name: ws-output-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: storage + workspace: pipelines-data + - name: aws-credentials + workspace: aws-credentials + - name: rh-account-secret + workspace: rh-account-secret + timeout: "20m" + - name: provision-windows + runAfter: + - s3-info + - crc-info + when: + - input: $(params.windows-featurepack) + operator: notin + values: ["''"] + - input: $(params.windows-version) + operator: notin + values: ["''"] + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/rhqp/qenvs-tkn:v0.6.2 + - name: name + value: infra-azure-windows-desktop + - name: kind + value: task + params: + - name: project-name + value: podman-backend-qe-$(tasks.correlate.results.correlation) + - name: operation + value: create + - name: windows-featurepack + value: $(params.windows-featurepack) + - name: windows-version + value: $(params.windows-version) + - name: vmsize + value: $(params.windows-vmsize) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: az-credentials + workspace: az-credentials + timeout: "20m" + - name: sync-provision + runAfter: + - provision-fedora + - provision-rhel + - provision-windows + taskRef: + name: infra-syncer + params: + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "20m" + - name: install + runAfter: + - sync-provision + - internal-asset-upload + - internal-shasum-upload + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/rhqp/crc-support-tkn:v0.5 + - name: name + value: crc-support + - name: kind + value: task + params: + - name: os + value: $(tasks.host-info.results.platform) + - name: host + value: $(tasks.sync-provision.results.host) + - name: username + value: $(tasks.sync-provision.results.username) + - name: key + value: $(tasks.sync-provision.results.key-filename) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + # Preparing crc version is only used for target path storage + - name: downloadable-version + value: $(tasks.crc-info.results.crc-version) + - name: downloadable-url + # Only accessible url within downloadable-url or internal uploaded composed url + value: $(tasks.url-picker.results.base-url) + - name: shasum-file + value: $(params.shasum-file) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "1h" + - name: qe + runAfter: + - install + taskRef: + name: crc-qe-cli + params: + - name: platform + value: $(tasks.host-info.results.platform) + - name: ip + value: $(tasks.sync-provision.results.host) + - name: username + value: $(tasks.sync-provision.results.username) + - name: key + value: $(tasks.sync-provision.results.key-filename) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: worspace-qe-subpath + value: $(params.qe-worspace-subpath) + # This is used to run e2e and integration containers + # Need to integrate a build from main and make it accessible + # For the time been we are good with latest released version + - name: crc-version + value: $(tasks.crc-info.results.crc-version) + - name: run-e2e + value: $(params.run-e2e) + - name: e2e-tag + value: $(params.e2e-tag) + - name: run-integration + value: $(params.run-integration) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "5h" + - name: reportportal-import + runAfter: + - qe + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/rhqp/reportportal:v1.0.0 + - name: name + value: reportportal-import + - name: kind + value: task + params: + - name: results-id + value: crc-$(tasks.crc-info.results.crc-version)-$(tasks.host-info.results.id) + - name: results-wsstorage-path + value: $(tasks.correlate.results.workspace-resources-path)/$(params.qe-worspace-subpath) + - name: debug + # value: $(params.debug) + value: 'true' + workspaces: + - name: storage + workspace: pipelines-data + - name: reportportal-credentials + workspace: reportportal-credentials + timeout: "15m" + - name: datalake-sink + runAfter: + - qe + taskRef: + name: s3-sink-workspace + params: + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: workspace-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: workspace-subpath + value: $(params.qe-worspace-subpath) + # Do not delete to keep tf state to decomission on final + # This task should be splitted to allow only cleaning up + - name: workspace-cleanup + value: 'false' + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "15m" + - name: url-generator + taskRef: + name: url-generator + runAfter: + - datalake-sink + params: + - name: base-url + value: $(tasks.s3-info.results.download-url) + - name: context + value: $(params.qe-worspace-subpath) + - name: asset-name + value: e2e-non-ux.xml + finally: + - name: debug-info + when: + - input: $(params.rhel-version) + operator: notin + values: ["''"] + - input: $(params.debug) + operator: in + values: ["true"] + taskSpec: + workspaces: + - name: pipelines-data + params: + - name: workspace-resources-path + description: path relative to workspace where to store keys + steps: + - name: show-denug-info + image: registry.access.redhat.com/ubi9/ubi-minimal + script: | + #!/bin/sh + workspace_path=$(workspaces.pipelines-data.path)/$(params.workspace-resources-path) + echo "private key" + cat ${workspace_path}/id_rsa + echo "host" + cat ${workspace_path}/host + echo "username" + cat ${workspace_path}/username + params: + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: decomission-fedora + when: + - input: $(params.fedora-version) + operator: notin + values: ["''"] + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/rhqp/qenvs-tkn:v0.6.2 + - name: name + value: infra-aws-fedora + - name: kind + value: task + params: + - name: project-name + value: crc-qe-virtualized-fedora-$(tasks.correlate.results.correlation) + - name: operation + value: destroy + - name: ws-output-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: storage + workspace: pipelines-data + - name: aws-credentials + workspace: aws-credentials + timeout: "20m" + - name: decomission-rhel + when: + - input: $(params.rhel-version) + operator: notin + values: ["''"] + - input: $(params.debug) + operator: in + values: ["false"] + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/rhqp/qenvs-tkn:v0.6.2 + - name: name + value: infra-aws-rhel + - name: kind + value: task + params: + - name: project-name + value: crc-qe-virtualized-rhel-$(tasks.correlate.results.correlation) + - name: version + value: $(params.rhel-version) + - name: operation + value: destroy + - name: ws-output-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: storage + workspace: pipelines-data + - name: aws-credentials + workspace: aws-credentials + - name: decomission-windows + when: + - input: $(params.windows-featurepack) + operator: notin + values: ["''"] + - input: $(params.windows-version) + operator: notin + values: ["''"] + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/rhqp/qenvs-tkn:v0.6.2 + - name: name + value: infra-azure-windows-desktop + - name: kind + value: task + params: + - name: project-name + value: podman-backend-qe-$(tasks.correlate.results.correlation) + - name: operation + value: destroy + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: az-credentials + workspace: az-credentials + timeout: "15m" + + \ No newline at end of file diff --git a/catalog/pipelines/crc-qe-virtualized/0.6/samples/fedora.yaml b/catalog/pipelines/crc-qe-virtualized/0.6/samples/fedora.yaml new file mode 100644 index 0000000..fe8b8a7 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.6/samples/fedora.yaml @@ -0,0 +1,35 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-fedora39- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: fedora-version + value: '39' + - name: internal-base-url + value: https://download.eng.bos.redhat.com/etera/crc/2/2.29/2.29.0/staging + - name: internal-asset-name + value: crc-linux-amd64.tar.xz + - name: internal-shasum-name + value: sha256sum.txt + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: release/2.9.0 + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + - name: aws-credentials + secret: + secretName: aws-crcqe-bot + - name: az-credentials + secret: + secretName: az-crcqe-bot + - name: reportportal-credentials + secret: + secretName: reportportal-crc + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.6/samples/rhel.yaml b/catalog/pipelines/crc-qe-virtualized/0.6/samples/rhel.yaml new file mode 100644 index 0000000..f26b2f1 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.6/samples/rhel.yaml @@ -0,0 +1,38 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-rhel93- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: rhel-version + value: '9.3' + - name: internal-base-url + value: https://download.eng.bos.redhat.com/etera/crc/2/2.29/2.29.0/staging + - name: internal-asset-name + value: crc-linux-amd64.tar.xz + - name: internal-shasum-name + value: sha256sum.txt + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: release/2.29.0 + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + - name: aws-credentials + secret: + secretName: aws-crcqe-bot + - name: az-credentials + secret: + secretName: az-crcqe-bot + - name: rh-account-secret + secret: + secretName: credentials-rh-subs-crcqe-prod + - name: reportportal-credentials + secret: + secretName: reportportal-crc + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.6/samples/windows11-22h2-ent-pre-release.yaml b/catalog/pipelines/crc-qe-virtualized/0.6/samples/windows11-22h2-ent-pre-release.yaml new file mode 100644 index 0000000..9dfa0e5 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.6/samples/windows11-22h2-ent-pre-release.yaml @@ -0,0 +1,43 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-windows11-22h2-ent- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: windows-version + value: '11' + - name: windows-featurepack + value: 22h2-ent + - name: windows-vmsize + value: Standard_D8s_v3 + - name: internal-base-url + value: https://download.eng.bos.redhat.com/etera/crc/2/2.20/2.20.0-1/staging + - name: internal-asset-name + value: crc-windows-installer.zip + - name: internal-shasum-name + value: sha256sum.txt + - name: shasum-file + value: sha256sum.txt + - name: e2e-tag + value: '@basic' + - name: run-integration + value: "false" + - name: s3-folder-path + value: 'release/2.20.0' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + - name: az-credentials + secret: + secretName: az-crcqe-bot + - name: aws-credentials + secret: + secretName: aws-crcqe-bot + - name: reportportal-credentials + secret: + secretName: reportportal-crc + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.6/samples/windows11-22h2-ent.yaml b/catalog/pipelines/crc-qe-virtualized/0.6/samples/windows11-22h2-ent.yaml new file mode 100644 index 0000000..4245135 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.6/samples/windows11-22h2-ent.yaml @@ -0,0 +1,33 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-windows11-22h2-ent- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: windows-version + value: '11' + - name: windows-featurepack + value: 22h2-ent + - name: downloadable-url + value: https://developers.redhat.com/content-gateway/rest/mirror2/pub/openshift-v4/clients/crc/2.18.0 + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: 'release/2.18.0' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + - name: az-credentials + secret: + secretName: az-crcqe-bot + - name: aws-credentials + secret: + secretName: aws-crcqe-bot + - name: reportportal-credentials + secret: + secretName: reportportal-crc + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.6/samples/windows11-22h2-pro.yaml b/catalog/pipelines/crc-qe-virtualized/0.6/samples/windows11-22h2-pro.yaml new file mode 100644 index 0000000..94950df --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.6/samples/windows11-22h2-pro.yaml @@ -0,0 +1,33 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-windows11-22h2-pro- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: windows-version + value: '11' + - name: windows-featurepack + value: 22h2-pro + - name: downloadable-url + value: https://developers.redhat.com/content-gateway/rest/mirror2/pub/openshift-v4/clients/crc/2.18.0 + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: 'release/2.18.0' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + - name: az-credentials + secret: + secretName: az-crcqe-bot + - name: aws-credentials + secret: + secretName: aws-crcqe-bot + - name: reportportal-credentials + secret: + secretName: reportportal-crc + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.7/README.md b/catalog/pipelines/crc-qe-virtualized/0.7/README.md new file mode 100644 index 0000000..06f232d --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.7/README.md @@ -0,0 +1,44 @@ +# Overview + +This pipeline allows to run the qe phase on externally build distribution of crc. +The target host will be self provisioned. + +## Params + +TBC + +## Required tasks + +This pipeline relies on several tasks which should be deployed to allow deploy its spec + +```yaml +oc apply -f catalog/task/gather-run-info/0.1/gather-run-info.yaml +oc apply -f catalog/task/gather-crc-info/0.1/gather-crc-info.yaml +oc apply -f catalog/task/crc-preparer/0.2/crc-preparer.yaml +oc apply -f catalog/task/crc-qe-cli/0.1/crc-qe-cli.yaml +oc apply -f catalog/task/infra-fedora-provision/0.1/infra-fedora-provision.yaml +oc apply -f catalog/task/infra-fedora-decommission/0.1/infra-fedora-decommission.yaml +oc apply -f catalog/task/infra-rhel-provision/0.1/infra-rhel-provision.yaml +oc apply -f catalog/task/infra-rhel-decommission/0.1/infra-rhel-decommission.yaml +#REVIEW +oc apply -f catalog/task/gather-run-info/0.1/gather-run-info.yaml +oc apply -f catalog/task/gather-host-info/0.1/gather-host-info.yaml +oc apply -f catalog/task/gather-crc-info/0.1/gather-crc-info.yaml +oc apply -f catalog/task/gather-s3-info/0.1/gather-s3-info.yaml +oc apply -f catalog/task/asset-checker-http/0.1/asset-checker-http.yaml +oc apply -f catalog/task/crc-preparer/0.2/crc-preparer.yaml +oc apply -f catalog/task/crc-builder-tray/0.3/crc-builder-tray-mac-universal.yaml +oc apply -f catalog/task/crc-builder-tray/0.3/crc-builder-tray-x64.yaml +oc apply -f catalog/task/crc-builder-installer/0.3/crc-builder-installer.yaml +oc apply -f orchestrator/catalog/task/crc-qe-cli/0.1/crc-qe-cli.yaml +oc apply -f catalog/task/s3-sink-workspace/0.3/s3-sink-workspace.yaml +oc apply -f catalog/task/url-generator/0.1/url-generator.yamls +``` + +### workspace + +The task uses a workspace to copy files which are required across the pipeline. As an example +the host key is copied to the workspace and the path is exposed through `workspace-resources-path`. + +Then any other task across the pipeline which uses the workspace can access the key to use for ssh into +the target host. diff --git a/catalog/pipelines/crc-qe-virtualized/0.7/crc-qe-virtualized.yaml b/catalog/pipelines/crc-qe-virtualized/0.7/crc-qe-virtualized.yaml new file mode 100644 index 0000000..11a4653 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.7/crc-qe-virtualized.yaml @@ -0,0 +1,723 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: Pipeline +metadata: + name: crc-qe-virtualized + labels: + app.kubernetes.io/version: "0.7" + redhat.com/product: openshift-local + redhat.com/phase: qe + annotations: + tekton.dev/pipelines.minVersion: "0.24.x" + tekton.dev/categories: qe + tekton.dev/tags: openshift-local, qe, nested virualization + tekton.dev/displayName: "qe for openshift local" + tekton.dev/platforms: "linux/amd64" +spec: + description: >- + This pipeline will run the testing for openshift local on + a specific linux version based on nested virtualization + + workspaces: + - name: pipelines-data + # This is required when targets are spin on AWS + - name: cloud-credentials + # optional: true + description: | + This secret will hold the credentials to the target cloud provider it could match depending on the target: + + ## AWS + ocp secret holding the aws credentials. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: aws-${name} + labels: + app.kubernetes.io/component: ${name} + app.kubernetes.io/part-of: qe-platform + type: Opaque + data: + access-key: ${access_key} + secret-key: ${secret_key} + region: ${region} + + ## Azure + ocp secret holding the azure credentials. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: az-${name} + labels: + app.kubernetes.io/component: ${name} + app.kubernetes.io/part-of: qe-platform + type: Opaque + data: + tenant_id: ${tenant_id} + subscription_id: ${subscription_id} + client_id: ${client_id} + client_secret: ${client_secret} + - name: rh-account-secret + optional: true + description: | + ocp secret holding the credentials for a valid rh user to subscribe VM. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: credentials-${configname} + type: Opaque + data: + user: ${user} + password: ${password} + - name: reportportal-credentials + description: | + ocp secret holding the report portal credentials. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: XXX + type: Opaque + data: + token: XXXX + url: XXXX + project: XXXX + - name: ocp-pullsecret + description: | + crc secret name holding the pullsecret. This is only required if backed tested is crc preset + + secret should match following format: + --- + apiVersion: v1 + kind: Secret + metadata: + name: ${secret-name} + type: Opaque + data: + pullsecret: ${pullsecret-value} + + params: + # Windows related params + - name: windows-featurepack + description: windows feature pack (default "22h2-pro") + # default: 22h2-pro + default: "''" + - name: windows-version + description: Major version for windows desktop 10 or 11 (default "11") + # default: '11' + default: "''" + - name: windows-vmsize + description: Size of azure machine for running the windows system + default: Standard_D8ds_v4 + + # Fedora related params + - name: fedora-version + description: Fedora Cloud version (i.e 39, 38, 37...) + default: "''" + + # Rhel related params + - name: rhel-version + description: Major.Minor RHEL version (i.e 9.3, 9.2, 9,1...) + default: "''" + + # CRC params + - name: internal-base-url + description: in case of an internal release we can not directly download it but upload fisrt to s3. This setup the base url for the assets to be uploaded + default: "''" + - name: internal-asset-name + description: asset name to be uploaded + default: "''" + - name: internal-shasum-name + description: shasum name to be uploaded + default: "''" + - name: internal-shasum-target-name + description: setup the name for the internal shasum on s3 + default: "''" + - name: downloadable-url + description: full base url to download ditributables and shasumsfiles + default: '' + - name: shasum-file + description: file name for shasum to check distributable + default: sha256sum.txt + + # QE params + - name: e2e-tag + description: tags to select e2e scnearios. Default empty values which means all scnearios + default: "''" + - name: qe-worspace-subpath + description: subpath on workspace where storing ephemeral qe results + default: qe-results + - name: run-e2e + description: Control if e2e tests are executed. (true or false) + default: 'true' + - name: run-integration + description: Control if integration tests are executed. (true or false) + default: 'true' + - name: test-catelog + description: used for catelog in reportportal launch, nightly-run, bundle-test, crc-release-test + default: 'crc-release-test' + + # S3 params (Storage results) + - name: s3-data-secret + default: datalake-aws + - name: s3-bucket + default: crcqe-asia + - name: s3-folder-path + description: target folder to store results. (Example release/2.9.0) + + # Pipeline control params + - name: debug + description: control verbosity and keep instances after run for troubleshooting. + default: 'false' + - name: target-cleanup + description: cleanup target ephemeral target folders on each step which requires them + default: 'true' + + results: + - name: e2e-results-url + value: $(tasks.e2e-url-generator.results.url) + - name: integration-results-url + value: $(tasks.integration-url-generator.results.url) + + tasks: + - name: correlate + taskRef: + name: gather-run-info + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: host-info + runAfter: + - correlate + params: + - name: fedora-version + value: $(params.fedora-version) + - name: rhel-version + value: $(params.rhel-version) + - name: windows-version + value: $(params.windows-version)$(params.windows-featurepack) + taskSpec: + params: + - name: fedora-version + - name: rhel-version + - name: windows-version + results: + - name: id + - name: os + - name: arch + steps: + - image: registry.access.redhat.com/ubi9/ubi-minimal + script: | + #!/bin/sh + arch="amd64" + os="linux" + id="" + if [[ $(params.fedora-version) != "" ]]; then + id="fedora-x86-$(params.fedora-version)" + fi + if [[ $(params.rhel-version) != "" ]]; then + id="rhel-x86-$(params.rhel-version)" + fi + if [[ $(params.windows-version) != "" ]]; then + os="windows" + id="windows-x86-$(params.windows-version)" + fi + echo -n "${id}" | tee $(results.id.path) + echo -n "${os}" | tee $(results.os.path) + echo -n "${arch}" | tee $(results.arch.path) + - name: s3-info + runAfter: + - host-info + taskRef: + name: gather-s3-info + params: + - name: s3-data-secret + value: $(params.s3-data-secret) + - name: bucket + value: $(params.s3-bucket) + - name: folder-path + value: $(params.s3-folder-path)/$(tasks.host-info.results.id) + - name: internal-asset-upload + when: + - input: $(params.internal-base-url) + operator: notin + values: ["''"] + - input: $(params.internal-asset-name) + operator: notin + values: ["''"] + runAfter: + - s3-info + taskRef: + name: s3-sync-http + params: + - name: asset-url + value: $(params.internal-base-url)/$(params.internal-asset-name) + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: s3-asset-name + value: $(params.internal-asset-name) + timeout: "15m" + - name: internal-shasum-upload + when: + - input: $(params.internal-base-url) + operator: notin + values: ["''"] + - input: $(params.internal-shasum-name) + operator: notin + values: ["''"] + runAfter: + - s3-info + taskRef: + name: s3-sync-http + params: + - name: asset-url + value: $(params.internal-base-url)/$(params.internal-shasum-name) + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: s3-asset-name + value: $(params.internal-shasum-name) + timeout: "15m" + - name: url-picker + runAfter: + - s3-info + taskRef: + name: url-picker + params: + - name: internal-base-url + value: $(params.internal-base-url) + - name: public-base-url + value: $(tasks.s3-info.results.download-url) + - name: external-base-url + value: $(params.downloadable-url) + - name: crc-info + runAfter: + - host-info + taskRef: + name: gather-crc-info + params: + - name: platform + value: $(tasks.host-info.results.os) + - name: provision-fedora + runAfter: + - s3-info + - crc-info + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/redhat-developer/mapt@sha256:a797bb68bce47fef5c150cfeb9cee7f519c8d254901c463f5835eab3af3e80e4 #v0.6.9-tkn + - name: name + value: infra-aws-fedora + - name: kind + value: task + when: + - input: $(params.fedora-version) + operator: notin + values: ["''"] + params: + - name: project-name + value: crc-qe-virtualized-fedora-$(tasks.correlate.results.correlation) + - name: version + value: $(params.fedora-version) + - name: operation + value: create + - name: ws-output-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: storage + workspace: pipelines-data + - name: aws-credentials + workspace: cloud-credentials + timeout: "20m" + - name: provision-rhel + runAfter: + - s3-info + - crc-info + when: + - input: $(params.rhel-version) + operator: notin + values: ["''"] + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/redhat-developer/mapt@sha256:a797bb68bce47fef5c150cfeb9cee7f519c8d254901c463f5835eab3af3e80e4 #v0.6.9-tkn + - name: name + value: infra-aws-rhel + - name: kind + value: task + params: + - name: project-name + value: crc-qe-virtualized-rhel-$(tasks.correlate.results.correlation) + - name: version + value: $(params.rhel-version) + - name: operation + value: create + - name: ws-output-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: storage + workspace: pipelines-data + - name: aws-credentials + workspace: cloud-credentials + - name: rh-account-secret + workspace: rh-account-secret + timeout: "20m" + - name: provision-windows + runAfter: + - s3-info + - crc-info + when: + - input: $(params.windows-featurepack) + operator: notin + values: ["''"] + - input: $(params.windows-version) + operator: notin + values: ["''"] + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/redhat-developer/mapt@sha256:a797bb68bce47fef5c150cfeb9cee7f519c8d254901c463f5835eab3af3e80e4 #v0.6.9-tkn + - name: name + value: infra-azure-windows-desktop + - name: kind + value: task + params: + - name: project-name + value: podman-backend-qe-$(tasks.correlate.results.correlation) + - name: operation + value: create + - name: windows-featurepack + value: $(params.windows-featurepack) + - name: windows-version + value: $(params.windows-version) + - name: vmsize + value: $(params.windows-vmsize) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: az-credentials + workspace: cloud-credentials + timeout: "20m" + - name: sync-provision + runAfter: + - provision-fedora + - provision-rhel + - provision-windows + taskRef: + name: infra-syncer + params: + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "20m" + - name: install + runAfter: + - sync-provision + - internal-asset-upload + - internal-shasum-upload + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/rhqp/crc-support-tkn:v0.5 + - name: name + value: crc-support + - name: kind + value: task + params: + - name: os + value: $(tasks.host-info.results.os) + - name: host + value: $(tasks.sync-provision.results.host) + - name: username + value: $(tasks.sync-provision.results.username) + - name: key + value: $(tasks.sync-provision.results.key-filename) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + # Preparing crc version is only used for target path storage + - name: downloadable-version + value: $(tasks.crc-info.results.crc-version) + - name: downloadable-url + # Only accessible url within downloadable-url or internal uploaded composed url + value: $(tasks.url-picker.results.base-url) + - name: shasum-file + value: $(params.shasum-file) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "1h" + - name: qe + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/rhqp/crc-e2e-tkn:v1.0.0 + - name: name + value: crc-e2e + - name: kind + value: task + runAfter: + - install + params: + - name: os + value: $(tasks.host-info.results.os) + - name: arch + value: $(tasks.host-info.results.arch) + - name: host + value: $(tasks.sync-provision.results.host) + - name: username + value: $(tasks.sync-provision.results.username) + - name: key + value: $(tasks.sync-provision.results.key-filename) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: worspace-qe-subpath + value: $(params.qe-worspace-subpath) + - name: crc-version + value: $(tasks.crc-info.results.crc-version) + - name: run-e2e + value: $(params.run-e2e) + - name: e2e-tag + value: $(params.e2e-tag) + - name: e2e-cleanup-target + value: $(params.target-cleanup) + - name: run-integration + value: $(params.run-integration) + - name: integration-cleanup-target + value: $(params.target-cleanup) + - name: debug + value: $(params.debug) + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: ocp-pullsecret + workspace: ocp-pullsecret + timeout: "5h" + - name: reportportal-import + runAfter: + - qe + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/rhqp/reportportal:v1.1.1 + - name: name + value: reportportal-import + - name: kind + value: task + params: + - name: results-id + value: crc-$(tasks.crc-info.results.crc-version)-$(tasks.host-info.results.id) + - name: results-wsstorage-path + value: $(tasks.correlate.results.workspace-resources-path)/$(params.qe-worspace-subpath) + - name: debug + # value: $(params.debug) + value: 'true' + - name: launch-attributes + value: {"attributes": [{"key":"crc-version","value":"$(tasks.crc-info.results.crc-version)"}, {"key": "skippedIssue", "value": true}]} + - name: launch-description + value: $(params.test-catelog) + workspaces: + - name: storage + workspace: pipelines-data + - name: reportportal-credentials + workspace: reportportal-credentials + timeout: "15m" + - name: datalake-sink + runAfter: + - qe + taskRef: + name: s3-sink-workspace + params: + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: workspace-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: workspace-subpath + value: $(params.qe-worspace-subpath) + # Do not delete to keep tf state to decomission on final + # This task should be splitted to allow only cleaning up + - name: workspace-cleanup + value: 'false' + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "15m" + - name: integration-url-generator + taskRef: + name: url-generator + runAfter: + - datalake-sink + params: + - name: base-url + value: $(tasks.s3-info.results.download-url) + - name: context + value: $(params.qe-worspace-subpath) + - name: asset-name + value: integration-junit.xml + - name: e2e-url-generator + taskRef: + name: url-generator + runAfter: + - datalake-sink + params: + - name: base-url + value: $(tasks.s3-info.results.download-url) + - name: context + value: $(params.qe-worspace-subpath) + - name: asset-name + value: e2e-junit.xml + finally: + - name: debug-info + when: + - input: $(params.rhel-version) + operator: notin + values: ["''"] + - input: $(params.debug) + operator: in + values: ["true"] + taskSpec: + workspaces: + - name: pipelines-data + params: + - name: workspace-resources-path + description: path relative to workspace where to store keys + steps: + - name: show-denug-info + image: registry.access.redhat.com/ubi9/ubi-minimal + script: | + #!/bin/sh + workspace_path=$(workspaces.pipelines-data.path)/$(params.workspace-resources-path) + echo "private key" + cat ${workspace_path}/id_rsa + echo "host" + cat ${workspace_path}/host + echo "username" + cat ${workspace_path}/username + params: + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: decomission-fedora + when: + - input: $(params.fedora-version) + operator: notin + values: ["''"] + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/redhat-developer/mapt@sha256:a797bb68bce47fef5c150cfeb9cee7f519c8d254901c463f5835eab3af3e80e4 #v0.6.9-tkn + - name: name + value: infra-aws-fedora + - name: kind + value: task + params: + - name: project-name + value: crc-qe-virtualized-fedora-$(tasks.correlate.results.correlation) + - name: operation + value: destroy + - name: ws-output-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: storage + workspace: pipelines-data + - name: aws-credentials + workspace: cloud-credentials + timeout: "20m" + - name: decomission-rhel + when: + - input: $(params.rhel-version) + operator: notin + values: ["''"] + - input: $(params.debug) + operator: in + values: ["false"] + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/redhat-developer/mapt@sha256:a797bb68bce47fef5c150cfeb9cee7f519c8d254901c463f5835eab3af3e80e4 #v0.6.9-tkn + - name: name + value: infra-aws-rhel + - name: kind + value: task + params: + - name: project-name + value: crc-qe-virtualized-rhel-$(tasks.correlate.results.correlation) + - name: version + value: $(params.rhel-version) + - name: operation + value: destroy + - name: ws-output-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: storage + workspace: pipelines-data + - name: aws-credentials + workspace: cloud-credentials + - name: decomission-windows + when: + - input: $(params.windows-featurepack) + operator: notin + values: ["''"] + - input: $(params.windows-version) + operator: notin + values: ["''"] + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/redhat-developer/mapt@sha256:a797bb68bce47fef5c150cfeb9cee7f519c8d254901c463f5835eab3af3e80e4 #v0.6.9-tkn + - name: name + value: infra-azure-windows-desktop + - name: kind + value: task + params: + - name: project-name + value: podman-backend-qe-$(tasks.correlate.results.correlation) + - name: operation + value: destroy + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: az-credentials + workspace: cloud-credentials + timeout: "15m" + + diff --git a/catalog/pipelines/crc-qe-virtualized/0.7/samples/fedora.yaml b/catalog/pipelines/crc-qe-virtualized/0.7/samples/fedora.yaml new file mode 100644 index 0000000..003f8f5 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.7/samples/fedora.yaml @@ -0,0 +1,35 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-fedora39- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: fedora-version + value: '39' + - name: internal-base-url + value: https://download.eng.bos.redhat.com/etera/crc/2/2.29/2.29.0/staging + - name: internal-asset-name + value: crc-linux-amd64.tar.xz + - name: internal-shasum-name + value: sha256sum.txt + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: release/2.9.0 + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + - name: cloud-credentials + secret: + secretName: aws-crcqe-bot + - name: ocp-pullsecret + secret: + secretName: crc-crc-qe + - name: reportportal-credentials + secret: + secretName: reportportal-crc + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.7/samples/rhel.yaml b/catalog/pipelines/crc-qe-virtualized/0.7/samples/rhel.yaml new file mode 100644 index 0000000..d56a8a9 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.7/samples/rhel.yaml @@ -0,0 +1,38 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-rhel93- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: rhel-version + value: '9.3' + - name: internal-base-url + value: https://download.eng.bos.redhat.com/etera/crc/2/2.29/2.29.0/staging + - name: internal-asset-name + value: crc-linux-amd64.tar.xz + - name: internal-shasum-name + value: sha256sum.txt + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: release/2.29.0 + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + - name: cloud-credentials + secret: + secretName: aws-crcqe-bot + - name: rh-account-secret + secret: + secretName: credentials-rh-subs-crcqe-prod + - name: ocp-pullsecret + secret: + secretName: crc-crc-qe + - name: reportportal-credentials + secret: + secretName: reportportal-crc + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.7/samples/windows11-22h2-ent-pre-release.yaml b/catalog/pipelines/crc-qe-virtualized/0.7/samples/windows11-22h2-ent-pre-release.yaml new file mode 100644 index 0000000..91b7fa3 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.7/samples/windows11-22h2-ent-pre-release.yaml @@ -0,0 +1,43 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-windows11-22h2-ent- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: windows-version + value: '11' + - name: windows-featurepack + value: 22h2-ent + - name: windows-vmsize + value: Standard_D8s_v3 + - name: internal-base-url + value: https://download.eng.bos.redhat.com/etera/crc/2/2.20/2.20.0-1/staging + - name: internal-asset-name + value: crc-windows-installer.zip + - name: internal-shasum-name + value: sha256sum.txt + - name: shasum-file + value: sha256sum.txt + - name: e2e-tag + value: '@basic' + - name: run-integration + value: "false" + - name: s3-folder-path + value: 'release/2.20.0' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + - name: cloud-credentials + secret: + secretName: az-crcqe-bot + - name: ocp-pullsecret + secret: + secretName: crc-crc-qe + - name: reportportal-credentials + secret: + secretName: reportportal-crc + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.7/samples/windows11-22h2-ent.yaml b/catalog/pipelines/crc-qe-virtualized/0.7/samples/windows11-22h2-ent.yaml new file mode 100644 index 0000000..9eafe7d --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.7/samples/windows11-22h2-ent.yaml @@ -0,0 +1,33 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-windows11-22h2-ent- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: windows-version + value: '11' + - name: windows-featurepack + value: 22h2-ent + - name: downloadable-url + value: https://developers.redhat.com/content-gateway/rest/mirror2/pub/openshift-v4/clients/crc/2.18.0 + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: 'release/2.18.0' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + - name: cloud-credentials + secret: + secretName: az-crcqe-bot + - name: ocp-pullsecret + secret: + secretName: crc-crc-qe + - name: reportportal-credentials + secret: + secretName: reportportal-crc + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.7/samples/windows11-22h2-pro.yaml b/catalog/pipelines/crc-qe-virtualized/0.7/samples/windows11-22h2-pro.yaml new file mode 100644 index 0000000..6f2e248 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.7/samples/windows11-22h2-pro.yaml @@ -0,0 +1,33 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-windows11-22h2-pro- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: windows-version + value: '11' + - name: windows-featurepack + value: 22h2-pro + - name: downloadable-url + value: https://developers.redhat.com/content-gateway/rest/mirror2/pub/openshift-v4/clients/crc/2.18.0 + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: 'release/2.18.0' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + - name: cloud-credentials + secret: + secretName: az-crcqe-bot + - name: ocp-pullsecret + secret: + secretName: crc-crc-qe + - name: reportportal-credentials + secret: + secretName: reportportal-crc + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.8/README.md b/catalog/pipelines/crc-qe-virtualized/0.8/README.md new file mode 100644 index 0000000..06f232d --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.8/README.md @@ -0,0 +1,44 @@ +# Overview + +This pipeline allows to run the qe phase on externally build distribution of crc. +The target host will be self provisioned. + +## Params + +TBC + +## Required tasks + +This pipeline relies on several tasks which should be deployed to allow deploy its spec + +```yaml +oc apply -f catalog/task/gather-run-info/0.1/gather-run-info.yaml +oc apply -f catalog/task/gather-crc-info/0.1/gather-crc-info.yaml +oc apply -f catalog/task/crc-preparer/0.2/crc-preparer.yaml +oc apply -f catalog/task/crc-qe-cli/0.1/crc-qe-cli.yaml +oc apply -f catalog/task/infra-fedora-provision/0.1/infra-fedora-provision.yaml +oc apply -f catalog/task/infra-fedora-decommission/0.1/infra-fedora-decommission.yaml +oc apply -f catalog/task/infra-rhel-provision/0.1/infra-rhel-provision.yaml +oc apply -f catalog/task/infra-rhel-decommission/0.1/infra-rhel-decommission.yaml +#REVIEW +oc apply -f catalog/task/gather-run-info/0.1/gather-run-info.yaml +oc apply -f catalog/task/gather-host-info/0.1/gather-host-info.yaml +oc apply -f catalog/task/gather-crc-info/0.1/gather-crc-info.yaml +oc apply -f catalog/task/gather-s3-info/0.1/gather-s3-info.yaml +oc apply -f catalog/task/asset-checker-http/0.1/asset-checker-http.yaml +oc apply -f catalog/task/crc-preparer/0.2/crc-preparer.yaml +oc apply -f catalog/task/crc-builder-tray/0.3/crc-builder-tray-mac-universal.yaml +oc apply -f catalog/task/crc-builder-tray/0.3/crc-builder-tray-x64.yaml +oc apply -f catalog/task/crc-builder-installer/0.3/crc-builder-installer.yaml +oc apply -f orchestrator/catalog/task/crc-qe-cli/0.1/crc-qe-cli.yaml +oc apply -f catalog/task/s3-sink-workspace/0.3/s3-sink-workspace.yaml +oc apply -f catalog/task/url-generator/0.1/url-generator.yamls +``` + +### workspace + +The task uses a workspace to copy files which are required across the pipeline. As an example +the host key is copied to the workspace and the path is exposed through `workspace-resources-path`. + +Then any other task across the pipeline which uses the workspace can access the key to use for ssh into +the target host. diff --git a/catalog/pipelines/crc-qe-virtualized/0.8/crc-qe-virtualized.yaml b/catalog/pipelines/crc-qe-virtualized/0.8/crc-qe-virtualized.yaml new file mode 100644 index 0000000..6b9e733 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.8/crc-qe-virtualized.yaml @@ -0,0 +1,743 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: Pipeline +metadata: + name: crc-qe-virtualized + labels: + app.kubernetes.io/version: "0.8" + redhat.com/product: openshift-local + redhat.com/phase: qe + annotations: + tekton.dev/pipelines.minVersion: "0.44.x" + tekton.dev/categories: qe + tekton.dev/tags: openshift-local, qe, nested virualization + tekton.dev/displayName: "qe for openshift local" + tekton.dev/platforms: "linux/amd64" +spec: + description: >- + This pipeline will run the testing for openshift local on + a specific linux version based on nested virtualization + + workspaces: + - name: pipelines-data + # This is required when targets are spin on AWS + - name: cloud-credentials + # optional: true + description: | + This secret will hold the credentials to the target cloud provider it could match depending on the target: + + ## AWS + ocp secret holding the aws credentials. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: aws-${name} + labels: + app.kubernetes.io/component: ${name} + app.kubernetes.io/part-of: qe-platform + type: Opaque + data: + access-key: ${access_key} + secret-key: ${secret_key} + region: ${region} + + ## Azure + ocp secret holding the azure credentials. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: az-${name} + labels: + app.kubernetes.io/component: ${name} + app.kubernetes.io/part-of: qe-platform + type: Opaque + data: + tenant_id: ${tenant_id} + subscription_id: ${subscription_id} + client_id: ${client_id} + client_secret: ${client_secret} + - name: rh-account-secret + optional: true + description: | + ocp secret holding the credentials for a valid rh user to subscribe VM. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: credentials-${configname} + type: Opaque + data: + user: ${user} + password: ${password} + - name: reportportal-credentials + description: | + ocp secret holding the report portal credentials. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: XXX + type: Opaque + data: + token: XXXX + url: XXXX + project: XXXX + - name: ocp-pullsecret + description: | + crc secret name holding the pullsecret. This is only required if backed tested is crc preset + + secret should match following format: + --- + apiVersion: v1 + kind: Secret + metadata: + name: ${secret-name} + type: Opaque + data: + pullsecret: ${pullsecret-value} + + params: + # Windows related params + - name: windows-featurepack + description: windows feature pack (default "22h2-pro") + # default: 22h2-pro + default: "''" + - name: windows-version + description: Major version for windows desktop 10 or 11 (default "11") + # default: '11' + default: "''" + - name: windows-vmsize + description: Size of azure machine for running the windows system + default: Standard_D8ds_v4 + + # Fedora related params + - name: fedora-version + description: Fedora Cloud version (i.e 39, 38, 37...) + default: "''" + + # Rhel related params + - name: rhel-version + description: Major.Minor RHEL version (i.e 9.3, 9.2, 9,1...) + default: "''" + - name: rhel-arch + description: architecture for the target machine. Allowed x86_64 or arm64 (default "x86_64") + default: 'x86_64' + + # CRC params + - name: internal-base-url + description: in case of an internal release we can not directly download it but upload fisrt to s3. This setup the base url for the assets to be uploaded + default: "''" + - name: internal-asset-name + description: asset name to be uploaded + default: "''" + - name: internal-shasum-name + description: shasum name to be uploaded + default: "''" + - name: internal-shasum-target-name + description: setup the name for the internal shasum on s3 + default: "''" + - name: downloadable-url + description: full base url to download ditributables and shasumsfiles + default: '' + - name: shasum-file + description: file name for shasum to check distributable + default: sha256sum.txt + + # QE params + - name: qe-arch + description: type of arch (amd64, arm64). Defaults amd64. This should be align with rhel-arch param + default: amd64 + - name: e2e-tag + description: tags to select e2e scnearios. Default empty values which means all scnearios + default: "''" + - name: qe-worspace-subpath + description: subpath on workspace where storing ephemeral qe results + default: qe-results + - name: run-e2e + description: Control if e2e tests are executed. (true or false) + default: 'true' + - name: run-integration + description: Control if integration tests are executed. (true or false) + default: 'true' + + # S3 params (Storage results) + - name: s3-data-secret + default: datalake-aws + - name: s3-bucket + default: crcqe-asia + - name: s3-folder-path + description: target folder to store results. (Example release/2.9.0) + + # Pipeline control params + - name: debug + description: control verbosity and keep instances after run for troubleshooting. + default: 'false' + - name: target-cleanup + description: cleanup target ephemeral target folders on each step which requires them + default: 'true' + - name: test-catalog + description: Used for reportportal launch description + default: 'release-test' + + results: + - name: e2e-results-url + description: url to access e2e junit results + value: $(tasks.e2e-url-generator.results.url) + - name: integration-results-url + description: url to access e2e junit results + value: $(tasks.integration-url-generator.results.url) + + tasks: + - name: correlate + taskRef: + name: gather-run-info + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: host-info + runAfter: + - correlate + params: + - name: fedora-version + value: $(params.fedora-version) + - name: rhel-version + value: $(params.rhel-version) + - name: windows-version + value: $(params.windows-version)$(params.windows-featurepack) + taskSpec: + params: + - name: fedora-version + - name: rhel-version + - name: windows-version + results: + - name: id + - name: os + - name: arch + steps: + - image: registry.access.redhat.com/ubi9/ubi-minimal + script: | + #!/bin/sh + arch="amd64" + os="linux" + id="" + if [[ $(params.fedora-version) != "" ]]; then + id="fedora-x86-$(params.fedora-version)" + fi + if [[ $(params.rhel-version) != "" ]]; then + id="rhel-x86-$(params.rhel-version)" + fi + if [[ $(params.windows-version) != "" ]]; then + os="windows" + id="windows-x86-$(params.windows-version)" + fi + echo -n "${id}" | tee $(results.id.path) + echo -n "${os}" | tee $(results.os.path) + echo -n "${arch}" | tee $(results.arch.path) + - name: s3-info + runAfter: + - host-info + taskRef: + name: gather-s3-info + params: + - name: s3-data-secret + value: $(params.s3-data-secret) + - name: bucket + value: $(params.s3-bucket) + - name: folder-path + value: $(params.s3-folder-path)/$(tasks.host-info.results.id) + - name: internal-asset-upload + when: + - input: $(params.internal-base-url) + operator: notin + values: ["''"] + - input: $(params.internal-asset-name) + operator: notin + values: ["''"] + runAfter: + - s3-info + taskRef: + name: s3-sync-http + params: + - name: asset-url + value: $(params.internal-base-url)/$(params.internal-asset-name) + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: s3-asset-name + value: $(params.internal-asset-name) + timeout: "15m" + - name: internal-shasum-upload + when: + - input: $(params.internal-base-url) + operator: notin + values: ["''"] + - input: $(params.internal-shasum-name) + operator: notin + values: ["''"] + runAfter: + - s3-info + taskRef: + name: s3-sync-http + params: + - name: asset-url + value: $(params.internal-base-url)/$(params.internal-shasum-name) + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: s3-asset-name + value: $(params.internal-shasum-name) + timeout: "15m" + - name: url-picker + runAfter: + - s3-info + taskRef: + name: url-picker + params: + - name: internal-base-url + value: $(params.internal-base-url) + - name: public-base-url + value: $(tasks.s3-info.results.download-url) + - name: external-base-url + value: $(params.downloadable-url) + - name: crc-info + runAfter: + - host-info + taskRef: + name: gather-crc-info + params: + - name: platform + value: $(tasks.host-info.results.os) + - name: provision-fedora + runAfter: + - s3-info + - crc-info + taskRef: + resolver: git + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: main + - name: pathInRepo + value: tkn/infra-aws-fedora.yaml + when: + - input: $(params.fedora-version) + operator: notin + values: ["''"] + params: + - name: project-name + value: crc-qe-virtualized-fedora-$(tasks.correlate.results.correlation) + - name: version + value: $(params.fedora-version) + - name: nested-virt + value: 'true' + - name: operation + value: create + - name: ws-output-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: tags + value: "pipelinerunName=$(context.pipelineRun.name)" + workspaces: + - name: storage + workspace: pipelines-data + - name: aws-credentials + workspace: cloud-credentials + timeout: "20m" + - name: provision-rhel + runAfter: + - s3-info + - crc-info + when: + - input: $(params.rhel-version) + operator: notin + values: ["''"] + taskRef: + resolver: git + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: main + - name: pathInRepo + value: tkn/infra-aws-rhel.yaml + params: + - name: project-name + value: crc-qe-virtualized-rhel-$(tasks.correlate.results.correlation) + - name: version + value: $(params.rhel-version) + - name: arch + value: $(params.rhel-arch) + - name: nested-virt + value: 'true' + - name: operation + value: create + - name: ws-output-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: tags + value: "pipelinerunName=$(context.pipelineRun.name)" + workspaces: + - name: storage + workspace: pipelines-data + - name: aws-credentials + workspace: cloud-credentials + - name: rh-account-secret + workspace: rh-account-secret + timeout: "20m" + - name: provision-windows + runAfter: + - s3-info + - crc-info + when: + - input: $(params.windows-featurepack) + operator: notin + values: ["''"] + - input: $(params.windows-version) + operator: notin + values: ["''"] + taskRef: + resolver: git + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: main + - name: pathInRepo + value: tkn/infra-azure-windows-desktop.yaml + params: + - name: project-name + value: podman-backend-qe-$(tasks.correlate.results.correlation) + - name: operation + value: create + - name: windows-featurepack + value: $(params.windows-featurepack) + - name: windows-version + value: $(params.windows-version) + - name: vmsize + value: $(params.windows-vmsize) + - name: ws-output-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: tags + value: "pipelinerunName=$(context.pipelineRun.name)" + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: az-credentials + workspace: cloud-credentials + timeout: "20m" + - name: sync-provision + runAfter: + - provision-fedora + - provision-rhel + - provision-windows + taskRef: + name: infra-syncer + params: + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "20m" + - name: install + runAfter: + - sync-provision + - internal-asset-upload + - internal-shasum-upload + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/rhqp/crc-support-tkn:v0.5 + - name: name + value: crc-support + - name: kind + value: task + params: + - name: os + value: $(tasks.host-info.results.os) + - name: host + value: $(tasks.sync-provision.results.host) + - name: username + value: $(tasks.sync-provision.results.username) + - name: key + value: $(tasks.sync-provision.results.key-filename) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + # Preparing crc version is only used for target path storage + - name: downloadable-version + value: $(tasks.crc-info.results.crc-version) + - name: downloadable-url + # Only accessible url within downloadable-url or internal uploaded composed url + value: $(tasks.url-picker.results.base-url) + - name: shasum-file + value: $(params.shasum-file) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "1h" + - name: qe + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/rhqp/crc-e2e-tkn:v1.0.0 + - name: name + value: crc-e2e + - name: kind + value: task + runAfter: + - install + params: + - name: os + value: $(tasks.host-info.results.os) + - name: arch + value: $(params.qe-arch) + - name: host + value: $(tasks.sync-provision.results.host) + - name: username + value: $(tasks.sync-provision.results.username) + - name: key + value: $(tasks.sync-provision.results.key-filename) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: worspace-qe-subpath + value: $(params.qe-worspace-subpath) + - name: crc-version + value: $(tasks.crc-info.results.crc-version) + - name: run-e2e + value: $(params.run-e2e) + - name: e2e-tag + value: $(params.e2e-tag) + - name: e2e-cleanup-target + value: $(params.target-cleanup) + - name: run-integration + value: $(params.run-integration) + - name: integration-cleanup-target + value: $(params.target-cleanup) + - name: debug + value: $(params.debug) + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: ocp-pullsecret + workspace: ocp-pullsecret + timeout: "5h" + - name: reportportal-import + runAfter: + - qe + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/rhqp/reportportal:v1.1.1 + - name: name + value: reportportal-import + - name: kind + value: task + params: + - name: results-id + value: crc-$(tasks.crc-info.results.crc-version)-$(tasks.host-info.results.id) + - name: results-wsstorage-path + value: $(tasks.correlate.results.workspace-resources-path)/$(params.qe-worspace-subpath) + - name: debug + # value: $(params.debug) + value: 'true' + - name: launch-attributes + value: {"attributes": [{"key":"crc-version","value":"$(tasks.crc-info.results.crc-version)"}, {"key": "skippedIssue", "value": true}]} + - name: launch-description + value: $(params.test-catalog) + workspaces: + - name: storage + workspace: pipelines-data + - name: reportportal-credentials + workspace: reportportal-credentials + timeout: "15m" + - name: datalake-sink + runAfter: + - qe + taskRef: + name: s3-sink-workspace + params: + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: workspace-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: workspace-subpath + value: $(params.qe-worspace-subpath) + # Do not delete to keep tf state to decomission on final + # This task should be splitted to allow only cleaning up + - name: workspace-cleanup + value: 'false' + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "15m" + - name: integration-url-generator + taskRef: + name: url-generator + runAfter: + - datalake-sink + params: + - name: base-url + value: $(tasks.s3-info.results.download-url) + - name: context + value: $(params.qe-worspace-subpath) + - name: asset-name + value: integration-junit.xml + - name: e2e-url-generator + taskRef: + name: url-generator + runAfter: + - datalake-sink + params: + - name: base-url + value: $(tasks.s3-info.results.download-url) + - name: context + value: $(params.qe-worspace-subpath) + - name: asset-name + value: e2e-junit.xml + finally: + - name: debug-info + when: + - input: $(params.rhel-version) + operator: notin + values: ["''"] + - input: $(params.debug) + operator: in + values: ["true"] + taskSpec: + workspaces: + - name: pipelines-data + params: + - name: workspace-resources-path + description: path relative to workspace where to store keys + steps: + - name: show-denug-info + image: registry.access.redhat.com/ubi9/ubi-minimal + script: | + #!/bin/sh + workspace_path=$(workspaces.pipelines-data.path)/$(params.workspace-resources-path) + echo "private key" + cat ${workspace_path}/id_rsa + echo "host" + cat ${workspace_path}/host + echo "username" + cat ${workspace_path}/username + params: + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: decomission-fedora + when: + - input: $(params.fedora-version) + operator: notin + values: ["''"] + taskRef: + resolver: git + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: main + - name: pathInRepo + value: tkn/infra-aws-fedora.yaml + params: + - name: project-name + value: crc-qe-virtualized-fedora-$(tasks.correlate.results.correlation) + - name: operation + value: destroy + - name: ws-output-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: storage + workspace: pipelines-data + - name: aws-credentials + workspace: cloud-credentials + timeout: "20m" + - name: decomission-rhel + when: + - input: $(params.rhel-version) + operator: notin + values: ["''"] + - input: $(params.debug) + operator: in + values: ["false"] + taskRef: + resolver: git + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: main + - name: pathInRepo + value: tkn/infra-aws-rhel.yaml + params: + - name: project-name + value: crc-qe-virtualized-rhel-$(tasks.correlate.results.correlation) + - name: version + value: $(params.rhel-version) + - name: operation + value: destroy + - name: ws-output-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: storage + workspace: pipelines-data + - name: aws-credentials + workspace: cloud-credentials + - name: decomission-windows + when: + - input: $(params.windows-featurepack) + operator: notin + values: ["''"] + - input: $(params.windows-version) + operator: notin + values: ["''"] + taskRef: + resolver: git + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: main + - name: pathInRepo + value: tkn/infra-azure-windows-desktop.yaml + params: + - name: project-name + value: podman-backend-qe-$(tasks.correlate.results.correlation) + - name: operation + value: destroy + - name: ws-output-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: az-credentials + workspace: cloud-credentials + timeout: "15m" + + diff --git a/catalog/pipelines/crc-qe-virtualized/0.8/samples/fedora.yaml b/catalog/pipelines/crc-qe-virtualized/0.8/samples/fedora.yaml new file mode 100644 index 0000000..003f8f5 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.8/samples/fedora.yaml @@ -0,0 +1,35 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-fedora39- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: fedora-version + value: '39' + - name: internal-base-url + value: https://download.eng.bos.redhat.com/etera/crc/2/2.29/2.29.0/staging + - name: internal-asset-name + value: crc-linux-amd64.tar.xz + - name: internal-shasum-name + value: sha256sum.txt + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: release/2.9.0 + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + - name: cloud-credentials + secret: + secretName: aws-crcqe-bot + - name: ocp-pullsecret + secret: + secretName: crc-crc-qe + - name: reportportal-credentials + secret: + secretName: reportportal-crc + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.8/samples/rhel-arm64.yaml b/catalog/pipelines/crc-qe-virtualized/0.8/samples/rhel-arm64.yaml new file mode 100644 index 0000000..d56a8a9 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.8/samples/rhel-arm64.yaml @@ -0,0 +1,38 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-rhel93- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: rhel-version + value: '9.3' + - name: internal-base-url + value: https://download.eng.bos.redhat.com/etera/crc/2/2.29/2.29.0/staging + - name: internal-asset-name + value: crc-linux-amd64.tar.xz + - name: internal-shasum-name + value: sha256sum.txt + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: release/2.29.0 + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + - name: cloud-credentials + secret: + secretName: aws-crcqe-bot + - name: rh-account-secret + secret: + secretName: credentials-rh-subs-crcqe-prod + - name: ocp-pullsecret + secret: + secretName: crc-crc-qe + - name: reportportal-credentials + secret: + secretName: reportportal-crc + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.8/samples/rhel-x86.yaml b/catalog/pipelines/crc-qe-virtualized/0.8/samples/rhel-x86.yaml new file mode 100644 index 0000000..d56a8a9 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.8/samples/rhel-x86.yaml @@ -0,0 +1,38 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-rhel93- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: rhel-version + value: '9.3' + - name: internal-base-url + value: https://download.eng.bos.redhat.com/etera/crc/2/2.29/2.29.0/staging + - name: internal-asset-name + value: crc-linux-amd64.tar.xz + - name: internal-shasum-name + value: sha256sum.txt + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: release/2.29.0 + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + - name: cloud-credentials + secret: + secretName: aws-crcqe-bot + - name: rh-account-secret + secret: + secretName: credentials-rh-subs-crcqe-prod + - name: ocp-pullsecret + secret: + secretName: crc-crc-qe + - name: reportportal-credentials + secret: + secretName: reportportal-crc + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.8/samples/windows11-22h2-ent-pre-release.yaml b/catalog/pipelines/crc-qe-virtualized/0.8/samples/windows11-22h2-ent-pre-release.yaml new file mode 100644 index 0000000..91b7fa3 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.8/samples/windows11-22h2-ent-pre-release.yaml @@ -0,0 +1,43 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-windows11-22h2-ent- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: windows-version + value: '11' + - name: windows-featurepack + value: 22h2-ent + - name: windows-vmsize + value: Standard_D8s_v3 + - name: internal-base-url + value: https://download.eng.bos.redhat.com/etera/crc/2/2.20/2.20.0-1/staging + - name: internal-asset-name + value: crc-windows-installer.zip + - name: internal-shasum-name + value: sha256sum.txt + - name: shasum-file + value: sha256sum.txt + - name: e2e-tag + value: '@basic' + - name: run-integration + value: "false" + - name: s3-folder-path + value: 'release/2.20.0' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + - name: cloud-credentials + secret: + secretName: az-crcqe-bot + - name: ocp-pullsecret + secret: + secretName: crc-crc-qe + - name: reportportal-credentials + secret: + secretName: reportportal-crc + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.8/samples/windows11-22h2-ent.yaml b/catalog/pipelines/crc-qe-virtualized/0.8/samples/windows11-22h2-ent.yaml new file mode 100644 index 0000000..9eafe7d --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.8/samples/windows11-22h2-ent.yaml @@ -0,0 +1,33 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-windows11-22h2-ent- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: windows-version + value: '11' + - name: windows-featurepack + value: 22h2-ent + - name: downloadable-url + value: https://developers.redhat.com/content-gateway/rest/mirror2/pub/openshift-v4/clients/crc/2.18.0 + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: 'release/2.18.0' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + - name: cloud-credentials + secret: + secretName: az-crcqe-bot + - name: ocp-pullsecret + secret: + secretName: crc-crc-qe + - name: reportportal-credentials + secret: + secretName: reportportal-crc + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.8/samples/windows11-22h2-pro.yaml b/catalog/pipelines/crc-qe-virtualized/0.8/samples/windows11-22h2-pro.yaml new file mode 100644 index 0000000..6f2e248 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.8/samples/windows11-22h2-pro.yaml @@ -0,0 +1,33 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + generateName: crc-qe-virtualized-windows11-22h2-pro- +spec: + pipelineRef: + name: crc-qe-virtualized + params: + - name: windows-version + value: '11' + - name: windows-featurepack + value: 22h2-pro + - name: downloadable-url + value: https://developers.redhat.com/content-gateway/rest/mirror2/pub/openshift-v4/clients/crc/2.18.0 + - name: shasum-file + value: sha256sum.txt + - name: s3-folder-path + value: 'release/2.18.0' + workspaces: + - name: pipelines-data + persistentVolumeClaim: + claimName: pipelines-data + - name: cloud-credentials + secret: + secretName: az-crcqe-bot + - name: ocp-pullsecret + secret: + secretName: crc-crc-qe + - name: reportportal-credentials + secret: + secretName: reportportal-crc + timeout: "5h" diff --git a/catalog/pipelines/crc-qe-virtualized/0.9/crc-qe-virtualized.yaml b/catalog/pipelines/crc-qe-virtualized/0.9/crc-qe-virtualized.yaml new file mode 100644 index 0000000..9732ca7 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.9/crc-qe-virtualized.yaml @@ -0,0 +1,805 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: Pipeline +metadata: + name: crc-qe-virtualized + labels: + app.kubernetes.io/version: "0.9" + redhat.com/product: openshift-local + redhat.com/phase: qe + annotations: + tekton.dev/pipelines.minVersion: "0.44.x" + tekton.dev/categories: qe + tekton.dev/tags: openshift-local, qe, nested virualization + tekton.dev/displayName: "qe for openshift local" + tekton.dev/platforms: "linux/amd64" +spec: + description: >- + This pipeline will run the testing for openshift local on + a specific linux version based on nested virtualization + + workspaces: + - name: pipelines-data + # This is required when targets are spin on AWS + - name: cloud-credentials + # optional: true + description: | + This secret will hold the credentials to the target cloud provider it could match depending on the target: + + ## AWS + ocp secret holding the aws credentials. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: aws-${name} + labels: + app.kubernetes.io/component: ${name} + app.kubernetes.io/part-of: qe-platform + type: Opaque + data: + access-key: ${access_key} + secret-key: ${secret_key} + region: ${region} + + ## Azure + ocp secret holding the azure credentials. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: az-${name} + labels: + app.kubernetes.io/component: ${name} + app.kubernetes.io/part-of: qe-platform + type: Opaque + data: + tenant_id: ${tenant_id} + subscription_id: ${subscription_id} + client_id: ${client_id} + client_secret: ${client_secret} + - name: rh-account-secret + optional: true + description: | + ocp secret holding the credentials for a valid rh user to subscribe VM. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: credentials-${configname} + type: Opaque + data: + user: ${user} + password: ${password} + - name: reportportal-credentials + description: | + ocp secret holding the report portal credentials. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: XXX + type: Opaque + data: + token: XXXX + url: XXXX + project: XXXX + - name: ocp-pullsecret + description: | + crc secret name holding the pullsecret. This is only required if backed tested is crc preset + + secret should match following format: + --- + apiVersion: v1 + kind: Secret + metadata: + name: ${secret-name} + type: Opaque + data: + pullsecret: ${pullsecret-value} + + params: + # Windows related params + - name: windows-featurepack + description: windows feature pack (default "22h2-pro") + # default: 22h2-pro + default: "''" + - name: windows-version + description: Major version for windows desktop 10 or 11 (default "11") + # default: '11' + default: "''" + + # Fedora related params + - name: fedora-version + description: Fedora Cloud version (i.e 39, 38, 37...) + default: "''" + + # Rhel related params + - name: rhel-version + description: Major.Minor RHEL version (i.e 9.3, 9.2, 9,1...) + default: "''" + - name: rhel-arch + description: architecture for the target machine. Allowed x86_64 or arm64 (default "x86_64") + default: 'x86_64' + + # CRC params + - name: internal-base-url + description: in case of an internal release we can not directly download it but upload fisrt to s3. This setup the base url for the assets to be uploaded + default: "''" + - name: internal-asset-name + description: asset name to be uploaded + default: "''" + - name: internal-shasum-name + description: shasum name to be uploaded + default: "''" + - name: internal-shasum-target-name + description: setup the name for the internal shasum on s3 + default: "''" + - name: downloadable-url + description: full base url to download ditributables and shasumsfiles + default: '' + - name: shasum-file + description: file name for shasum to check distributable + default: sha256sum.txt + + # QE params + - name: qe-arch + description: type of arch (amd64, arm64). Defaults amd64. This should be align with rhel-arch param + default: amd64 + - name: e2e-tag + description: tags to select e2e scnearios. Default empty values which means all scnearios + default: "''" + - name: qe-worspace-subpath + description: subpath on workspace where storing ephemeral qe results + default: qe-results + - name: run-e2e + description: Control if e2e tests are executed. (true or false) + default: 'true' + - name: run-integration + description: Control if integration tests are executed. (true or false) + default: 'true' + + # S3 params (Storage results) + - name: s3-data-secret + default: datalake-aws + - name: s3-bucket + default: crcqe-asia + - name: s3-folder-path + description: target folder to store results. (Example release/2.9.0) + + # Pipeline control params + - name: debug + description: control verbosity and keep instances after run for troubleshooting. + default: 'false' + - name: target-cleanup + description: cleanup target ephemeral target folders on each step which requires them + default: 'true' + - name: test-catalog + description: Used for reportportal launch description + default: 'release-test' + + results: + - name: e2e-results-url + description: url to access e2e junit results + value: $(tasks.e2e-url-generator.results.url) + - name: integration-results-url + description: url to access e2e junit results + value: $(tasks.integration-url-generator.results.url) + + tasks: + - name: correlate + taskRef: + name: gather-run-info + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: host-info + runAfter: + - correlate + params: + - name: fedora-version + value: $(params.fedora-version) + - name: rhel-version + value: $(params.rhel-version) + - name: windows-version + value: $(params.windows-version)$(params.windows-featurepack) + taskSpec: + params: + - name: fedora-version + - name: rhel-version + - name: windows-version + results: + - name: id + - name: os + - name: arch + steps: + - image: registry.access.redhat.com/ubi9/ubi-minimal + script: | + #!/bin/sh + arch="amd64" + os="linux" + id="" + if [[ $(params.fedora-version) != "" ]]; then + id="fedora-x86-$(params.fedora-version)" + fi + if [[ $(params.rhel-version) != "" ]]; then + id="rhel-x86-$(params.rhel-version)" + fi + if [[ $(params.windows-version) != "" ]]; then + os="windows" + id="windows-x86-$(params.windows-version)" + fi + echo -n "${id}" | tee $(results.id.path) + echo -n "${os}" | tee $(results.os.path) + echo -n "${arch}" | tee $(results.arch.path) + - name: s3-info + runAfter: + - host-info + taskRef: + name: gather-s3-info + params: + - name: s3-data-secret + value: $(params.s3-data-secret) + - name: bucket + value: $(params.s3-bucket) + - name: folder-path + value: $(params.s3-folder-path)/$(tasks.host-info.results.id) + - name: internal-asset-upload + when: + - input: $(params.internal-base-url) + operator: notin + values: ["''"] + - input: $(params.internal-asset-name) + operator: notin + values: ["''"] + runAfter: + - s3-info + taskRef: + name: s3-sync-http + params: + - name: asset-url + value: $(params.internal-base-url)/$(params.internal-asset-name) + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: s3-asset-name + value: $(params.internal-asset-name) + timeout: "15m" + - name: internal-shasum-upload + when: + - input: $(params.internal-base-url) + operator: notin + values: ["''"] + - input: $(params.internal-shasum-name) + operator: notin + values: ["''"] + runAfter: + - s3-info + taskRef: + name: s3-sync-http + params: + - name: asset-url + value: $(params.internal-base-url)/$(params.internal-shasum-name) + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: s3-asset-name + value: $(params.internal-shasum-name) + timeout: "15m" + - name: url-picker + runAfter: + - s3-info + taskRef: + name: url-picker + params: + - name: internal-base-url + value: $(params.internal-base-url) + - name: public-base-url + value: $(tasks.s3-info.results.download-url) + - name: external-base-url + value: $(params.downloadable-url) + - name: crc-info + runAfter: + - host-info + taskRef: + name: gather-crc-info + params: + - name: platform + value: $(tasks.host-info.results.os) + - name: provision-fedora + runAfter: + - s3-info + - crc-info + taskRef: + resolver: git + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: v0.8.0 + - name: pathInRepo + value: tkn/infra-aws-fedora.yaml + when: + - input: $(params.fedora-version) + operator: notin + values: ["''"] + params: + - name: secret-aws-credentials + value: aws-crcqe-bot + - name: id + value: $(tasks.correlate.results.correlation) + - name: operation + value: create + - name: host-access-secret-name + value: host-info-$(tasks.correlate.results.correlation) + - name: ownerKind + value: PipelineRun + - name: ownerName + value: $(context.pipelineRun.name) + - name: ownerUid + value: $(context.pipelineRun.uid) + - name: nested-virt + value: 'true' + - name: version + value: $(params.fedora-version) + - name: tags + value: "pipelinerunName=$(context.pipelineRun.name)" + timeout: "20m" + - name: provision-rhel + runAfter: + - s3-info + - crc-info + when: + - input: $(params.rhel-version) + operator: notin + values: ["''"] + taskRef: + resolver: git + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: v0.8.0 + - name: pathInRepo + value: tkn/infra-aws-rhel.yaml + params: + - name: secret-aws-credentials + value: aws-crcqe-bot + - name: rh-credentials + value: credentials-rh-subs-crcqe-prod + - name: id + value: $(tasks.correlate.results.correlation) + - name: operation + value: create + - name: host-access-secret-name + value: host-info-$(tasks.correlate.results.correlation) + - name: ownerKind + value: PipelineRun + - name: ownerName + value: $(context.pipelineRun.name) + - name: ownerUid + value: $(context.pipelineRun.uid) + - name: nested-virt + value: 'true' + - name: arch + value: $(params.rhel-arch) + - name: version + value: $(params.rhel-version) + - name: tags + value: "pipelinerunName=$(context.pipelineRun.name)" + - name: debug + value: $(params.debug) + timeout: "20m" + - name: provision-windows + runAfter: + - s3-info + - crc-info + when: + - input: $(params.windows-featurepack) + operator: notin + values: ["''"] + - input: $(params.windows-version) + operator: notin + values: ["''"] + taskRef: + resolver: git + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: v0.8.0 + - name: pathInRepo + value: tkn/infra-azure-windows-desktop.yaml + params: + - name: secret-az-credentials + value: az-crcqe-bot + - name: id + value: $(tasks.correlate.results.correlation) + - name: operation + value: create + - name: host-access-secret-name + value: host-info-$(tasks.correlate.results.correlation) + - name: ownerKind + value: PipelineRun + - name: ownerName + value: $(context.pipelineRun.name) + - name: ownerUid + value: $(context.pipelineRun.uid) + - name: nested-virt + value: 'true' + - name: windows-featurepack + value: $(params.windows-featurepack) + - name: windows-version + value: $(params.windows-version) + - name: tags + value: "pipelinerunName=$(context.pipelineRun.name)" + - name: debug + value: $(params.debug) + timeout: "20m" + - name: sync-provision + runAfter: + - provision-fedora + - provision-rhel + - provision-windows + taskSpec: + description: This task will get the host info + params: + - name: secret-host + - name: workspace-resources-path + volumes: + - name: host-secret + secret: + secretName: $(params.secret-host) + - name: storage + persistentVolumeClaim: + claimName: pipelines-data + results: + - name: host + - name: username + - name: key-filename + steps: + - name: sync + image: quay.io/rhqp/support-tools:v0.0.1 + volumeMounts: + - name: host-secret + mountPath: /opt/host-secret + - name: storage + mountPath: /opt/storage + script: | + #!/bin/sh + + set -exuo pipefail + + HOST_FILENAME=host + USERNAME_FILENAME=username + KEY_FILENAME=id_rsa + + workspace_path="/opt/host-secret" + + # Check files + while [ ! -f "${workspace_path}/${HOST_FILENAME}" ]; do sleep 1; done + while [ ! -f "${workspace_path}/${USERNAME_FILENAME}" ]; do sleep 1; done + while [ ! -f "${workspace_path}/${KEY_FILENAME}" ]; do sleep 1; done + + # Set results + cat "${workspace_path}/${HOST_FILENAME}" | tee $(results.host.path) + cat "${workspace_path}/${USERNAME_FILENAME}" | tee $(results.username.path) + cp "${workspace_path}/${KEY_FILENAME}" /opt/storage/$(params.workspace-resources-path) + echo -n "${KEY_FILENAME}" | tee $(results.key-filename.path) + params: + - name: secret-host + value: host-info-$(tasks.correlate.results.correlation) + - name: workspace-resources-path + value: $(tasks.correlate.results.correlation) + timeout: "20m" + - name: install + runAfter: + - sync-provision + - internal-asset-upload + - internal-shasum-upload + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/rhqp/crc-support-tkn:v0.5 + - name: name + value: crc-support + - name: kind + value: task + params: + - name: os + value: $(tasks.host-info.results.os) + - name: host + value: $(tasks.sync-provision.results.host) + - name: username + value: $(tasks.sync-provision.results.username) + - name: key + value: $(tasks.sync-provision.results.key-filename) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + # Preparing crc version is only used for target path storage + - name: downloadable-version + value: $(tasks.crc-info.results.crc-version) + - name: downloadable-url + # Only accessible url within downloadable-url or internal uploaded composed url + value: $(tasks.url-picker.results.base-url) + - name: shasum-file + value: $(params.shasum-file) + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "1h" + - name: qe + taskRef: + resolver: bundles + params: + - name: bundle + value: quay.io/rhqp/crc-e2e-tkn:v1.0.0 + - name: name + value: crc-e2e + - name: kind + value: task + runAfter: + - install + params: + - name: os + value: $(tasks.host-info.results.os) + - name: arch + value: $(params.qe-arch) + - name: host + value: $(tasks.sync-provision.results.host) + - name: username + value: $(tasks.sync-provision.results.username) + - name: key + value: $(tasks.sync-provision.results.key-filename) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: worspace-qe-subpath + value: $(params.qe-worspace-subpath) + - name: crc-version + value: $(tasks.crc-info.results.crc-version) + - name: run-e2e + value: $(params.run-e2e) + - name: e2e-tag + value: $(params.e2e-tag) + - name: e2e-cleanup-target + value: $(params.target-cleanup) + - name: run-integration + value: $(params.run-integration) + - name: integration-cleanup-target + value: $(params.target-cleanup) + - name: debug + value: $(params.debug) + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: ocp-pullsecret + workspace: ocp-pullsecret + timeout: "5h" + + - name: datalake-sink + runAfter: + - qe + taskRef: + name: s3-sink-workspace + params: + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: workspace-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: workspace-subpath + value: $(params.qe-worspace-subpath) + # Do not delete to keep tf state to decomission on final + # This task should be splitted to allow only cleaning up + - name: workspace-cleanup + value: 'false' + workspaces: + - name: pipelines-data + workspace: pipelines-data + timeout: "15m" + - name: integration-url-generator + taskRef: + name: url-generator + runAfter: + - datalake-sink + params: + - name: base-url + value: $(tasks.s3-info.results.download-url) + - name: context + value: $(params.qe-worspace-subpath) + - name: asset-name + value: integration-junit.xml + - name: e2e-url-generator + taskRef: + name: url-generator + runAfter: + - datalake-sink + params: + - name: base-url + value: $(tasks.s3-info.results.download-url) + - name: context + value: $(params.qe-worspace-subpath) + - name: asset-name + value: e2e-junit.xml + finally: + - name: debug-info + when: + - input: $(params.rhel-version) + operator: notin + values: ["''"] + - input: $(params.debug) + operator: in + values: ["true"] + taskSpec: + workspaces: + - name: pipelines-data + params: + - name: workspace-resources-path + description: path relative to workspace where to store keys + steps: + - name: show-denug-info + image: registry.access.redhat.com/ubi9/ubi-minimal + script: | + #!/bin/sh + workspace_path=$(workspaces.pipelines-data.path)/$(params.workspace-resources-path) + echo "private key" + cat ${workspace_path}/id_rsa + echo "host" + cat ${workspace_path}/host + echo "username" + cat ${workspace_path}/username + params: + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: decomission-fedora + when: + - input: $(params.fedora-version) + operator: notin + values: ["''"] + - input: $(params.debug) + operator: in + values: ["false"] + taskRef: + resolver: git + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: v0.8.0 + - name: pathInRepo + value: tkn/infra-aws-fedora.yaml + params: + - name: secret-aws-credentials + value: aws-crcqe-bot + - name: operation + value: destroy + - name: id + value: $(tasks.correlate.results.correlation) + - name: ownerKind + value: PipelineRun + - name: ownerName + value: $(context.pipelineRun.name) + - name: ownerUid + value: $(context.pipelineRun.uid) + timeout: "40m" + - name: decomission-rhel + when: + - input: $(params.rhel-version) + operator: notin + values: ["''"] + - input: $(params.debug) + operator: in + values: ["false"] + taskRef: + resolver: git + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: v0.8.0 + - name: pathInRepo + value: tkn/infra-aws-rhel.yaml + params: + - name: secret-aws-credentials + value: aws-crcqe-bot + - name: rh-credentials + value: credentials-rh-subs-crcqe-prod + - name: operation + value: destroy + - name: id + value: $(tasks.correlate.results.correlation) + - name: ownerKind + value: PipelineRun + - name: ownerName + value: $(context.pipelineRun.name) + - name: ownerUid + value: $(context.pipelineRun.uid) + timeout: "40m" + - name: decomission-windows + when: + - input: $(params.windows-featurepack) + operator: notin + values: ["''"] + - input: $(params.windows-version) + operator: notin + values: ["''"] + - input: $(params.debug) + operator: in + values: ["false"] + taskRef: + resolver: git + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: v0.8.0 + - name: pathInRepo + value: tkn/infra-azure-windows-desktop.yaml + params: + - name: secret-az-credentials + value: az-crcqe-bot + - name: id + value: $(tasks.correlate.results.correlation) + - name: operation + value: destroy + - name: ownerKind + value: PipelineRun + - name: ownerName + value: $(context.pipelineRun.name) + - name: ownerUid + value: $(context.pipelineRun.uid) + timeout: "40m" + - name: reportportal-import + taskRef: + resolver: git + params: + - name: url + value: https://github.com/crc-org/ci-definitions + - name: revision + value: main + - name: pathInRepo + value: reportportal/tkn/import.yaml + params: + - name: results-id + value: crc-$(tasks.crc-info.results.crc-version)-$(tasks.host-info.results.id) + - name: results-wsstorage-path + value: $(tasks.correlate.results.workspace-resources-path)/$(params.qe-worspace-subpath) + - name: debug + value: $(params.debug) + - name: upload-log + value: 'true' + - name: launch-attributes + value: {"attributes": [{"key":"crc-version","value":"$(tasks.crc-info.results.crc-version)"}, {"key": "skippedIssue", "value": true}]} + - name: launch-description + value: $(params.test-catalog) + - name: pipelinerunName + value: $(context.pipelineRun.name) + - name: secret-reportportal + value: reportportal-crc + - name: pvc + value: pipelines-data + timeout: "15m" + diff --git a/catalog/pipelines/crc-qe-virtualized/0.9/lp_sort.yaml b/catalog/pipelines/crc-qe-virtualized/0.9/lp_sort.yaml new file mode 100644 index 0000000..403f029 --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.9/lp_sort.yaml @@ -0,0 +1,762 @@ +--- +apiVersion: tekton.dev/v1beta1 +kind: Pipeline +metadata: + annotations: + tekton.dev/categories: qe + tekton.dev/displayName: "qe for openshift local" + tekton.dev/pipelines.minVersion: "0.44.x" + tekton.dev/platforms: "linux/amd64" + tekton.dev/tags: openshift-local, qe, nested virualization + labels: + app.kubernetes.io/version: "0.9" + redhat.com/phase: qe + redhat.com/product: openshift-local + name: crc-qe-virtualized +spec: + description: >- + This pipeline will run the testing for openshift local on a specific linux version based on nested virtualization + finally: + - name: debug-info + params: + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + taskSpec: + params: + - description: path relative to workspace where to store keys + name: workspace-resources-path + steps: + - image: registry.access.redhat.com/ubi9/ubi-minimal + name: show-denug-info + script: | + #!/bin/sh + workspace_path=$(workspaces.pipelines-data.path)/$(params.workspace-resources-path) + echo "private key" + cat ${workspace_path}/id_rsa + echo "host" + cat ${workspace_path}/host + echo "username" + cat ${workspace_path}/username + workspaces: + - name: pipelines-data + when: + - input: $(params.rhel-version) + operator: notin + values: ["''"] + - input: $(params.debug) + operator: in + values: ["true"] + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: decomission-fedora + params: + - name: secret-aws-credentials + value: aws-crcqe-bot + - name: operation + value: destroy + - name: id + value: $(tasks.correlate.results.correlation) + - name: ownerKind + value: PipelineRun + - name: ownerName + value: $(context.pipelineRun.name) + - name: ownerUid + value: $(context.pipelineRun.uid) + taskRef: + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: v0.8.0 + - name: pathInRepo + value: tkn/infra-aws-fedora.yaml + resolver: git + timeout: "40m" + when: + - input: $(params.fedora-version) + operator: notin + values: ["''"] + - name: decomission-rhel + params: + - name: secret-aws-credentials + value: aws-crcqe-bot + - name: rh-credentials + value: credentials-rh-subs-crcqe-prod + - name: operation + value: destroy + - name: id + value: $(tasks.correlate.results.correlation) + - name: ownerKind + value: PipelineRun + - name: ownerName + value: $(context.pipelineRun.name) + - name: ownerUid + value: $(context.pipelineRun.uid) + taskRef: + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: v0.8.0 + - name: pathInRepo + value: tkn/infra-aws-rhel.yaml + resolver: git + timeout: "40m" + when: + - input: $(params.rhel-version) + operator: notin + values: ["''"] + - input: $(params.debug) + operator: in + values: ["false"] + - name: decomission-windows + params: + - name: secret-az-credentials + value: az-crcqe-bot + - name: id + value: $(tasks.correlate.results.correlation) + - name: operation + value: destroy + - name: ownerKind + value: PipelineRun + - name: ownerName + value: $(context.pipelineRun.name) + - name: ownerUid + value: $(context.pipelineRun.uid) + taskRef: + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: v0.8.0 + - name: pathInRepo + value: tkn/infra-azure-windows-desktop.yaml + resolver: git + timeout: "40m" + when: + - input: $(params.windows-featurepack) + operator: notin + values: ["''"] + - input: $(params.windows-version) + operator: notin + values: ["''"] + - name: reportportal-import + params: + - name: results-id + value: crc-$(tasks.crc-info.results.crc-version)-$(tasks.host-info.results.id) + - name: results-wsstorage-path + value: $(tasks.correlate.results.workspace-resources-path)/$(params.qe-worspace-subpath) + - name: debug + value: 'true' + - name: upload-log + value: 'true' + - name: launch-attributes + value: {"attributes": [{"key": "crc-version", "value": "$(tasks.crc-info.results.crc-version)"}, {"key": "skippedIssue", "value": true}]} + - name: launch-description + value: $(params.test-catalog) + - name: pipelinerunName + value: $(context.pipelineRun.name) + - name: secret-reportportal + value: reportportal-crc + - name: pvc + value: pipelines-data + taskRef: + params: + - name: url + value: https://github.com/crc-org/ci-definitions + - name: revision + value: main + - name: pathInRepo + value: reportportal/tkn/import.yaml + resolver: git + timeout: "15m" + params: + # Windows related params + - # default: 22h2-pro + default: "''" + description: windows feature pack (default "22h2-pro") + name: windows-featurepack + - # default: '11' + default: "''" + description: Major version for windows desktop 10 or 11 (default "11") + name: windows-version + # Fedora related params + - default: "''" + description: Fedora Cloud version (i.e 39, 38, 37...) + name: fedora-version + # Rhel related params + - default: "''" + description: Major.Minor RHEL version (i.e 9.3, 9.2, 9,1...) + name: rhel-version + - default: 'x86_64' + description: architecture for the target machine. Allowed x86_64 or arm64 (default "x86_64") + name: rhel-arch + # CRC params + - default: "''" + description: in case of an internal release we can not directly download it but upload fisrt to s3. This setup the base url for the assets to be uploaded + name: internal-base-url + - default: "''" + description: asset name to be uploaded + name: internal-asset-name + - default: "''" + description: shasum name to be uploaded + name: internal-shasum-name + - default: "''" + description: setup the name for the internal shasum on s3 + name: internal-shasum-target-name + - default: '' + description: full base url to download ditributables and shasumsfiles + name: downloadable-url + - default: sha256sum.txt + description: file name for shasum to check distributable + name: shasum-file + # QE params + - default: amd64 + description: type of arch (amd64, arm64). Defaults amd64. This should be align with rhel-arch param + name: qe-arch + - default: "''" + description: tags to select e2e scnearios. Default empty values which means all scnearios + name: e2e-tag + - default: qe-results + description: subpath on workspace where storing ephemeral qe results + name: qe-worspace-subpath + - default: 'true' + description: Control if e2e tests are executed. (true or false) + name: run-e2e + - default: 'true' + description: Control if integration tests are executed. (true or false) + name: run-integration + # S3 params (Storage results) + - default: datalake-aws + name: s3-data-secret + - default: crcqe-asia + name: s3-bucket + - description: target folder to store results. (Example release/2.9.0) + name: s3-folder-path + # Pipeline control params + - default: 'false' + description: control verbosity and keep instances after run for troubleshooting. + name: debug + - default: 'true' + description: cleanup target ephemeral target folders on each step which requires them + name: target-cleanup + - default: 'release-test' + description: Used for reportportal launch description + name: test-catalog + results: + - description: url to access e2e junit results + name: e2e-results-url + value: $(tasks.e2e-url-generator.results.url) + - description: url to access e2e junit results + name: integration-results-url + value: $(tasks.integration-url-generator.results.url) + tasks: + - name: correlate + taskRef: + name: gather-run-info + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: host-info + params: + - name: fedora-version + value: $(params.fedora-version) + - name: rhel-version + value: $(params.rhel-version) + - name: windows-version + value: $(params.windows-version)$(params.windows-featurepack) + runAfter: + - correlate + taskSpec: + params: + - name: fedora-version + - name: rhel-version + - name: windows-version + results: + - name: id + - name: os + - name: arch + steps: + - image: registry.access.redhat.com/ubi9/ubi-minimal + script: | + #!/bin/sh + arch="amd64" + os="linux" + id="" + if [[ $(params.fedora-version) != "" ]]; then + id="fedora-x86-$(params.fedora-version)" + fi + if [[ $(params.rhel-version) != "" ]]; then + id="rhel-x86-$(params.rhel-version)" + fi + if [[ $(params.windows-version) != "" ]]; then + os="windows" + id="windows-x86-$(params.windows-version)" + fi + echo -n "${id}" | tee $(results.id.path) + echo -n "${os}" | tee $(results.os.path) + echo -n "${arch}" | tee $(results.arch.path) + - name: s3-info + params: + - name: s3-data-secret + value: $(params.s3-data-secret) + - name: bucket + value: $(params.s3-bucket) + - name: folder-path + value: $(params.s3-folder-path)/$(tasks.host-info.results.id) + runAfter: + - host-info + taskRef: + name: gather-s3-info + - name: internal-asset-upload + params: + - name: asset-url + value: $(params.internal-base-url)/$(params.internal-asset-name) + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: s3-asset-name + value: $(params.internal-asset-name) + runAfter: + - s3-info + taskRef: + name: s3-sync-http + timeout: "15m" + when: + - input: $(params.internal-base-url) + operator: notin + values: ["''"] + - input: $(params.internal-asset-name) + operator: notin + values: ["''"] + - name: internal-shasum-upload + params: + - name: asset-url + value: $(params.internal-base-url)/$(params.internal-shasum-name) + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: s3-asset-name + value: $(params.internal-shasum-name) + runAfter: + - s3-info + taskRef: + name: s3-sync-http + timeout: "15m" + when: + - input: $(params.internal-base-url) + operator: notin + values: ["''"] + - input: $(params.internal-shasum-name) + operator: notin + values: ["''"] + - name: url-picker + params: + - name: internal-base-url + value: $(params.internal-base-url) + - name: public-base-url + value: $(tasks.s3-info.results.download-url) + - name: external-base-url + value: $(params.downloadable-url) + runAfter: + - s3-info + taskRef: + name: url-picker + - name: crc-info + params: + - name: platform + value: $(tasks.host-info.results.os) + runAfter: + - host-info + taskRef: + name: gather-crc-info + - name: provision-fedora + params: + - name: secret-aws-credentials + value: aws-crcqe-bot + - name: id + value: $(tasks.correlate.results.correlation) + - name: operation + value: create + - name: host-access-secret-name + value: host-info-$(tasks.correlate.results.correlation) + - name: ownerKind + value: PipelineRun + - name: ownerName + value: $(context.pipelineRun.name) + - name: ownerUid + value: $(context.pipelineRun.uid) + - name: nested-virt + value: 'true' + - name: version + value: $(params.fedora-version) + - name: tags + value: "pipelinerunName=$(context.pipelineRun.name)" + runAfter: + - s3-info + - crc-info + taskRef: + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: v0.8.0 + - name: pathInRepo + value: tkn/infra-aws-fedora.yaml + resolver: git + timeout: "20m" + when: + - input: $(params.fedora-version) + operator: notin + values: ["''"] + - name: provision-rhel + params: + - name: secret-aws-credentials + value: aws-crcqe-bot + - name: rh-credentials + value: credentials-rh-subs-crcqe-prod + - name: id + value: $(tasks.correlate.results.correlation) + - name: operation + value: create + - name: host-access-secret-name + value: host-info-$(tasks.correlate.results.correlation) + - name: ownerKind + value: PipelineRun + - name: ownerName + value: $(context.pipelineRun.name) + - name: ownerUid + value: $(context.pipelineRun.uid) + - name: nested-virt + value: 'true' + - name: arch + value: $(params.rhel-arch) + - name: version + value: $(params.rhel-version) + - name: tags + value: "pipelinerunName=$(context.pipelineRun.name)" + runAfter: + - s3-info + - crc-info + taskRef: + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: v0.8.0 + - name: pathInRepo + value: tkn/infra-aws-rhel.yaml + resolver: git + timeout: "20m" + when: + - input: $(params.rhel-version) + operator: notin + values: ["''"] + - name: provision-windows + params: + - name: secret-az-credentials + value: az-crcqe-bot + - name: id + value: $(tasks.correlate.results.correlation) + - name: operation + value: create + - name: host-access-secret-name + value: host-info-$(tasks.correlate.results.correlation) + - name: ownerKind + value: PipelineRun + - name: ownerName + value: $(context.pipelineRun.name) + - name: ownerUid + value: $(context.pipelineRun.uid) + - name: nested-virt + value: 'true' + - name: windows-featurepack + value: $(params.windows-featurepack) + - name: windows-version + value: $(params.windows-version) + - name: tags + value: "pipelinerunName=$(context.pipelineRun.name)" + runAfter: + - s3-info + - crc-info + taskRef: + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: v0.8.0 + - name: pathInRepo + value: tkn/infra-azure-windows-desktop.yaml + resolver: git + timeout: "20m" + when: + - input: $(params.windows-featurepack) + operator: notin + values: ["''"] + - input: $(params.windows-version) + operator: notin + values: ["''"] + - name: sync-provision + params: + - name: secret-host + value: host-info-$(tasks.correlate.results.correlation) + - name: workspace-resources-path + value: $(tasks.correlate.results.correlation) + runAfter: + - provision-fedora + - provision-rhel + - provision-windows + taskSpec: + description: This task will get the host info + params: + - name: secret-host + - name: workspace-resources-path + results: + - name: host + - name: username + - name: key-filename + steps: + - image: quay.io/rhqp/support-tools:v0.0.1 + name: sync + script: "#!/bin/sh \n\nset -exuo pipefail\n\nHOST_FILENAME=host\nUSERNAME_FILENAME=username\nKEY_FILENAME=id_rsa\n\nworkspace_path=\"/opt/host-secret\"\n\n# Check files\nwhile [ ! -f \"${workspace_path}/${HOST_FILENAME}\" ]; do sleep 1; done\nwhile [ ! -f \"${workspace_path}/${USERNAME_FILENAME}\" ]; do sleep 1; done\nwhile [ ! -f \"${workspace_path}/${KEY_FILENAME}\" ]; do sleep 1; done\n\n# Set results\ncat \"${workspace_path}/${HOST_FILENAME}\" | tee $(results.host.path) \ncat \"${workspace_path}/${USERNAME_FILENAME}\" | tee $(results.username.path) \ncp \"${workspace_path}/${KEY_FILENAME}\" /opt/storage/$(params.workspace-resources-path)\necho -n \"${KEY_FILENAME}\" | tee $(results.key-filename.path) \n" + volumeMounts: + - mountPath: /opt/host-secret + name: host-secret + - mountPath: /opt/storage + name: storage + volumes: + - name: host-secret + secret: + secretName: $(params.secret-host) + - name: storage + persistentVolumeClaim: + claimName: pipelines-data + timeout: "20m" + - name: install + params: + - name: os + value: $(tasks.host-info.results.os) + - name: host + value: $(tasks.sync-provision.results.host) + - name: username + value: $(tasks.sync-provision.results.username) + - name: key + value: $(tasks.sync-provision.results.key-filename) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + # Preparing crc version is only used for target path storage + - name: downloadable-version + value: $(tasks.crc-info.results.crc-version) + - name: downloadable-url + # Only accessible url within downloadable-url or internal uploaded composed url + value: $(tasks.url-picker.results.base-url) + - name: shasum-file + value: $(params.shasum-file) + runAfter: + - sync-provision + - internal-asset-upload + - internal-shasum-upload + taskRef: + params: + - name: bundle + value: quay.io/rhqp/crc-support-tkn:v0.5 + - name: name + value: crc-support + - name: kind + value: task + resolver: bundles + timeout: "1h" + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: qe + params: + - name: os + value: $(tasks.host-info.results.os) + - name: arch + value: $(params.qe-arch) + - name: host + value: $(tasks.sync-provision.results.host) + - name: username + value: $(tasks.sync-provision.results.username) + - name: key + value: $(tasks.sync-provision.results.key-filename) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: worspace-qe-subpath + value: $(params.qe-worspace-subpath) + - name: crc-version + value: $(tasks.crc-info.results.crc-version) + - name: run-e2e + value: $(params.run-e2e) + - name: e2e-tag + value: $(params.e2e-tag) + - name: e2e-cleanup-target + value: $(params.target-cleanup) + - name: run-integration + value: $(params.run-integration) + - name: integration-cleanup-target + value: $(params.target-cleanup) + - name: debug + value: $(params.debug) + runAfter: + - install + taskRef: + params: + - name: bundle + value: quay.io/rhqp/crc-e2e-tkn:v1.0.0 + - name: name + value: crc-e2e + - name: kind + value: task + resolver: bundles + timeout: "5h" + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: ocp-pullsecret + workspace: ocp-pullsecret + - name: datalake-sink + params: + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: workspace-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: workspace-subpath + value: $(params.qe-worspace-subpath) + # Do not delete to keep tf state to decomission on final + # This task should be splitted to allow only cleaning up + - name: workspace-cleanup + value: 'false' + runAfter: + - qe + taskRef: + name: s3-sink-workspace + timeout: "15m" + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: integration-url-generator + params: + - name: base-url + value: $(tasks.s3-info.results.download-url) + - name: context + value: $(params.qe-worspace-subpath) + - name: asset-name + value: integration-junit.xml + runAfter: + - datalake-sink + taskRef: + name: url-generator + - name: e2e-url-generator + params: + - name: base-url + value: $(tasks.s3-info.results.download-url) + - name: context + value: $(params.qe-worspace-subpath) + - name: asset-name + value: e2e-junit.xml + runAfter: + - datalake-sink + taskRef: + name: url-generator + workspaces: + - name: pipelines-data + # This is required when targets are spin on AWS + - # optional: true + description: | + This secret will hold the credentials to the target cloud provider it could match depending on the target: + + ## AWS + ocp secret holding the aws credentials. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: aws-${name} + labels: + app.kubernetes.io/component: ${name} + app.kubernetes.io/part-of: qe-platform + type: Opaque + data: + access-key: ${access_key} + secret-key: ${secret_key} + region: ${region} + + ## Azure + ocp secret holding the azure credentials. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: az-${name} + labels: + app.kubernetes.io/component: ${name} + app.kubernetes.io/part-of: qe-platform + type: Opaque + data: + tenant_id: ${tenant_id} + subscription_id: ${subscription_id} + client_id: ${client_id} + client_secret: ${client_secret} + name: cloud-credentials + - description: | + ocp secret holding the credentials for a valid rh user to subscribe VM. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: credentials-${configname} + type: Opaque + data: + user: ${user} + password: ${password} + name: rh-account-secret + optional: true + - description: | + ocp secret holding the report portal credentials. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: XXX + type: Opaque + data: + token: XXXX + url: XXXX + project: XXXX + name: reportportal-credentials + - description: | + crc secret name holding the pullsecret. This is only required if backed tested is crc preset + + secret should match following format: + --- + apiVersion: v1 + kind: Secret + metadata: + name: ${secret-name} + type: Opaque + data: + pullsecret: ${pullsecret-value} + name: ocp-pullsecret diff --git a/catalog/pipelines/crc-qe-virtualized/0.9/p.yaml b/catalog/pipelines/crc-qe-virtualized/0.9/p.yaml new file mode 100644 index 0000000..b11018c --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.9/p.yaml @@ -0,0 +1,819 @@ +apiVersion: tekton.dev/v1 +kind: Pipeline +metadata: + annotations: + tekton.dev/categories: qe + tekton.dev/displayName: qe for openshift local + tekton.dev/pipelines.minVersion: 0.44.x + tekton.dev/platforms: linux/amd64 + tekton.dev/tags: openshift-local, qe, nested virualization + creationTimestamp: "2024-06-12T02:43:56Z" + generation: 41 + labels: + app.kubernetes.io/version: "0.9" + paas.redhat.com/appcode: OLQE-001 + redhat.com/phase: qe + redhat.com/product: openshift-local + name: crc-qe-virtualized + namespace: devtoolsqe--pipeline + resourceVersion: "1844930934" + uid: a1c74d87-98ee-48b0-a14d-73126a21767a +spec: + description: This pipeline will run the testing for openshift local on a specific linux version based on nested virtualization + finally: + - name: debug-info + params: + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + taskSpec: + metadata: {} + params: + - description: path relative to workspace where to store keys + name: workspace-resources-path + type: string + spec: null + steps: + - computeResources: {} + image: registry.access.redhat.com/ubi9/ubi-minimal + name: show-denug-info + script: | + #!/bin/sh + workspace_path=$(workspaces.pipelines-data.path)/$(params.workspace-resources-path) + echo "private key" + cat ${workspace_path}/id_rsa + echo "host" + cat ${workspace_path}/host + echo "username" + cat ${workspace_path}/username + workspaces: + - name: pipelines-data + when: + - input: $(params.rhel-version) + operator: notin + values: + - '''''' + - input: $(params.debug) + operator: in + values: + - "true" + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: decomission-fedora + params: + - name: secret-aws-credentials + value: aws-crcqe-bot + - name: operation + value: destroy + - name: id + value: $(tasks.correlate.results.correlation) + - name: ownerKind + value: PipelineRun + - name: ownerName + value: $(context.pipelineRun.name) + - name: ownerUid + value: $(context.pipelineRun.uid) + taskRef: + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: v0.8.0 + - name: pathInRepo + value: tkn/infra-aws-fedora.yaml + resolver: git + timeout: 40m0s + when: + - input: $(params.fedora-version) + operator: notin + values: + - '''''' + - name: decomission-rhel + params: + - name: secret-aws-credentials + value: aws-crcqe-bot + - name: rh-credentials + value: credentials-rh-subs-crcqe-prod + - name: operation + value: destroy + - name: id + value: $(tasks.correlate.results.correlation) + - name: ownerKind + value: PipelineRun + - name: ownerName + value: $(context.pipelineRun.name) + - name: ownerUid + value: $(context.pipelineRun.uid) + taskRef: + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: v0.8.0 + - name: pathInRepo + value: tkn/infra-aws-rhel.yaml + resolver: git + timeout: 40m0s + when: + - input: $(params.rhel-version) + operator: notin + values: + - '''''' + - input: $(params.debug) + operator: in + values: + - "false" + - name: decomission-windows + params: + - name: secret-az-credentials + value: az-crcqe-bot + - name: id + value: $(tasks.correlate.results.correlation) + - name: operation + value: destroy + - name: ownerKind + value: PipelineRun + - name: ownerName + value: $(context.pipelineRun.name) + - name: ownerUid + value: $(context.pipelineRun.uid) + taskRef: + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: v0.8.0 + - name: pathInRepo + value: tkn/infra-azure-windows-desktop.yaml + resolver: git + timeout: 40m0s + when: + - input: $(params.windows-featurepack) + operator: notin + values: + - '''''' + - input: $(params.windows-version) + operator: notin + values: + - '''''' + - name: reportportal-import + params: + - name: results-id + value: crc-$(tasks.crc-info.results.crc-version)-$(tasks.host-info.results.id) + - name: results-wsstorage-path + value: $(tasks.correlate.results.workspace-resources-path)/$(params.qe-worspace-subpath) + - name: debug + value: "true" + - name: upload-log + value: "true" + - name: launch-attributes + value: '{"attributes":[{"key":"crc-version","value":"$(tasks.crc-info.results.crc-version)"},{"key":"skippedIssue","value":true}]}' + - name: launch-description + value: $(params.test-catalog) + - name: pipelinerunName + value: $(context.pipelineRun.name) + - name: secret-reportportal + value: reportportal-crc + - name: pvc + value: pipelines-data + taskRef: + params: + - name: url + value: https://github.com/crc-org/ci-definitions + - name: revision + value: main + - name: pathInRepo + value: reportportal/tkn/import.yaml + resolver: git + timeout: 15m0s + params: + - default: '''''' + description: windows feature pack (default "22h2-pro") + name: windows-featurepack + type: string + - default: '''''' + description: Major version for windows desktop 10 or 11 (default "11") + name: windows-version + type: string + - default: '''''' + description: Fedora Cloud version (i.e 39, 38, 37...) + name: fedora-version + type: string + - default: '''''' + description: Major.Minor RHEL version (i.e 9.3, 9.2, 9,1...) + name: rhel-version + type: string + - default: x86_64 + description: architecture for the target machine. Allowed x86_64 or arm64 (default "x86_64") + name: rhel-arch + type: string + - default: '''''' + description: in case of an internal release we can not directly download it but upload fisrt to s3. This setup the base url for the assets to be uploaded + name: internal-base-url + type: string + - default: '''''' + description: asset name to be uploaded + name: internal-asset-name + type: string + - default: '''''' + description: shasum name to be uploaded + name: internal-shasum-name + type: string + - default: '''''' + description: setup the name for the internal shasum on s3 + name: internal-shasum-target-name + type: string + - default: "" + description: full base url to download ditributables and shasumsfiles + name: downloadable-url + type: string + - default: sha256sum.txt + description: file name for shasum to check distributable + name: shasum-file + type: string + - default: amd64 + description: type of arch (amd64, arm64). Defaults amd64. This should be align with rhel-arch param + name: qe-arch + type: string + - default: '''''' + description: tags to select e2e scnearios. Default empty values which means all scnearios + name: e2e-tag + type: string + - default: qe-results + description: subpath on workspace where storing ephemeral qe results + name: qe-worspace-subpath + type: string + - default: "true" + description: Control if e2e tests are executed. (true or false) + name: run-e2e + type: string + - default: "true" + description: Control if integration tests are executed. (true or false) + name: run-integration + type: string + - default: datalake-aws + name: s3-data-secret + type: string + - default: crcqe-asia + name: s3-bucket + type: string + - description: target folder to store results. (Example release/2.9.0) + name: s3-folder-path + type: string + - default: "false" + description: control verbosity and keep instances after run for troubleshooting. + name: debug + type: string + - default: "true" + description: cleanup target ephemeral target folders on each step which requires them + name: target-cleanup + type: string + - default: release-test + description: Used for reportportal launch description + name: test-catalog + type: string + results: + - description: url to access e2e junit results + name: e2e-results-url + value: $(tasks.e2e-url-generator.results.url) + - description: url to access e2e junit results + name: integration-results-url + value: $(tasks.integration-url-generator.results.url) + tasks: + - name: correlate + taskRef: + kind: Task + name: gather-run-info + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: host-info + params: + - name: fedora-version + value: $(params.fedora-version) + - name: rhel-version + value: $(params.rhel-version) + - name: windows-version + value: $(params.windows-version)$(params.windows-featurepack) + runAfter: + - correlate + taskSpec: + metadata: {} + params: + - name: fedora-version + type: string + - name: rhel-version + type: string + - name: windows-version + type: string + results: + - name: id + type: string + - name: os + type: string + - name: arch + type: string + spec: null + steps: + - computeResources: {} + image: registry.access.redhat.com/ubi9/ubi-minimal + name: "" + script: | + #!/bin/sh + arch="amd64" + os="linux" + id="" + if [[ $(params.fedora-version) != "" ]]; then + id="fedora-x86-$(params.fedora-version)" + fi + if [[ $(params.rhel-version) != "" ]]; then + id="rhel-x86-$(params.rhel-version)" + fi + if [[ $(params.windows-version) != "" ]]; then + os="windows" + id="windows-x86-$(params.windows-version)" + fi + echo -n "${id}" | tee $(results.id.path) + echo -n "${os}" | tee $(results.os.path) + echo -n "${arch}" | tee $(results.arch.path) + - name: s3-info + params: + - name: s3-data-secret + value: $(params.s3-data-secret) + - name: bucket + value: $(params.s3-bucket) + - name: folder-path + value: $(params.s3-folder-path)/$(tasks.host-info.results.id) + runAfter: + - host-info + taskRef: + kind: Task + name: gather-s3-info + - name: internal-asset-upload + params: + - name: asset-url + value: $(params.internal-base-url)/$(params.internal-asset-name) + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: s3-asset-name + value: $(params.internal-asset-name) + runAfter: + - s3-info + taskRef: + kind: Task + name: s3-sync-http + timeout: 15m0s + when: + - input: $(params.internal-base-url) + operator: notin + values: + - '''''' + - input: $(params.internal-asset-name) + operator: notin + values: + - '''''' + - name: internal-shasum-upload + params: + - name: asset-url + value: $(params.internal-base-url)/$(params.internal-shasum-name) + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: s3-asset-name + value: $(params.internal-shasum-name) + runAfter: + - s3-info + taskRef: + kind: Task + name: s3-sync-http + timeout: 15m0s + when: + - input: $(params.internal-base-url) + operator: notin + values: + - '''''' + - input: $(params.internal-shasum-name) + operator: notin + values: + - '''''' + - name: url-picker + params: + - name: internal-base-url + value: $(params.internal-base-url) + - name: public-base-url + value: $(tasks.s3-info.results.download-url) + - name: external-base-url + value: $(params.downloadable-url) + runAfter: + - s3-info + taskRef: + kind: Task + name: url-picker + - name: crc-info + params: + - name: platform + value: $(tasks.host-info.results.os) + runAfter: + - host-info + taskRef: + kind: Task + name: gather-crc-info + - name: provision-fedora + params: + - name: secret-aws-credentials + value: aws-crcqe-bot + - name: id + value: $(tasks.correlate.results.correlation) + - name: operation + value: create + - name: host-access-secret-name + value: host-info-$(tasks.correlate.results.correlation) + - name: ownerKind + value: PipelineRun + - name: ownerName + value: $(context.pipelineRun.name) + - name: ownerUid + value: $(context.pipelineRun.uid) + - name: nested-virt + value: "true" + - name: version + value: $(params.fedora-version) + - name: tags + value: pipelinerunName=$(context.pipelineRun.name) + runAfter: + - s3-info + - crc-info + taskRef: + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: v0.8.0 + - name: pathInRepo + value: tkn/infra-aws-fedora.yaml + resolver: git + timeout: 20m0s + when: + - input: $(params.fedora-version) + operator: notin + values: + - '''''' + - name: provision-rhel + params: + - name: secret-aws-credentials + value: aws-crcqe-bot + - name: rh-credentials + value: credentials-rh-subs-crcqe-prod + - name: id + value: $(tasks.correlate.results.correlation) + - name: operation + value: create + - name: host-access-secret-name + value: host-info-$(tasks.correlate.results.correlation) + - name: ownerKind + value: PipelineRun + - name: ownerName + value: $(context.pipelineRun.name) + - name: ownerUid + value: $(context.pipelineRun.uid) + - name: nested-virt + value: "true" + - name: arch + value: $(params.rhel-arch) + - name: version + value: $(params.rhel-version) + - name: tags + value: pipelinerunName=$(context.pipelineRun.name) + runAfter: + - s3-info + - crc-info + taskRef: + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: v0.8.0 + - name: pathInRepo + value: tkn/infra-aws-rhel.yaml + resolver: git + timeout: 20m0s + when: + - input: $(params.rhel-version) + operator: notin + values: + - '''''' + - name: provision-windows + params: + - name: secret-az-credentials + value: az-crcqe-bot + - name: id + value: $(tasks.correlate.results.correlation) + - name: operation + value: create + - name: host-access-secret-name + value: host-info-$(tasks.correlate.results.correlation) + - name: ownerKind + value: PipelineRun + - name: ownerName + value: $(context.pipelineRun.name) + - name: ownerUid + value: $(context.pipelineRun.uid) + - name: nested-virt + value: "true" + - name: windows-featurepack + value: $(params.windows-featurepack) + - name: windows-version + value: $(params.windows-version) + - name: tags + value: pipelinerunName=$(context.pipelineRun.name) + runAfter: + - s3-info + - crc-info + taskRef: + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: v0.8.0 + - name: pathInRepo + value: tkn/infra-azure-windows-desktop.yaml + resolver: git + timeout: 20m0s + when: + - input: $(params.windows-featurepack) + operator: notin + values: + - '''''' + - input: $(params.windows-version) + operator: notin + values: + - '''''' + - name: sync-provision + params: + - name: secret-host + value: host-info-$(tasks.correlate.results.correlation) + - name: workspace-resources-path + value: $(tasks.correlate.results.correlation) + runAfter: + - provision-fedora + - provision-rhel + - provision-windows + taskSpec: + description: This task will get the host info + metadata: {} + params: + - name: secret-host + type: string + - name: workspace-resources-path + type: string + results: + - name: host + type: string + - name: username + type: string + - name: key-filename + type: string + spec: null + steps: + - computeResources: {} + image: quay.io/rhqp/support-tools:v0.0.1 + name: sync + script: "#!/bin/sh \n\nset -exuo pipefail\n\nHOST_FILENAME=host\nUSERNAME_FILENAME=username\nKEY_FILENAME=id_rsa\n\nworkspace_path=\"/opt/host-secret\"\n\n# Check files\nwhile [ ! -f \"${workspace_path}/${HOST_FILENAME}\" ]; do sleep 1; done\nwhile [ ! -f \"${workspace_path}/${USERNAME_FILENAME}\" ]; do sleep 1; done\nwhile [ ! -f \"${workspace_path}/${KEY_FILENAME}\" ]; do sleep 1; done\n\n# Set results\ncat \"${workspace_path}/${HOST_FILENAME}\" | tee $(results.host.path) \ncat \"${workspace_path}/${USERNAME_FILENAME}\" | tee $(results.username.path) \ncp \"${workspace_path}/${KEY_FILENAME}\" /opt/storage/$(params.workspace-resources-path)\necho -n \"${KEY_FILENAME}\" | tee $(results.key-filename.path) \n" + volumeMounts: + - mountPath: /opt/host-secret + name: host-secret + - mountPath: /opt/storage + name: storage + volumes: + - name: host-secret + secret: + secretName: $(params.secret-host) + - name: storage + persistentVolumeClaim: + claimName: pipelines-data + timeout: 20m0s + - name: install + params: + - name: os + value: $(tasks.host-info.results.os) + - name: host + value: $(tasks.sync-provision.results.host) + - name: username + value: $(tasks.sync-provision.results.username) + - name: key + value: $(tasks.sync-provision.results.key-filename) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: downloadable-version + value: $(tasks.crc-info.results.crc-version) + - name: downloadable-url + value: $(tasks.url-picker.results.base-url) + - name: shasum-file + value: $(params.shasum-file) + runAfter: + - sync-provision + - internal-asset-upload + - internal-shasum-upload + taskRef: + params: + - name: bundle + value: quay.io/rhqp/crc-support-tkn:v0.5 + - name: name + value: crc-support + - name: kind + value: task + resolver: bundles + timeout: 1h0m0s + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: qe + params: + - name: os + value: $(tasks.host-info.results.os) + - name: arch + value: $(params.qe-arch) + - name: host + value: $(tasks.sync-provision.results.host) + - name: username + value: $(tasks.sync-provision.results.username) + - name: key + value: $(tasks.sync-provision.results.key-filename) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: worspace-qe-subpath + value: $(params.qe-worspace-subpath) + - name: crc-version + value: $(tasks.crc-info.results.crc-version) + - name: run-e2e + value: $(params.run-e2e) + - name: e2e-tag + value: $(params.e2e-tag) + - name: e2e-cleanup-target + value: $(params.target-cleanup) + - name: run-integration + value: $(params.run-integration) + - name: integration-cleanup-target + value: $(params.target-cleanup) + - name: debug + value: $(params.debug) + runAfter: + - install + taskRef: + params: + - name: bundle + value: quay.io/rhqp/crc-e2e-tkn:v1.0.0 + - name: name + value: crc-e2e + - name: kind + value: task + resolver: bundles + timeout: 5h0m0s + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: ocp-pullsecret + workspace: ocp-pullsecret + - name: datalake-sink + params: + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: workspace-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: workspace-subpath + value: $(params.qe-worspace-subpath) + - name: workspace-cleanup + value: "false" + runAfter: + - qe + taskRef: + kind: Task + name: s3-sink-workspace + timeout: 15m0s + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: integration-url-generator + params: + - name: base-url + value: $(tasks.s3-info.results.download-url) + - name: context + value: $(params.qe-worspace-subpath) + - name: asset-name + value: integration-junit.xml + runAfter: + - datalake-sink + taskRef: + kind: Task + name: url-generator + - name: e2e-url-generator + params: + - name: base-url + value: $(tasks.s3-info.results.download-url) + - name: context + value: $(params.qe-worspace-subpath) + - name: asset-name + value: e2e-junit.xml + runAfter: + - datalake-sink + taskRef: + kind: Task + name: url-generator + workspaces: + - name: pipelines-data + - description: | + This secret will hold the credentials to the target cloud provider it could match depending on the target: + + ## AWS + ocp secret holding the aws credentials. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: aws-${name} + labels: + app.kubernetes.io/component: ${name} + app.kubernetes.io/part-of: qe-platform + type: Opaque + data: + access-key: ${access_key} + secret-key: ${secret_key} + region: ${region} + + ## Azure + ocp secret holding the azure credentials. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: az-${name} + labels: + app.kubernetes.io/component: ${name} + app.kubernetes.io/part-of: qe-platform + type: Opaque + data: + tenant_id: ${tenant_id} + subscription_id: ${subscription_id} + client_id: ${client_id} + client_secret: ${client_secret} + name: cloud-credentials + - description: | + ocp secret holding the credentials for a valid rh user to subscribe VM. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: credentials-${configname} + type: Opaque + data: + user: ${user} + password: ${password} + name: rh-account-secret + optional: true + - description: | + ocp secret holding the report portal credentials. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: XXX + type: Opaque + data: + token: XXXX + url: XXXX + project: XXXX + name: reportportal-credentials + - description: | + crc secret name holding the pullsecret. This is only required if backed tested is crc preset + + secret should match following format: + --- + apiVersion: v1 + kind: Secret + metadata: + name: ${secret-name} + type: Opaque + data: + pullsecret: ${pullsecret-value} + name: ocp-pullsecret diff --git a/catalog/pipelines/crc-qe-virtualized/0.9/p_sort.yaml b/catalog/pipelines/crc-qe-virtualized/0.9/p_sort.yaml new file mode 100644 index 0000000..b11018c --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/0.9/p_sort.yaml @@ -0,0 +1,819 @@ +apiVersion: tekton.dev/v1 +kind: Pipeline +metadata: + annotations: + tekton.dev/categories: qe + tekton.dev/displayName: qe for openshift local + tekton.dev/pipelines.minVersion: 0.44.x + tekton.dev/platforms: linux/amd64 + tekton.dev/tags: openshift-local, qe, nested virualization + creationTimestamp: "2024-06-12T02:43:56Z" + generation: 41 + labels: + app.kubernetes.io/version: "0.9" + paas.redhat.com/appcode: OLQE-001 + redhat.com/phase: qe + redhat.com/product: openshift-local + name: crc-qe-virtualized + namespace: devtoolsqe--pipeline + resourceVersion: "1844930934" + uid: a1c74d87-98ee-48b0-a14d-73126a21767a +spec: + description: This pipeline will run the testing for openshift local on a specific linux version based on nested virtualization + finally: + - name: debug-info + params: + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + taskSpec: + metadata: {} + params: + - description: path relative to workspace where to store keys + name: workspace-resources-path + type: string + spec: null + steps: + - computeResources: {} + image: registry.access.redhat.com/ubi9/ubi-minimal + name: show-denug-info + script: | + #!/bin/sh + workspace_path=$(workspaces.pipelines-data.path)/$(params.workspace-resources-path) + echo "private key" + cat ${workspace_path}/id_rsa + echo "host" + cat ${workspace_path}/host + echo "username" + cat ${workspace_path}/username + workspaces: + - name: pipelines-data + when: + - input: $(params.rhel-version) + operator: notin + values: + - '''''' + - input: $(params.debug) + operator: in + values: + - "true" + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: decomission-fedora + params: + - name: secret-aws-credentials + value: aws-crcqe-bot + - name: operation + value: destroy + - name: id + value: $(tasks.correlate.results.correlation) + - name: ownerKind + value: PipelineRun + - name: ownerName + value: $(context.pipelineRun.name) + - name: ownerUid + value: $(context.pipelineRun.uid) + taskRef: + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: v0.8.0 + - name: pathInRepo + value: tkn/infra-aws-fedora.yaml + resolver: git + timeout: 40m0s + when: + - input: $(params.fedora-version) + operator: notin + values: + - '''''' + - name: decomission-rhel + params: + - name: secret-aws-credentials + value: aws-crcqe-bot + - name: rh-credentials + value: credentials-rh-subs-crcqe-prod + - name: operation + value: destroy + - name: id + value: $(tasks.correlate.results.correlation) + - name: ownerKind + value: PipelineRun + - name: ownerName + value: $(context.pipelineRun.name) + - name: ownerUid + value: $(context.pipelineRun.uid) + taskRef: + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: v0.8.0 + - name: pathInRepo + value: tkn/infra-aws-rhel.yaml + resolver: git + timeout: 40m0s + when: + - input: $(params.rhel-version) + operator: notin + values: + - '''''' + - input: $(params.debug) + operator: in + values: + - "false" + - name: decomission-windows + params: + - name: secret-az-credentials + value: az-crcqe-bot + - name: id + value: $(tasks.correlate.results.correlation) + - name: operation + value: destroy + - name: ownerKind + value: PipelineRun + - name: ownerName + value: $(context.pipelineRun.name) + - name: ownerUid + value: $(context.pipelineRun.uid) + taskRef: + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: v0.8.0 + - name: pathInRepo + value: tkn/infra-azure-windows-desktop.yaml + resolver: git + timeout: 40m0s + when: + - input: $(params.windows-featurepack) + operator: notin + values: + - '''''' + - input: $(params.windows-version) + operator: notin + values: + - '''''' + - name: reportportal-import + params: + - name: results-id + value: crc-$(tasks.crc-info.results.crc-version)-$(tasks.host-info.results.id) + - name: results-wsstorage-path + value: $(tasks.correlate.results.workspace-resources-path)/$(params.qe-worspace-subpath) + - name: debug + value: "true" + - name: upload-log + value: "true" + - name: launch-attributes + value: '{"attributes":[{"key":"crc-version","value":"$(tasks.crc-info.results.crc-version)"},{"key":"skippedIssue","value":true}]}' + - name: launch-description + value: $(params.test-catalog) + - name: pipelinerunName + value: $(context.pipelineRun.name) + - name: secret-reportportal + value: reportportal-crc + - name: pvc + value: pipelines-data + taskRef: + params: + - name: url + value: https://github.com/crc-org/ci-definitions + - name: revision + value: main + - name: pathInRepo + value: reportportal/tkn/import.yaml + resolver: git + timeout: 15m0s + params: + - default: '''''' + description: windows feature pack (default "22h2-pro") + name: windows-featurepack + type: string + - default: '''''' + description: Major version for windows desktop 10 or 11 (default "11") + name: windows-version + type: string + - default: '''''' + description: Fedora Cloud version (i.e 39, 38, 37...) + name: fedora-version + type: string + - default: '''''' + description: Major.Minor RHEL version (i.e 9.3, 9.2, 9,1...) + name: rhel-version + type: string + - default: x86_64 + description: architecture for the target machine. Allowed x86_64 or arm64 (default "x86_64") + name: rhel-arch + type: string + - default: '''''' + description: in case of an internal release we can not directly download it but upload fisrt to s3. This setup the base url for the assets to be uploaded + name: internal-base-url + type: string + - default: '''''' + description: asset name to be uploaded + name: internal-asset-name + type: string + - default: '''''' + description: shasum name to be uploaded + name: internal-shasum-name + type: string + - default: '''''' + description: setup the name for the internal shasum on s3 + name: internal-shasum-target-name + type: string + - default: "" + description: full base url to download ditributables and shasumsfiles + name: downloadable-url + type: string + - default: sha256sum.txt + description: file name for shasum to check distributable + name: shasum-file + type: string + - default: amd64 + description: type of arch (amd64, arm64). Defaults amd64. This should be align with rhel-arch param + name: qe-arch + type: string + - default: '''''' + description: tags to select e2e scnearios. Default empty values which means all scnearios + name: e2e-tag + type: string + - default: qe-results + description: subpath on workspace where storing ephemeral qe results + name: qe-worspace-subpath + type: string + - default: "true" + description: Control if e2e tests are executed. (true or false) + name: run-e2e + type: string + - default: "true" + description: Control if integration tests are executed. (true or false) + name: run-integration + type: string + - default: datalake-aws + name: s3-data-secret + type: string + - default: crcqe-asia + name: s3-bucket + type: string + - description: target folder to store results. (Example release/2.9.0) + name: s3-folder-path + type: string + - default: "false" + description: control verbosity and keep instances after run for troubleshooting. + name: debug + type: string + - default: "true" + description: cleanup target ephemeral target folders on each step which requires them + name: target-cleanup + type: string + - default: release-test + description: Used for reportportal launch description + name: test-catalog + type: string + results: + - description: url to access e2e junit results + name: e2e-results-url + value: $(tasks.e2e-url-generator.results.url) + - description: url to access e2e junit results + name: integration-results-url + value: $(tasks.integration-url-generator.results.url) + tasks: + - name: correlate + taskRef: + kind: Task + name: gather-run-info + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: host-info + params: + - name: fedora-version + value: $(params.fedora-version) + - name: rhel-version + value: $(params.rhel-version) + - name: windows-version + value: $(params.windows-version)$(params.windows-featurepack) + runAfter: + - correlate + taskSpec: + metadata: {} + params: + - name: fedora-version + type: string + - name: rhel-version + type: string + - name: windows-version + type: string + results: + - name: id + type: string + - name: os + type: string + - name: arch + type: string + spec: null + steps: + - computeResources: {} + image: registry.access.redhat.com/ubi9/ubi-minimal + name: "" + script: | + #!/bin/sh + arch="amd64" + os="linux" + id="" + if [[ $(params.fedora-version) != "" ]]; then + id="fedora-x86-$(params.fedora-version)" + fi + if [[ $(params.rhel-version) != "" ]]; then + id="rhel-x86-$(params.rhel-version)" + fi + if [[ $(params.windows-version) != "" ]]; then + os="windows" + id="windows-x86-$(params.windows-version)" + fi + echo -n "${id}" | tee $(results.id.path) + echo -n "${os}" | tee $(results.os.path) + echo -n "${arch}" | tee $(results.arch.path) + - name: s3-info + params: + - name: s3-data-secret + value: $(params.s3-data-secret) + - name: bucket + value: $(params.s3-bucket) + - name: folder-path + value: $(params.s3-folder-path)/$(tasks.host-info.results.id) + runAfter: + - host-info + taskRef: + kind: Task + name: gather-s3-info + - name: internal-asset-upload + params: + - name: asset-url + value: $(params.internal-base-url)/$(params.internal-asset-name) + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: s3-asset-name + value: $(params.internal-asset-name) + runAfter: + - s3-info + taskRef: + kind: Task + name: s3-sync-http + timeout: 15m0s + when: + - input: $(params.internal-base-url) + operator: notin + values: + - '''''' + - input: $(params.internal-asset-name) + operator: notin + values: + - '''''' + - name: internal-shasum-upload + params: + - name: asset-url + value: $(params.internal-base-url)/$(params.internal-shasum-name) + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: s3-asset-name + value: $(params.internal-shasum-name) + runAfter: + - s3-info + taskRef: + kind: Task + name: s3-sync-http + timeout: 15m0s + when: + - input: $(params.internal-base-url) + operator: notin + values: + - '''''' + - input: $(params.internal-shasum-name) + operator: notin + values: + - '''''' + - name: url-picker + params: + - name: internal-base-url + value: $(params.internal-base-url) + - name: public-base-url + value: $(tasks.s3-info.results.download-url) + - name: external-base-url + value: $(params.downloadable-url) + runAfter: + - s3-info + taskRef: + kind: Task + name: url-picker + - name: crc-info + params: + - name: platform + value: $(tasks.host-info.results.os) + runAfter: + - host-info + taskRef: + kind: Task + name: gather-crc-info + - name: provision-fedora + params: + - name: secret-aws-credentials + value: aws-crcqe-bot + - name: id + value: $(tasks.correlate.results.correlation) + - name: operation + value: create + - name: host-access-secret-name + value: host-info-$(tasks.correlate.results.correlation) + - name: ownerKind + value: PipelineRun + - name: ownerName + value: $(context.pipelineRun.name) + - name: ownerUid + value: $(context.pipelineRun.uid) + - name: nested-virt + value: "true" + - name: version + value: $(params.fedora-version) + - name: tags + value: pipelinerunName=$(context.pipelineRun.name) + runAfter: + - s3-info + - crc-info + taskRef: + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: v0.8.0 + - name: pathInRepo + value: tkn/infra-aws-fedora.yaml + resolver: git + timeout: 20m0s + when: + - input: $(params.fedora-version) + operator: notin + values: + - '''''' + - name: provision-rhel + params: + - name: secret-aws-credentials + value: aws-crcqe-bot + - name: rh-credentials + value: credentials-rh-subs-crcqe-prod + - name: id + value: $(tasks.correlate.results.correlation) + - name: operation + value: create + - name: host-access-secret-name + value: host-info-$(tasks.correlate.results.correlation) + - name: ownerKind + value: PipelineRun + - name: ownerName + value: $(context.pipelineRun.name) + - name: ownerUid + value: $(context.pipelineRun.uid) + - name: nested-virt + value: "true" + - name: arch + value: $(params.rhel-arch) + - name: version + value: $(params.rhel-version) + - name: tags + value: pipelinerunName=$(context.pipelineRun.name) + runAfter: + - s3-info + - crc-info + taskRef: + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: v0.8.0 + - name: pathInRepo + value: tkn/infra-aws-rhel.yaml + resolver: git + timeout: 20m0s + when: + - input: $(params.rhel-version) + operator: notin + values: + - '''''' + - name: provision-windows + params: + - name: secret-az-credentials + value: az-crcqe-bot + - name: id + value: $(tasks.correlate.results.correlation) + - name: operation + value: create + - name: host-access-secret-name + value: host-info-$(tasks.correlate.results.correlation) + - name: ownerKind + value: PipelineRun + - name: ownerName + value: $(context.pipelineRun.name) + - name: ownerUid + value: $(context.pipelineRun.uid) + - name: nested-virt + value: "true" + - name: windows-featurepack + value: $(params.windows-featurepack) + - name: windows-version + value: $(params.windows-version) + - name: tags + value: pipelinerunName=$(context.pipelineRun.name) + runAfter: + - s3-info + - crc-info + taskRef: + params: + - name: url + value: https://github.com/redhat-developer/mapt.git + - name: revision + value: v0.8.0 + - name: pathInRepo + value: tkn/infra-azure-windows-desktop.yaml + resolver: git + timeout: 20m0s + when: + - input: $(params.windows-featurepack) + operator: notin + values: + - '''''' + - input: $(params.windows-version) + operator: notin + values: + - '''''' + - name: sync-provision + params: + - name: secret-host + value: host-info-$(tasks.correlate.results.correlation) + - name: workspace-resources-path + value: $(tasks.correlate.results.correlation) + runAfter: + - provision-fedora + - provision-rhel + - provision-windows + taskSpec: + description: This task will get the host info + metadata: {} + params: + - name: secret-host + type: string + - name: workspace-resources-path + type: string + results: + - name: host + type: string + - name: username + type: string + - name: key-filename + type: string + spec: null + steps: + - computeResources: {} + image: quay.io/rhqp/support-tools:v0.0.1 + name: sync + script: "#!/bin/sh \n\nset -exuo pipefail\n\nHOST_FILENAME=host\nUSERNAME_FILENAME=username\nKEY_FILENAME=id_rsa\n\nworkspace_path=\"/opt/host-secret\"\n\n# Check files\nwhile [ ! -f \"${workspace_path}/${HOST_FILENAME}\" ]; do sleep 1; done\nwhile [ ! -f \"${workspace_path}/${USERNAME_FILENAME}\" ]; do sleep 1; done\nwhile [ ! -f \"${workspace_path}/${KEY_FILENAME}\" ]; do sleep 1; done\n\n# Set results\ncat \"${workspace_path}/${HOST_FILENAME}\" | tee $(results.host.path) \ncat \"${workspace_path}/${USERNAME_FILENAME}\" | tee $(results.username.path) \ncp \"${workspace_path}/${KEY_FILENAME}\" /opt/storage/$(params.workspace-resources-path)\necho -n \"${KEY_FILENAME}\" | tee $(results.key-filename.path) \n" + volumeMounts: + - mountPath: /opt/host-secret + name: host-secret + - mountPath: /opt/storage + name: storage + volumes: + - name: host-secret + secret: + secretName: $(params.secret-host) + - name: storage + persistentVolumeClaim: + claimName: pipelines-data + timeout: 20m0s + - name: install + params: + - name: os + value: $(tasks.host-info.results.os) + - name: host + value: $(tasks.sync-provision.results.host) + - name: username + value: $(tasks.sync-provision.results.username) + - name: key + value: $(tasks.sync-provision.results.key-filename) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: downloadable-version + value: $(tasks.crc-info.results.crc-version) + - name: downloadable-url + value: $(tasks.url-picker.results.base-url) + - name: shasum-file + value: $(params.shasum-file) + runAfter: + - sync-provision + - internal-asset-upload + - internal-shasum-upload + taskRef: + params: + - name: bundle + value: quay.io/rhqp/crc-support-tkn:v0.5 + - name: name + value: crc-support + - name: kind + value: task + resolver: bundles + timeout: 1h0m0s + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: qe + params: + - name: os + value: $(tasks.host-info.results.os) + - name: arch + value: $(params.qe-arch) + - name: host + value: $(tasks.sync-provision.results.host) + - name: username + value: $(tasks.sync-provision.results.username) + - name: key + value: $(tasks.sync-provision.results.key-filename) + - name: workspace-resources-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: worspace-qe-subpath + value: $(params.qe-worspace-subpath) + - name: crc-version + value: $(tasks.crc-info.results.crc-version) + - name: run-e2e + value: $(params.run-e2e) + - name: e2e-tag + value: $(params.e2e-tag) + - name: e2e-cleanup-target + value: $(params.target-cleanup) + - name: run-integration + value: $(params.run-integration) + - name: integration-cleanup-target + value: $(params.target-cleanup) + - name: debug + value: $(params.debug) + runAfter: + - install + taskRef: + params: + - name: bundle + value: quay.io/rhqp/crc-e2e-tkn:v1.0.0 + - name: name + value: crc-e2e + - name: kind + value: task + resolver: bundles + timeout: 5h0m0s + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: ocp-pullsecret + workspace: ocp-pullsecret + - name: datalake-sink + params: + - name: s3-url + value: $(tasks.s3-info.results.upload-url) + - name: s3-access-key + value: $(tasks.s3-info.results.access-key) + - name: s3-secret-key + value: $(tasks.s3-info.results.secret-key) + - name: s3-folder-path + value: $(tasks.s3-info.results.upload-path) + - name: workspace-path + value: $(tasks.correlate.results.workspace-resources-path) + - name: workspace-subpath + value: $(params.qe-worspace-subpath) + - name: workspace-cleanup + value: "false" + runAfter: + - qe + taskRef: + kind: Task + name: s3-sink-workspace + timeout: 15m0s + workspaces: + - name: pipelines-data + workspace: pipelines-data + - name: integration-url-generator + params: + - name: base-url + value: $(tasks.s3-info.results.download-url) + - name: context + value: $(params.qe-worspace-subpath) + - name: asset-name + value: integration-junit.xml + runAfter: + - datalake-sink + taskRef: + kind: Task + name: url-generator + - name: e2e-url-generator + params: + - name: base-url + value: $(tasks.s3-info.results.download-url) + - name: context + value: $(params.qe-worspace-subpath) + - name: asset-name + value: e2e-junit.xml + runAfter: + - datalake-sink + taskRef: + kind: Task + name: url-generator + workspaces: + - name: pipelines-data + - description: | + This secret will hold the credentials to the target cloud provider it could match depending on the target: + + ## AWS + ocp secret holding the aws credentials. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: aws-${name} + labels: + app.kubernetes.io/component: ${name} + app.kubernetes.io/part-of: qe-platform + type: Opaque + data: + access-key: ${access_key} + secret-key: ${secret_key} + region: ${region} + + ## Azure + ocp secret holding the azure credentials. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: az-${name} + labels: + app.kubernetes.io/component: ${name} + app.kubernetes.io/part-of: qe-platform + type: Opaque + data: + tenant_id: ${tenant_id} + subscription_id: ${subscription_id} + client_id: ${client_id} + client_secret: ${client_secret} + name: cloud-credentials + - description: | + ocp secret holding the credentials for a valid rh user to subscribe VM. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: credentials-${configname} + type: Opaque + data: + user: ${user} + password: ${password} + name: rh-account-secret + optional: true + - description: | + ocp secret holding the report portal credentials. Secret should be accessible to this task. + + --- + apiVersion: v1 + kind: Secret + metadata: + name: XXX + type: Opaque + data: + token: XXXX + url: XXXX + project: XXXX + name: reportportal-credentials + - description: | + crc secret name holding the pullsecret. This is only required if backed tested is crc preset + + secret should match following format: + --- + apiVersion: v1 + kind: Secret + metadata: + name: ${secret-name} + type: Opaque + data: + pullsecret: ${pullsecret-value} + name: ocp-pullsecret diff --git a/catalog/pipelines/crc-qe-virtualized/CHANGELOG.md b/catalog/pipelines/crc-qe-virtualized/CHANGELOG.md new file mode 100644 index 0000000..f1d85fe --- /dev/null +++ b/catalog/pipelines/crc-qe-virtualized/CHANGELOG.md @@ -0,0 +1,33 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [0.6] + +- Added quay.io/rhqp/qenvs-tkn:v0.6.1 and credentials as workspaces + +## [0.5] + +- Use bundle resolver for tasks for dynamic provisioning +- Added debug param control + debug info task to show easily how to connect for debug + +## [0.4] + +- Added task for sync internal assets to S3, to allow testing pre release versions within public providers +- Added task url-picker to get the right public url (external vs internal) + +## [0.3] + +- Added windows 10 / 11 desktop as possible target. Windows target is on public cloud + so internal url will not work. We need to add a mechanism to move assets to target in that case. + +## [0.2] + +- ??? + +## [0.1] + +- Test fixed openshift local on a virtualized environment \ No newline at end of file diff --git a/catalog/tasks/.gitkeep b/catalog/tasks/.gitkeep new file mode 100644 index 0000000..e69de29