diff --git a/ci-operator/step-registry/storage/conf/csi-aws-ebs/storage-conf-csi-aws-ebs-commands.sh b/ci-operator/step-registry/storage/conf/csi-aws-ebs/storage-conf-csi-aws-ebs-commands.sh index acbdb3e1e8141..b0b1cfda48dfd 100644 --- a/ci-operator/step-registry/storage/conf/csi-aws-ebs/storage-conf-csi-aws-ebs-commands.sh +++ b/ci-operator/step-registry/storage/conf/csi-aws-ebs/storage-conf-csi-aws-ebs-commands.sh @@ -7,10 +7,22 @@ if [ -d /go/src/github.com/openshift/csi-operator/ ]; then echo "Using csi-operator repo" cd /go/src/github.com/openshift/csi-operator cp test/e2e/aws-ebs/manifest.yaml ${SHARED_DIR}/${TEST_CSI_DRIVER_MANIFEST} - if [ -n "${TEST_OCP_CSI_DRIVER_MANIFEST}" ] && [ "${ENABLE_LONG_CSI_CERTIFICATION_TESTS}" = "true" ]; then - cp test/e2e/aws-ebs/ocp-manifest.yaml ${SHARED_DIR}/${TEST_OCP_CSI_DRIVER_MANIFEST} - echo "Using OCP specific manifest ${SHARED_DIR}/${TEST_OCP_CSI_DRIVER_MANIFEST}:" - cat ${SHARED_DIR}/${TEST_OCP_CSI_DRIVER_MANIFEST} + if [ -n "${TEST_OCP_CSI_DRIVER_MANIFEST}" ]; then + ocp_dir="test/e2e/aws-ebs" + ocp_dest="${SHARED_DIR}/${TEST_OCP_CSI_DRIVER_MANIFEST}" + if [ "${ENABLE_LONG_CSI_CERTIFICATION_TESTS}" = "true" ]; then + if [ -f "${ocp_dir}/ocp-manifest-long.yaml" ]; then + cp "${ocp_dir}/ocp-manifest-long.yaml" "${ocp_dest}" + elif [ -f "${ocp_dir}/ocp-manifest.yaml" ]; then + cp "${ocp_dir}/ocp-manifest.yaml" "${ocp_dest}" + fi + elif [ -f "${ocp_dir}/ocp-manifest-long.yaml" ] && [ -f "${ocp_dir}/ocp-manifest.yaml" ]; then + cp "${ocp_dir}/ocp-manifest.yaml" "${ocp_dest}" + fi + if [ -f "${ocp_dest}" ]; then + echo "Using OCP specific manifest ${ocp_dest}:" + cat "${ocp_dest}" + fi fi if [ -f "test/e2e/aws-ebs/${TEST_VOLUME_ATTRIBUTES_CLASS_MANIFEST}" ]; then echo "Copying ${TEST_VOLUME_ATTRIBUTES_CLASS_MANIFEST} to ${SHARED_DIR}/${TEST_VOLUME_ATTRIBUTES_CLASS_MANIFEST}" diff --git a/ci-operator/step-registry/storage/conf/csi-azure-disk/storage-conf-csi-azure-disk-commands.sh b/ci-operator/step-registry/storage/conf/csi-azure-disk/storage-conf-csi-azure-disk-commands.sh index 25b73e00d58a1..439e602207f93 100644 --- a/ci-operator/step-registry/storage/conf/csi-azure-disk/storage-conf-csi-azure-disk-commands.sh +++ b/ci-operator/step-registry/storage/conf/csi-azure-disk/storage-conf-csi-azure-disk-commands.sh @@ -12,10 +12,25 @@ if [ -d /go/src/github.com/openshift/csi-operator/ ]; then cp test/e2e/azure-disk/manifest.yaml ${SHARED_DIR}/${TEST_CSI_DRIVER_MANIFEST} fi - if [ -n "${TEST_OCP_CSI_DRIVER_MANIFEST}" ] && [ "${ENABLE_LONG_CSI_CERTIFICATION_TESTS}" = "true" ]; then - cp test/e2e/azure-disk/ocp-manifest.yaml ${SHARED_DIR}/${TEST_OCP_CSI_DRIVER_MANIFEST} - echo "Using OCP specific manifest ${SHARED_DIR}/${TEST_OCP_CSI_DRIVER_MANIFEST}:" - cat ${SHARED_DIR}/${TEST_OCP_CSI_DRIVER_MANIFEST} + if [ -n "${TEST_OCP_CSI_DRIVER_MANIFEST}" ]; then + # After csi-operator#596: ocp-manifest.yaml is standard, ocp-manifest-long.yaml is LUN stress. + # Older branches have only the combined ocp-manifest.yaml (LUN stress). Copy that on long + # jobs when the split is absent; copy the standard file on short jobs only when the split exists. + ocp_dir="test/e2e/azure-disk" + ocp_dest="${SHARED_DIR}/${TEST_OCP_CSI_DRIVER_MANIFEST}" + if [ "${ENABLE_LONG_CSI_CERTIFICATION_TESTS}" = "true" ]; then + if [ -f "${ocp_dir}/ocp-manifest-long.yaml" ]; then + cp "${ocp_dir}/ocp-manifest-long.yaml" "${ocp_dest}" + elif [ -f "${ocp_dir}/ocp-manifest.yaml" ]; then + cp "${ocp_dir}/ocp-manifest.yaml" "${ocp_dest}" + fi + elif [ -f "${ocp_dir}/ocp-manifest-long.yaml" ] && [ -f "${ocp_dir}/ocp-manifest.yaml" ]; then + cp "${ocp_dir}/ocp-manifest.yaml" "${ocp_dest}" + fi + if [ -f "${ocp_dest}" ]; then + echo "Using OCP specific manifest ${ocp_dest}:" + cat "${ocp_dest}" + fi fi if [ -f "test/e2e/azure-disk/${TEST_VOLUME_ATTRIBUTES_CLASS_MANIFEST}" ]; then echo "Copying ${TEST_VOLUME_ATTRIBUTES_CLASS_MANIFEST} to ${SHARED_DIR}/${TEST_VOLUME_ATTRIBUTES_CLASS_MANIFEST}" diff --git a/ci-operator/step-registry/storage/conf/csi-azure-file/storage-conf-csi-azure-file-commands.sh b/ci-operator/step-registry/storage/conf/csi-azure-file/storage-conf-csi-azure-file-commands.sh index 7a99678d291df..17afce623ba3c 100644 --- a/ci-operator/step-registry/storage/conf/csi-azure-file/storage-conf-csi-azure-file-commands.sh +++ b/ci-operator/step-registry/storage/conf/csi-azure-file/storage-conf-csi-azure-file-commands.sh @@ -7,10 +7,25 @@ if [ -d /go/src/github.com/openshift/csi-operator/ ]; then echo "Using csi-operator repo" cd /go/src/github.com/openshift/csi-operator cp test/e2e/azure-file/manifest.yaml ${SHARED_DIR}/${TEST_CSI_DRIVER_MANIFEST} - if [ -n "${TEST_OCP_CSI_DRIVER_MANIFEST}" ] && [ "${ENABLE_LONG_CSI_CERTIFICATION_TESTS}" = "true" ]; then - cp test/e2e/azure-file/ocp-manifest.yaml ${SHARED_DIR}/${TEST_OCP_CSI_DRIVER_MANIFEST} - echo "Using OCP specific manifest ${SHARED_DIR}/${TEST_OCP_CSI_DRIVER_MANIFEST}:" - cat ${SHARED_DIR}/${TEST_OCP_CSI_DRIVER_MANIFEST} + if [ -n "${TEST_OCP_CSI_DRIVER_MANIFEST}" ]; then + # After csi-operator#596: ocp-manifest.yaml is standard, ocp-manifest-long.yaml is LUN stress. + # Older branches have only the combined ocp-manifest.yaml (LUN stress). Copy that on long + # jobs when the split is absent; copy the standard file on short jobs only when the split exists. + ocp_dir="test/e2e/azure-file" + ocp_dest="${SHARED_DIR}/${TEST_OCP_CSI_DRIVER_MANIFEST}" + if [ "${ENABLE_LONG_CSI_CERTIFICATION_TESTS}" = "true" ]; then + if [ -f "${ocp_dir}/ocp-manifest-long.yaml" ]; then + cp "${ocp_dir}/ocp-manifest-long.yaml" "${ocp_dest}" + elif [ -f "${ocp_dir}/ocp-manifest.yaml" ]; then + cp "${ocp_dir}/ocp-manifest.yaml" "${ocp_dest}" + fi + elif [ -f "${ocp_dir}/ocp-manifest-long.yaml" ] && [ -f "${ocp_dir}/ocp-manifest.yaml" ]; then + cp "${ocp_dir}/ocp-manifest.yaml" "${ocp_dest}" + fi + if [ -f "${ocp_dest}" ]; then + echo "Using OCP specific manifest ${ocp_dest}:" + cat "${ocp_dest}" + fi fi else echo "Using azure-file-csi-driver-operator repo" diff --git a/ci-operator/step-registry/storage/conf/csi-gcp-pd/storage-conf-csi-gcp-pd-commands.sh b/ci-operator/step-registry/storage/conf/csi-gcp-pd/storage-conf-csi-gcp-pd-commands.sh index b75f6a3c796e6..16cae224b827c 100644 --- a/ci-operator/step-registry/storage/conf/csi-gcp-pd/storage-conf-csi-gcp-pd-commands.sh +++ b/ci-operator/step-registry/storage/conf/csi-gcp-pd/storage-conf-csi-gcp-pd-commands.sh @@ -34,10 +34,22 @@ if [ -f "test/e2e/${GCPPD}/${TEST_VOLUME_ATTRIBUTES_CLASS_MANIFEST}" ]; then cat ${SHARED_DIR}/${TEST_VOLUME_ATTRIBUTES_CLASS_MANIFEST} fi -if [ -n "${TEST_OCP_CSI_DRIVER_MANIFEST}" ] && [ "${ENABLE_LONG_CSI_CERTIFICATION_TESTS}" = "true" ]; then - cp test/e2e/${GCPPD}/ocp-manifest.yaml ${SHARED_DIR}/${TEST_OCP_CSI_DRIVER_MANIFEST} - echo "Using OCP specific manifest ${SHARED_DIR}/${TEST_OCP_CSI_DRIVER_MANIFEST}:" - cat ${SHARED_DIR}/${TEST_OCP_CSI_DRIVER_MANIFEST} +if [ -n "${TEST_OCP_CSI_DRIVER_MANIFEST}" ]; then + ocp_dir="test/e2e/${GCPPD}" + ocp_dest="${SHARED_DIR}/${TEST_OCP_CSI_DRIVER_MANIFEST}" + if [ "${ENABLE_LONG_CSI_CERTIFICATION_TESTS}" = "true" ]; then + if [ -f "${ocp_dir}/ocp-manifest-long.yaml" ]; then + cp "${ocp_dir}/ocp-manifest-long.yaml" "${ocp_dest}" + elif [ -f "${ocp_dir}/ocp-manifest.yaml" ]; then + cp "${ocp_dir}/ocp-manifest.yaml" "${ocp_dest}" + fi + elif [ -f "${ocp_dir}/ocp-manifest-long.yaml" ] && [ -f "${ocp_dir}/ocp-manifest.yaml" ]; then + cp "${ocp_dir}/ocp-manifest.yaml" "${ocp_dest}" + fi + if [ -f "${ocp_dest}" ]; then + echo "Using OCP specific manifest ${ocp_dest}:" + cat "${ocp_dest}" + fi fi # For debugging diff --git a/ci-operator/step-registry/storage/create/csi-aws-efs/storage-create-csi-aws-efs-commands.sh b/ci-operator/step-registry/storage/create/csi-aws-efs/storage-create-csi-aws-efs-commands.sh index fee64cea6ade3..9c2aa31f57b08 100644 --- a/ci-operator/step-registry/storage/create/csi-aws-efs/storage-create-csi-aws-efs-commands.sh +++ b/ci-operator/step-registry/storage/create/csi-aws-efs/storage-create-csi-aws-efs-commands.sh @@ -71,10 +71,22 @@ EOF echo "Created cluster CSI driver object" -if [ -n "${TEST_OCP_CSI_DRIVER_MANIFEST}" ] && [ "${ENABLE_LONG_CSI_CERTIFICATION_TESTS}" = "true" ]; then - cp /usr/share/aws-efs-csi-driver/ocp-manifest.yaml ${SHARED_DIR}/${TEST_OCP_CSI_DRIVER_MANIFEST} - echo "Using OCP specific manifest ${SHARED_DIR}/${TEST_OCP_CSI_DRIVER_MANIFEST}:" - cat ${SHARED_DIR}/${TEST_OCP_CSI_DRIVER_MANIFEST} +if [ -n "${TEST_OCP_CSI_DRIVER_MANIFEST}" ]; then + ocp_dir="/usr/share/aws-efs-csi-driver" + ocp_dest="${SHARED_DIR}/${TEST_OCP_CSI_DRIVER_MANIFEST}" + if [ "${ENABLE_LONG_CSI_CERTIFICATION_TESTS}" = "true" ]; then + if [ -f "${ocp_dir}/ocp-manifest-long.yaml" ]; then + cp "${ocp_dir}/ocp-manifest-long.yaml" "${ocp_dest}" + elif [ -f "${ocp_dir}/ocp-manifest.yaml" ]; then + cp "${ocp_dir}/ocp-manifest.yaml" "${ocp_dest}" + fi + elif [ -f "${ocp_dir}/ocp-manifest-long.yaml" ] && [ -f "${ocp_dir}/ocp-manifest.yaml" ]; then + cp "${ocp_dir}/ocp-manifest.yaml" "${ocp_dest}" + fi + if [ -f "${ocp_dest}" ]; then + echo "Using OCP specific manifest ${ocp_dest}:" + cat "${ocp_dest}" + fi fi # For debugging