diff --git a/integration-tests/pipelines/e2e-main-pipeline.yaml b/integration-tests/pipelines/e2e-main-pipeline.yaml index 26d3dab72..d4bbf119b 100644 --- a/integration-tests/pipelines/e2e-main-pipeline.yaml +++ b/integration-tests/pipelines/e2e-main-pipeline.yaml @@ -27,6 +27,9 @@ spec: description: 'The number of replicas for the cluster nodes.' default: "3" type: string + workspaces: + - name: rhads-config + description: "Workspace for sharing RHADS configuration data between tasks" tasks: - name: test-metadata taskRef: @@ -56,6 +59,9 @@ spec: params: - name: job-spec value: $(tasks.test-metadata.results.job-spec) + workspaces: + - name: rhads-config + workspace: rhads-config - name: start-nested-pipelines timeout: "2h30m" runAfter: @@ -75,8 +81,6 @@ spec: value: $(params.SNAPSHOT) - name: job-spec value: $(tasks.test-metadata.results.job-spec) - - name: rhads-config - value: $(tasks.process-rhads-config.results.rhads-config) - name: mode value: "single" - name: konflux-test-infra-secret @@ -89,6 +93,9 @@ spec: value: $(params.ocp-replicas) - name: context-pipeline-run-name value: $(context.pipelineRun.name) + workspaces: + - name: rhads-config + workspace: rhads-config finally: - name: cancel-nested-pipelines when: diff --git a/integration-tests/pipelines/e2e-main-pipelinerun.yaml b/integration-tests/pipelines/e2e-main-pipelinerun.yaml new file mode 100644 index 000000000..343a4794d --- /dev/null +++ b/integration-tests/pipelines/e2e-main-pipelinerun.yaml @@ -0,0 +1,33 @@ +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + name: e2e-main-pipelinerun + namespace: rhtap-shared-team-tenant + labels: + appstudio.openshift.io/component: tssc-cli + appstudio.openshift.io/application: tssc-cli +spec: + pipelineRef: + resolver: git + params: + - name: url + value: https://github.com/redhat-appstudio/tssc-cli + - name: revision + value: main + - name: pathInRepo + value: integration-tests/pipelines/e2e-main-pipeline.yaml + params: + - name: konflux-test-infra-secret + value: konflux-test-infra + - name: cloud-credential-key + value: rhtap-cloud-credentials-us-east-1 + workspaces: + - name: rhads-config + volumeClaimTemplate: + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi diff --git a/integration-tests/pipelines/e2e-periodic-pipeline.yaml b/integration-tests/pipelines/e2e-periodic-pipeline.yaml index 4a59a9397..75c1025d8 100644 --- a/integration-tests/pipelines/e2e-periodic-pipeline.yaml +++ b/integration-tests/pipelines/e2e-periodic-pipeline.yaml @@ -34,6 +34,9 @@ spec: description: 'Additional parameters for installation testing (e.g., PRE_RELEASE=TAS TAS_VERSION=1.3.2). When empty, does not alter normal installation.' default: "" type: string + workspaces: + - name: rhads-config + description: "Workspace for sharing RHADS configuration data between tasks" tasks: - name: test-metadata taskRef: @@ -63,6 +66,9 @@ spec: params: - name: job-spec value: $(tasks.test-metadata.results.job-spec) + workspaces: + - name: rhads-config + workspace: rhads-config runAfter: - test-metadata - name: start-periodic-pipelines @@ -83,8 +89,6 @@ spec: value: $(params.SNAPSHOT) - name: job-spec value: $(tasks.test-metadata.results.job-spec) - - name: rhads-config - value: $(tasks.process-periodic-configs.results.rhads-config) - name: mode value: "periodic" - name: konflux-test-infra-secret @@ -99,3 +103,6 @@ spec: value: $(params.install-params) - name: context-pipeline-run-name value: $(context.pipelineRun.name) + workspaces: + - name: rhads-config + workspace: rhads-config diff --git a/integration-tests/pipelines/e2e-periodic-pipelinerun.yaml b/integration-tests/pipelines/e2e-periodic-pipelinerun.yaml new file mode 100644 index 000000000..9b2887c08 --- /dev/null +++ b/integration-tests/pipelines/e2e-periodic-pipelinerun.yaml @@ -0,0 +1,29 @@ +--- +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + generateName: e2e-periodic-pipelinerun- +spec: + pipelineRef: + resolver: git + params: + - name: url + value: https://github.com/redhat-appstudio/tssc-cli + - name: revision + value: main + - name: pathInRepo + value: integration-tests/pipelines/e2e-periodic-pipeline.yaml + params: + - name: konflux-test-infra-secret + value: konflux-test-infra + - name: cloud-credential-key + value: rhtap-cloud-credentials-us-east-1 + workspaces: + - name: rhads-config + volumeClaimTemplate: + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi diff --git a/integration-tests/tasks/get-rhads-config.yaml b/integration-tests/tasks/get-rhads-config.yaml index 04d574992..0bbf5f7ca 100644 --- a/integration-tests/tasks/get-rhads-config.yaml +++ b/integration-tests/tasks/get-rhads-config.yaml @@ -14,12 +14,13 @@ spec: - name: job-spec description: "Job specification metadata" type: string - results: + workspaces: - name: rhads-config - description: "The RHADS configuration content (base64 encoded)" + description: "Workspace for storing RHADS configuration data" steps: - name: get-rhads-config image: quay.io/konflux-ci/appstudio-utils:ab6b0b8e40e440158e7288c73aff1cf83a2cc8a9@sha256:24179f0efd06c65d16868c2d7eb82573cce8e43533de6cea14fec3b7446e0b14 + workingDir: $(workspaces.rhads-config.path) env: - name: JOB_SPEC value: $(params.job-spec) @@ -44,5 +45,3 @@ spec: echo "Original rhads-config content:" cat rhads-config - echo "Encoding rhads-config to base64:" - cat rhads-config | base64 -w 0 | tee $(results.rhads-config.path) diff --git a/integration-tests/tasks/process-periodic-configs.yaml b/integration-tests/tasks/process-periodic-configs.yaml index a806470c0..24dede108 100644 --- a/integration-tests/tasks/process-periodic-configs.yaml +++ b/integration-tests/tasks/process-periodic-configs.yaml @@ -15,9 +15,10 @@ spec: - name: job-spec description: "Job specification metadata" type: string - results: + workspaces: - name: rhads-config - description: "JSON formatted configuration data (array of configs from PICT, base64 encoded)" + description: "Workspace for storing RHADS configuration data" + results: - name: periodic-pict description: "Periodic PICT file content for sharing between steps" - name: pict-output @@ -55,6 +56,7 @@ spec: - name: process-config image: quay.io/konflux-ci/appstudio-utils:ab6b0b8e40e440158e7288c73aff1cf83a2cc8a9@sha256:24179f0efd06c65d16868c2d7eb82573cce8e43533de6cea14fec3b7446e0b14 + workingDir: $(workspaces.rhads-config.path) script: | #!/usr/bin/env bash set -euo pipefail @@ -63,7 +65,7 @@ spec: # Get the PICT output from the previous step cat $(results.pict-output.path) > pict_output.txt # Set local variable for maximum configurations (0 = all configurations) - MAX_CONFIGS=1 # Change this value to limit configurations (e.g., 5, 10, etc.) + MAX_CONFIGS=0 # Change this value to limit configurations (e.g., 5, 10, etc.) echo "Maximum configurations requested: $MAX_CONFIGS (0 = all configurations)" # Debug: Check if pict_output.txt exists and show its content if [[ ! -f pict_output.txt ]]; then @@ -136,10 +138,10 @@ spec: else echo "No limit applied - processed all available configurations" fi - # Copy output to result path + # Copy output to workspace echo "Final output:" cat "$OUTPUT_FILE" - echo "Encoding rhads-config to base64:" - cat "$OUTPUT_FILE" | base64 -w 0 | tee $(results.rhads-config.path) + echo "Writing rhads-config to workspace:" + cp "$OUTPUT_FILE" rhads-config echo "Configuration count: $CONFIG_COUNT" diff --git a/integration-tests/tasks/start-pipelines.yaml b/integration-tests/tasks/start-pipelines.yaml index 311e8b3e8..167aa8258 100644 --- a/integration-tests/tasks/start-pipelines.yaml +++ b/integration-tests/tasks/start-pipelines.yaml @@ -19,9 +19,6 @@ spec: - name: job-spec description: "Job specification metadata" type: string - - name: rhads-config - description: "RHADS configuration data (single config or array of configs with separators, base64 encoded)" - type: string - name: mode description: "Pipeline mode: 'single' for single config, 'periodic' for multiple configs with separators" type: string @@ -48,19 +45,21 @@ spec: description: "Context pipeline run name for labeling" type: string default: "" + workspaces: + - name: rhads-config + description: "Workspace containing RHADS configuration data" results: - name: pipeline-runs description: "Array of started pipeline run names" steps: - name: start-pipelines image: quay.io/openshift-pipeline/ci + workingDir: $(workspaces.rhads-config.path) env: - name: SNAPSHOT value: $(params.snapshot) - name: JOB_SPEC value: $(params.job-spec) - - name: RHADS_CONFIG - value: $(params.rhads-config) - name: MODE value: $(params.mode) - name: CONTEXT_PIPELINE_RUN_NAME @@ -93,10 +92,10 @@ spec: echo "Starting pipelines in mode: $MODE" echo "Using Konflux metadata: namespace=$KONFLUX_NAMESPACE, app=$KONFLUX_APPLICATION_NAME, component=$KONFLUX_COMPONENT_NAME" - # Decode base64 encoded rhads-config - echo "Decoding base64 encoded rhads-config..." - DECODED_RHADS_CONFIG=$(echo "$RHADS_CONFIG" | base64 -d) - echo "Decoded rhads-config content:" + # Read rhads-config from workspace + echo "Reading rhads-config from workspace..." + DECODED_RHADS_CONFIG=$(cat rhads-config) + echo "rhads-config content:" echo "$DECODED_RHADS_CONFIG" # Extract images from snapshot tssc_image=$(echo "${SNAPSHOT}" | jq -r '.components[] |select(.name | startswith("tssc-cli")).containerImage')