diff --git a/ci-operator/config/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-1.6.yaml b/ci-operator/config/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-1.6.yaml index a8eedbd5df5db..5a2e5f2f635a4 100644 --- a/ci-operator/config/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-1.6.yaml +++ b/ci-operator/config/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-1.6.yaml @@ -42,6 +42,9 @@ tests: steps: cluster_profile: openshift-org-aws env: + DEPENDS_ON_CANDIDATES: |- + migtools/kubevirt-datamover-plugin RELATED_IMAGE_KUBEVIRT_DATAMOVER_PLUGIN + openshift/oadp-operator MANAGER_IMAGE OADP_BRANCH: oadp-1.6 OO_BUNDLE: quay-proxy.ci.openshift.org/openshift/ci:konveyor_oadp-operator-bundle_oadp-1.6 OO_INSTALL_MODE: OwnNamespace @@ -57,6 +60,7 @@ tests: - chain: ipi-aws-pre - ref: oadp-operator-sdk-bundle-image test: + - ref: oadp-depends-on-build - as: set-related-image cli: latest commands: | @@ -84,15 +88,65 @@ tests: # freshly created Subscription in this ephemeral, single-purpose # namespace has no pre-existing config.env entries to lose; this # would need a read-modify-write if that ever stops being true. - PATCH=$(printf '{"spec":{"config":{"env":[{"name":"RELATED_IMAGE_KUBEVIRT_DATAMOVER_CONTROLLER","value":"%s"}]}}}' "${KDM_CONTROLLER_IMAGE}") + # + # This job's own dependency (KDM_CONTROLLER_IMAGE, built by + # ci-operator natively from this PR) is always applied. Any + # cross-repo dependency resolved by the oadp-depends-on-build step + # above (per a Depends-On: line in this PR's description, e.g. + # naming an unmerged kubevirt-datamover-plugin PR) is folded in from + # its manifest file, if present -- see openshift/oadp-operator#2389. + # + # A resolved openshift/oadp-operator dependency is special-cased + # below: oadp-operator's own manager image isn't a RELATED_IMAGE_* + # in this job's context (it's the operator itself, not a component + # it deploys), so it can't go through the Subscription.spec.config.env + # override like everything else here. It's flagged with the sentinel + # name MANAGER_IMAGE (not a real RELATED_IMAGE_* var) and patched + # directly onto the Deployment's own container image further down + # instead. This only covers reconcile-logic-level oadp-operator PRs + # (e.g. how it builds this Deployment's spec) -- an oadp-operator PR + # that changes RBAC/CSV/CRD manifests needs an alternate bundle + # install, which this does not attempt. + ALL_ENV_LINES="RELATED_IMAGE_KUBEVIRT_DATAMOVER_CONTROLLER ${KDM_CONTROLLER_IMAGE}" + if [ -s "${SHARED_DIR}/depends-on-images.txt" ]; then + ALL_ENV_LINES="${ALL_ENV_LINES} + $(cat "${SHARED_DIR}/depends-on-images.txt")" + fi + MANAGER_IMAGE_VALUE="" + SUBSCRIPTION_ENV_LINES="" + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + if [ "${ENV_NAME}" = "MANAGER_IMAGE" ]; then + MANAGER_IMAGE_VALUE="${ENV_VALUE}" + else + SUBSCRIPTION_ENV_LINES="${SUBSCRIPTION_ENV_LINES} + ${ENV_NAME} ${ENV_VALUE}" + fi + done <<< "${ALL_ENV_LINES}" + ALL_ENV_LINES="${SUBSCRIPTION_ENV_LINES}" + ENTRIES=() + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + ENTRIES+=("{\"name\":\"${ENV_NAME}\",\"value\":\"${ENV_VALUE}\"}") + done <<< "${ALL_ENV_LINES}" + JOINED=$(IFS=,; echo "${ENTRIES[*]}") + PATCH=$(printf '{"spec":{"config":{"env":[%s]}}}' "${JOINED}") oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "${PATCH}" - echo "Waiting for Deployment to observe RELATED_IMAGE_KUBEVIRT_DATAMOVER_CONTROLLER=${KDM_CONTROLLER_IMAGE}" + echo "Waiting for Deployment to observe:" + while read -r ENV_NAME _; do + [ -n "${ENV_NAME}" ] && echo " ${ENV_NAME}" + done <<< "${ALL_ENV_LINES}" for _ in $(seq 1 60); do - CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"RELATED_IMAGE_KUBEVIRT_DATAMOVER_CONTROLLER\")].value}" 2>/dev/null || true) - [ "${CURRENT}" = "${KDM_CONTROLLER_IMAGE}" ] && break + ALL_OK=true + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"${ENV_NAME}\")].value}" 2>/dev/null || true) + [ "${CURRENT}" != "${ENV_VALUE}" ] && ALL_OK=false + done <<< "${ALL_ENV_LINES}" + [ "${ALL_OK}" = "true" ] && break sleep 5 done - if [ "${CURRENT}" != "${KDM_CONTROLLER_IMAGE}" ]; then + if [ "${ALL_OK}" != "true" ]; then echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true @@ -100,6 +154,11 @@ tests: exit 1 fi oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + if [ -n "${MANAGER_IMAGE_VALUE}" ]; then + echo "Depends-On resolved an oadp-operator PR -- patching the manager Deployment's own container image directly (not a RELATED_IMAGE_* env var, since oadp-operator itself isn't a related-image in this job's context)" + oc set image "deployment/openshift-adp-controller-manager" "manager=${MANAGER_IMAGE_VALUE}" -n "${OO_INSTALL_NAMESPACE}" + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + fi dependencies: - env: KDM_CONTROLLER_IMAGE name: kubevirt-datamover-controller-oadp-1.6 diff --git a/ci-operator/config/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-dev.yaml b/ci-operator/config/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-dev.yaml index 1f65acf0aed96..ecfa129fedc3b 100644 --- a/ci-operator/config/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-dev.yaml +++ b/ci-operator/config/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-dev.yaml @@ -42,6 +42,9 @@ tests: steps: cluster_profile: openshift-org-aws env: + DEPENDS_ON_CANDIDATES: |- + migtools/kubevirt-datamover-plugin RELATED_IMAGE_KUBEVIRT_DATAMOVER_PLUGIN + openshift/oadp-operator MANAGER_IMAGE OADP_BRANCH: oadp-dev OO_BUNDLE: quay-proxy.ci.openshift.org/openshift/ci:konveyor_oadp-operator-bundle_oadp-dev OO_INSTALL_MODE: OwnNamespace @@ -57,6 +60,7 @@ tests: - chain: ipi-aws-pre - ref: oadp-operator-sdk-bundle-image test: + - ref: oadp-depends-on-build - as: set-related-image cli: latest commands: | @@ -84,15 +88,65 @@ tests: # freshly created Subscription in this ephemeral, single-purpose # namespace has no pre-existing config.env entries to lose; this # would need a read-modify-write if that ever stops being true. - PATCH=$(printf '{"spec":{"config":{"env":[{"name":"RELATED_IMAGE_KUBEVIRT_DATAMOVER_CONTROLLER","value":"%s"}]}}}' "${KDM_CONTROLLER_IMAGE}") + # + # This job's own dependency (KDM_CONTROLLER_IMAGE, built by + # ci-operator natively from this PR) is always applied. Any + # cross-repo dependency resolved by the oadp-depends-on-build step + # above (per a Depends-On: line in this PR's description, e.g. + # naming an unmerged kubevirt-datamover-plugin PR) is folded in from + # its manifest file, if present -- see openshift/oadp-operator#2389. + # + # A resolved openshift/oadp-operator dependency is special-cased + # below: oadp-operator's own manager image isn't a RELATED_IMAGE_* + # in this job's context (it's the operator itself, not a component + # it deploys), so it can't go through the Subscription.spec.config.env + # override like everything else here. It's flagged with the sentinel + # name MANAGER_IMAGE (not a real RELATED_IMAGE_* var) and patched + # directly onto the Deployment's own container image further down + # instead. This only covers reconcile-logic-level oadp-operator PRs + # (e.g. how it builds this Deployment's spec) -- an oadp-operator PR + # that changes RBAC/CSV/CRD manifests needs an alternate bundle + # install, which this does not attempt. + ALL_ENV_LINES="RELATED_IMAGE_KUBEVIRT_DATAMOVER_CONTROLLER ${KDM_CONTROLLER_IMAGE}" + if [ -s "${SHARED_DIR}/depends-on-images.txt" ]; then + ALL_ENV_LINES="${ALL_ENV_LINES} + $(cat "${SHARED_DIR}/depends-on-images.txt")" + fi + MANAGER_IMAGE_VALUE="" + SUBSCRIPTION_ENV_LINES="" + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + if [ "${ENV_NAME}" = "MANAGER_IMAGE" ]; then + MANAGER_IMAGE_VALUE="${ENV_VALUE}" + else + SUBSCRIPTION_ENV_LINES="${SUBSCRIPTION_ENV_LINES} + ${ENV_NAME} ${ENV_VALUE}" + fi + done <<< "${ALL_ENV_LINES}" + ALL_ENV_LINES="${SUBSCRIPTION_ENV_LINES}" + ENTRIES=() + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + ENTRIES+=("{\"name\":\"${ENV_NAME}\",\"value\":\"${ENV_VALUE}\"}") + done <<< "${ALL_ENV_LINES}" + JOINED=$(IFS=,; echo "${ENTRIES[*]}") + PATCH=$(printf '{"spec":{"config":{"env":[%s]}}}' "${JOINED}") oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "${PATCH}" - echo "Waiting for Deployment to observe RELATED_IMAGE_KUBEVIRT_DATAMOVER_CONTROLLER=${KDM_CONTROLLER_IMAGE}" + echo "Waiting for Deployment to observe:" + while read -r ENV_NAME _; do + [ -n "${ENV_NAME}" ] && echo " ${ENV_NAME}" + done <<< "${ALL_ENV_LINES}" for _ in $(seq 1 60); do - CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"RELATED_IMAGE_KUBEVIRT_DATAMOVER_CONTROLLER\")].value}" 2>/dev/null || true) - [ "${CURRENT}" = "${KDM_CONTROLLER_IMAGE}" ] && break + ALL_OK=true + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"${ENV_NAME}\")].value}" 2>/dev/null || true) + [ "${CURRENT}" != "${ENV_VALUE}" ] && ALL_OK=false + done <<< "${ALL_ENV_LINES}" + [ "${ALL_OK}" = "true" ] && break sleep 5 done - if [ "${CURRENT}" != "${KDM_CONTROLLER_IMAGE}" ]; then + if [ "${ALL_OK}" != "true" ]; then echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true @@ -100,6 +154,11 @@ tests: exit 1 fi oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + if [ -n "${MANAGER_IMAGE_VALUE}" ]; then + echo "Depends-On resolved an oadp-operator PR -- patching the manager Deployment's own container image directly (not a RELATED_IMAGE_* env var, since oadp-operator itself isn't a related-image in this job's context)" + oc set image "deployment/openshift-adp-controller-manager" "manager=${MANAGER_IMAGE_VALUE}" -n "${OO_INSTALL_NAMESPACE}" + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + fi dependencies: - env: KDM_CONTROLLER_IMAGE name: kubevirt-datamover-controller diff --git a/ci-operator/config/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-1.6.yaml b/ci-operator/config/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-1.6.yaml index 9196da6ba0e34..ca4b039535244 100644 --- a/ci-operator/config/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-1.6.yaml +++ b/ci-operator/config/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-1.6.yaml @@ -42,6 +42,9 @@ tests: steps: cluster_profile: openshift-org-aws env: + DEPENDS_ON_CANDIDATES: |- + migtools/kubevirt-datamover-controller RELATED_IMAGE_KUBEVIRT_DATAMOVER_CONTROLLER + openshift/velero RELATED_IMAGE_VELERO Dockerfile.ubi OADP_BRANCH: oadp-1.6 OO_BUNDLE: quay-proxy.ci.openshift.org/openshift/ci:konveyor_oadp-operator-bundle_oadp-1.6 OO_INSTALL_MODE: OwnNamespace @@ -57,6 +60,7 @@ tests: - chain: ipi-aws-pre - ref: oadp-operator-sdk-bundle-image test: + - ref: oadp-depends-on-build - as: set-related-image cli: latest commands: | @@ -84,15 +88,41 @@ tests: # freshly created Subscription in this ephemeral, single-purpose # namespace has no pre-existing config.env entries to lose; this # would need a read-modify-write if that ever stops being true. - PATCH=$(printf '{"spec":{"config":{"env":[{"name":"RELATED_IMAGE_KUBEVIRT_DATAMOVER_PLUGIN","value":"%s"}]}}}' "${KDM_PLUGIN_IMAGE}") + # + # This job's own dependency (KDM_PLUGIN_IMAGE, built by ci-operator + # natively from this PR) is always applied. Any cross-repo + # dependency resolved by the oadp-depends-on-build step above (per + # a Depends-On: line in this PR's description, e.g. naming an + # unmerged kubevirt-datamover-controller PR) is folded in from its + # manifest file, if present -- see openshift/oadp-operator#2389. + ALL_ENV_LINES="RELATED_IMAGE_KUBEVIRT_DATAMOVER_PLUGIN ${KDM_PLUGIN_IMAGE}" + if [ -s "${SHARED_DIR}/depends-on-images.txt" ]; then + ALL_ENV_LINES="${ALL_ENV_LINES} + $(cat "${SHARED_DIR}/depends-on-images.txt")" + fi + ENTRIES=() + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + ENTRIES+=("{\"name\":\"${ENV_NAME}\",\"value\":\"${ENV_VALUE}\"}") + done <<< "${ALL_ENV_LINES}" + JOINED=$(IFS=,; echo "${ENTRIES[*]}") + PATCH=$(printf '{"spec":{"config":{"env":[%s]}}}' "${JOINED}") oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "${PATCH}" - echo "Waiting for Deployment to observe RELATED_IMAGE_KUBEVIRT_DATAMOVER_PLUGIN=${KDM_PLUGIN_IMAGE}" + echo "Waiting for Deployment to observe:" + while read -r ENV_NAME _; do + [ -n "${ENV_NAME}" ] && echo " ${ENV_NAME}" + done <<< "${ALL_ENV_LINES}" for _ in $(seq 1 60); do - CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"RELATED_IMAGE_KUBEVIRT_DATAMOVER_PLUGIN\")].value}" 2>/dev/null || true) - [ "${CURRENT}" = "${KDM_PLUGIN_IMAGE}" ] && break + ALL_OK=true + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"${ENV_NAME}\")].value}" 2>/dev/null || true) + [ "${CURRENT}" != "${ENV_VALUE}" ] && ALL_OK=false + done <<< "${ALL_ENV_LINES}" + [ "${ALL_OK}" = "true" ] && break sleep 5 done - if [ "${CURRENT}" != "${KDM_PLUGIN_IMAGE}" ]; then + if [ "${ALL_OK}" != "true" ]; then echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true diff --git a/ci-operator/config/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-dev.yaml b/ci-operator/config/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-dev.yaml index ba652421041df..f1932ddb77679 100644 --- a/ci-operator/config/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-dev.yaml +++ b/ci-operator/config/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-dev.yaml @@ -42,6 +42,9 @@ tests: steps: cluster_profile: openshift-org-aws env: + DEPENDS_ON_CANDIDATES: |- + migtools/kubevirt-datamover-controller RELATED_IMAGE_KUBEVIRT_DATAMOVER_CONTROLLER + openshift/velero RELATED_IMAGE_VELERO Dockerfile.ubi OADP_BRANCH: oadp-dev OO_BUNDLE: quay-proxy.ci.openshift.org/openshift/ci:konveyor_oadp-operator-bundle_oadp-dev OO_INSTALL_MODE: OwnNamespace @@ -57,6 +60,7 @@ tests: - chain: ipi-aws-pre - ref: oadp-operator-sdk-bundle-image test: + - ref: oadp-depends-on-build - as: set-related-image cli: latest commands: | @@ -84,15 +88,41 @@ tests: # freshly created Subscription in this ephemeral, single-purpose # namespace has no pre-existing config.env entries to lose; this # would need a read-modify-write if that ever stops being true. - PATCH=$(printf '{"spec":{"config":{"env":[{"name":"RELATED_IMAGE_KUBEVIRT_DATAMOVER_PLUGIN","value":"%s"}]}}}' "${KDM_PLUGIN_IMAGE}") + # + # This job's own dependency (KDM_PLUGIN_IMAGE, built by ci-operator + # natively from this PR) is always applied. Any cross-repo + # dependency resolved by the oadp-depends-on-build step above (per + # a Depends-On: line in this PR's description, e.g. naming an + # unmerged kubevirt-datamover-controller PR) is folded in from its + # manifest file, if present -- see openshift/oadp-operator#2389. + ALL_ENV_LINES="RELATED_IMAGE_KUBEVIRT_DATAMOVER_PLUGIN ${KDM_PLUGIN_IMAGE}" + if [ -s "${SHARED_DIR}/depends-on-images.txt" ]; then + ALL_ENV_LINES="${ALL_ENV_LINES} + $(cat "${SHARED_DIR}/depends-on-images.txt")" + fi + ENTRIES=() + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + ENTRIES+=("{\"name\":\"${ENV_NAME}\",\"value\":\"${ENV_VALUE}\"}") + done <<< "${ALL_ENV_LINES}" + JOINED=$(IFS=,; echo "${ENTRIES[*]}") + PATCH=$(printf '{"spec":{"config":{"env":[%s]}}}' "${JOINED}") oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "${PATCH}" - echo "Waiting for Deployment to observe RELATED_IMAGE_KUBEVIRT_DATAMOVER_PLUGIN=${KDM_PLUGIN_IMAGE}" + echo "Waiting for Deployment to observe:" + while read -r ENV_NAME _; do + [ -n "${ENV_NAME}" ] && echo " ${ENV_NAME}" + done <<< "${ALL_ENV_LINES}" for _ in $(seq 1 60); do - CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"RELATED_IMAGE_KUBEVIRT_DATAMOVER_PLUGIN\")].value}" 2>/dev/null || true) - [ "${CURRENT}" = "${KDM_PLUGIN_IMAGE}" ] && break + ALL_OK=true + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"${ENV_NAME}\")].value}" 2>/dev/null || true) + [ "${CURRENT}" != "${ENV_VALUE}" ] && ALL_OK=false + done <<< "${ALL_ENV_LINES}" + [ "${ALL_OK}" = "true" ] && break sleep 5 done - if [ "${CURRENT}" != "${KDM_PLUGIN_IMAGE}" ]; then + if [ "${ALL_OK}" != "true" ]; then echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true diff --git a/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.4__4.18.yaml b/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.4__4.18.yaml index df89b4aecf38d..015bf909e8eab 100644 --- a/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.4__4.18.yaml +++ b/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.4__4.18.yaml @@ -111,6 +111,14 @@ tests: dependencies: OO_INDEX: ci-index env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero RELATED_IMAGE_VELERO Dockerfile.ubi + openshift/velero RELATED_IMAGE_VELERO_RESTORE_HELPER Dockerfile-velero-restore-helper.ubi + openshift/openshift-velero-plugin RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN + openshift/velero-plugin-for-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS Dockerfile.ubi + openshift/velero-plugin-for-legacy-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS Dockerfile.ubi + openshift/velero-plugin-for-microsoft-azure RELATED_IMAGE_VELERO_PLUGIN_FOR_MICROSOFT_AZURE Dockerfile.ubi + openshift/velero-plugin-for-gcp RELATED_IMAGE_VELERO_PLUGIN_FOR_GCP Dockerfile.ubi FEATURE_GATES: '[''OpenShiftPodSecurityAdmission=false'']' FEATURE_SET: CustomNoUpgrade OADP_BRANCH: oadp-1.4 @@ -121,7 +129,12 @@ tests: TEST_NAME: e2e-test-aws post: - ref: oadp-analyze-e2e-failure + pre: + - chain: ipi-aws-pre + - ref: optional-operators-subscribe + - ref: oadp-depends-on-build test: + - ref: oadp-apply-depends-on-images - as: e2e cli: latest commands: make test-e2e diff --git a/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.5__4.19.yaml b/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.5__4.19.yaml index 03edef98cb550..76659287235c8 100644 --- a/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.5__4.19.yaml +++ b/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.5__4.19.yaml @@ -109,6 +109,13 @@ tests: dependencies: OO_INDEX: ci-index env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero RELATED_IMAGE_VELERO Dockerfile.ubi + openshift/openshift-velero-plugin RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN + openshift/velero-plugin-for-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS Dockerfile.ubi + openshift/velero-plugin-for-legacy-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS Dockerfile.ubi + openshift/velero-plugin-for-microsoft-azure RELATED_IMAGE_VELERO_PLUGIN_FOR_MICROSOFT_AZURE Dockerfile.ubi + openshift/velero-plugin-for-gcp RELATED_IMAGE_VELERO_PLUGIN_FOR_GCP Dockerfile.ubi OADP_BRANCH: oadp-1.5 OO_CHANNEL: stable OO_INSTALL_NAMESPACE: openshift-adp @@ -117,7 +124,12 @@ tests: TEST_NAME: e2e-test-aws post: - ref: oadp-analyze-e2e-failure + pre: + - chain: ipi-aws-pre + - ref: optional-operators-subscribe + - ref: oadp-depends-on-build test: + - ref: oadp-apply-depends-on-images - as: e2e cli: latest commands: make test-e2e diff --git a/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.5__4.20.yaml b/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.5__4.20.yaml index 3e38c0d1885a0..5f2f51342068e 100644 --- a/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.5__4.20.yaml +++ b/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.5__4.20.yaml @@ -109,6 +109,13 @@ tests: dependencies: OO_INDEX: ci-index env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero RELATED_IMAGE_VELERO Dockerfile.ubi + openshift/openshift-velero-plugin RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN + openshift/velero-plugin-for-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS Dockerfile.ubi + openshift/velero-plugin-for-legacy-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS Dockerfile.ubi + openshift/velero-plugin-for-microsoft-azure RELATED_IMAGE_VELERO_PLUGIN_FOR_MICROSOFT_AZURE Dockerfile.ubi + openshift/velero-plugin-for-gcp RELATED_IMAGE_VELERO_PLUGIN_FOR_GCP Dockerfile.ubi OADP_BRANCH: oadp-1.5 OO_CHANNEL: stable OO_INSTALL_NAMESPACE: openshift-adp @@ -117,7 +124,12 @@ tests: TEST_NAME: e2e-test-aws post: - ref: oadp-analyze-e2e-failure + pre: + - chain: ipi-aws-pre + - ref: optional-operators-subscribe + - ref: oadp-depends-on-build test: + - ref: oadp-apply-depends-on-images - as: e2e cli: latest commands: make test-e2e diff --git a/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6__4.22.yaml b/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6__4.22.yaml index 5762135ec94f1..b89d874ff7586 100644 --- a/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6__4.22.yaml +++ b/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6__4.22.yaml @@ -184,6 +184,25 @@ tests: dependencies: OO_INDEX: ci-index env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero RELATED_IMAGE_VELERO Dockerfile.ubi + openshift/openshift-velero-plugin RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN + openshift/velero-plugin-for-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS Dockerfile.ubi + openshift/velero-plugin-for-legacy-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS Dockerfile.ubi + openshift/velero-plugin-for-microsoft-azure RELATED_IMAGE_VELERO_PLUGIN_FOR_MICROSOFT_AZURE Dockerfile.ubi + openshift/velero-plugin-for-gcp RELATED_IMAGE_VELERO_PLUGIN_FOR_GCP Dockerfile.ubi + migtools/kubevirt-velero-plugin RELATED_IMAGE_KUBEVIRT_VELERO_PLUGIN Dockerfile.ubi + openshift/hypershift-oadp-plugin RELATED_IMAGE_HYPERSHIFT_VELERO_PLUGIN + openshift/oadp-must-gather RELATED_IMAGE_MUSTGATHER + migtools/oadp-non-admin RELATED_IMAGE_NON_ADMIN_CONTROLLER + migtools/oadp-vm-file-restore RELATED_IMAGE_VM_FILE_RESTORE_CONTROLLER + migtools/oadp-vm-file-restore RELATED_IMAGE_VM_FILE_RESTORE_ACCESS + migtools/oadp-vm-file-restore RELATED_IMAGE_VM_FILE_RESTORE_SSH Containerfile + migtools/filebrowser RELATED_IMAGE_VM_FILE_RESTORE_BROWSER Containerfile + migtools/oadp-cli RELATED_IMAGE_CONSOLE_CLI_DOWNLOAD Containerfile.download + migtools/oadp-vmdp RELATED_IMAGE_VMDP_CLI_DOWNLOAD Containerfile.download + migtools/kubevirt-datamover-controller RELATED_IMAGE_KUBEVIRT_DATAMOVER_CONTROLLER + migtools/kubevirt-datamover-plugin RELATED_IMAGE_KUBEVIRT_DATAMOVER_PLUGIN OADP_BRANCH: oadp-1.6 OO_CHANNEL: stable OO_INSTALL_NAMESPACE: openshift-adp @@ -192,7 +211,12 @@ tests: TEST_NAME: e2e-test-aws post: - ref: oadp-analyze-e2e-failure + pre: + - chain: ipi-aws-pre + - ref: optional-operators-subscribe + - ref: oadp-depends-on-build test: + - ref: oadp-apply-depends-on-images - as: e2e cli: latest commands: make test-e2e diff --git a/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6__4.23.yaml b/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6__4.23.yaml index 13db7ad9df569..d0772fd61e79b 100644 --- a/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6__4.23.yaml +++ b/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6__4.23.yaml @@ -76,6 +76,25 @@ tests: dependencies: OO_INDEX: ci-index env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero RELATED_IMAGE_VELERO Dockerfile.ubi + openshift/openshift-velero-plugin RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN + openshift/velero-plugin-for-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS Dockerfile.ubi + openshift/velero-plugin-for-legacy-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS Dockerfile.ubi + openshift/velero-plugin-for-microsoft-azure RELATED_IMAGE_VELERO_PLUGIN_FOR_MICROSOFT_AZURE Dockerfile.ubi + openshift/velero-plugin-for-gcp RELATED_IMAGE_VELERO_PLUGIN_FOR_GCP Dockerfile.ubi + migtools/kubevirt-velero-plugin RELATED_IMAGE_KUBEVIRT_VELERO_PLUGIN Dockerfile.ubi + openshift/hypershift-oadp-plugin RELATED_IMAGE_HYPERSHIFT_VELERO_PLUGIN + openshift/oadp-must-gather RELATED_IMAGE_MUSTGATHER + migtools/oadp-non-admin RELATED_IMAGE_NON_ADMIN_CONTROLLER + migtools/oadp-vm-file-restore RELATED_IMAGE_VM_FILE_RESTORE_CONTROLLER + migtools/oadp-vm-file-restore RELATED_IMAGE_VM_FILE_RESTORE_ACCESS + migtools/oadp-vm-file-restore RELATED_IMAGE_VM_FILE_RESTORE_SSH Containerfile + migtools/filebrowser RELATED_IMAGE_VM_FILE_RESTORE_BROWSER Containerfile + migtools/oadp-cli RELATED_IMAGE_CONSOLE_CLI_DOWNLOAD Containerfile.download + migtools/oadp-vmdp RELATED_IMAGE_VMDP_CLI_DOWNLOAD Containerfile.download + migtools/kubevirt-datamover-controller RELATED_IMAGE_KUBEVIRT_DATAMOVER_CONTROLLER + migtools/kubevirt-datamover-plugin RELATED_IMAGE_KUBEVIRT_DATAMOVER_PLUGIN OADP_BRANCH: oadp-1.6 OO_CHANNEL: stable OO_INSTALL_NAMESPACE: openshift-adp @@ -84,7 +103,12 @@ tests: TEST_NAME: e2e-test-aws post: - ref: oadp-analyze-e2e-failure + pre: + - chain: ipi-aws-pre + - ref: optional-operators-subscribe + - ref: oadp-depends-on-build test: + - ref: oadp-apply-depends-on-images - as: e2e cli: latest commands: make test-e2e diff --git a/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6__5.0.yaml b/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6__5.0.yaml index 62423e37b3cbd..1373ba95f5911 100644 --- a/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6__5.0.yaml +++ b/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6__5.0.yaml @@ -180,6 +180,25 @@ tests: dependencies: OO_INDEX: ci-index env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero RELATED_IMAGE_VELERO Dockerfile.ubi + openshift/openshift-velero-plugin RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN + openshift/velero-plugin-for-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS Dockerfile.ubi + openshift/velero-plugin-for-legacy-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS Dockerfile.ubi + openshift/velero-plugin-for-microsoft-azure RELATED_IMAGE_VELERO_PLUGIN_FOR_MICROSOFT_AZURE Dockerfile.ubi + openshift/velero-plugin-for-gcp RELATED_IMAGE_VELERO_PLUGIN_FOR_GCP Dockerfile.ubi + migtools/kubevirt-velero-plugin RELATED_IMAGE_KUBEVIRT_VELERO_PLUGIN Dockerfile.ubi + openshift/hypershift-oadp-plugin RELATED_IMAGE_HYPERSHIFT_VELERO_PLUGIN + openshift/oadp-must-gather RELATED_IMAGE_MUSTGATHER + migtools/oadp-non-admin RELATED_IMAGE_NON_ADMIN_CONTROLLER + migtools/oadp-vm-file-restore RELATED_IMAGE_VM_FILE_RESTORE_CONTROLLER + migtools/oadp-vm-file-restore RELATED_IMAGE_VM_FILE_RESTORE_ACCESS + migtools/oadp-vm-file-restore RELATED_IMAGE_VM_FILE_RESTORE_SSH Containerfile + migtools/filebrowser RELATED_IMAGE_VM_FILE_RESTORE_BROWSER Containerfile + migtools/oadp-cli RELATED_IMAGE_CONSOLE_CLI_DOWNLOAD Containerfile.download + migtools/oadp-vmdp RELATED_IMAGE_VMDP_CLI_DOWNLOAD Containerfile.download + migtools/kubevirt-datamover-controller RELATED_IMAGE_KUBEVIRT_DATAMOVER_CONTROLLER + migtools/kubevirt-datamover-plugin RELATED_IMAGE_KUBEVIRT_DATAMOVER_PLUGIN OADP_BRANCH: oadp-1.6 OO_CHANNEL: stable OO_INSTALL_NAMESPACE: openshift-adp @@ -188,7 +207,12 @@ tests: TEST_NAME: e2e-test-aws post: - ref: oadp-analyze-e2e-failure + pre: + - chain: ipi-aws-pre + - ref: optional-operators-subscribe + - ref: oadp-depends-on-build test: + - ref: oadp-apply-depends-on-images - as: e2e cli: latest commands: make test-e2e diff --git a/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-dev__4.22.yaml b/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-dev__4.22.yaml index 23a060b5eb718..7c01d3b7179e9 100644 --- a/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-dev__4.22.yaml +++ b/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-dev__4.22.yaml @@ -184,6 +184,25 @@ tests: dependencies: OO_INDEX: ci-index env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero RELATED_IMAGE_VELERO Dockerfile.ubi + openshift/openshift-velero-plugin RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN + openshift/velero-plugin-for-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS Dockerfile.ubi + openshift/velero-plugin-for-legacy-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS Dockerfile.ubi + openshift/velero-plugin-for-microsoft-azure RELATED_IMAGE_VELERO_PLUGIN_FOR_MICROSOFT_AZURE Dockerfile.ubi + openshift/velero-plugin-for-gcp RELATED_IMAGE_VELERO_PLUGIN_FOR_GCP Dockerfile.ubi + migtools/kubevirt-velero-plugin RELATED_IMAGE_KUBEVIRT_VELERO_PLUGIN Dockerfile.ubi + openshift/hypershift-oadp-plugin RELATED_IMAGE_HYPERSHIFT_VELERO_PLUGIN + openshift/oadp-must-gather RELATED_IMAGE_MUSTGATHER + migtools/oadp-non-admin RELATED_IMAGE_NON_ADMIN_CONTROLLER + migtools/oadp-vm-file-restore RELATED_IMAGE_VM_FILE_RESTORE_CONTROLLER + migtools/oadp-vm-file-restore RELATED_IMAGE_VM_FILE_RESTORE_ACCESS + migtools/oadp-vm-file-restore RELATED_IMAGE_VM_FILE_RESTORE_SSH Containerfile + migtools/filebrowser RELATED_IMAGE_VM_FILE_RESTORE_BROWSER Containerfile + migtools/oadp-cli RELATED_IMAGE_CONSOLE_CLI_DOWNLOAD Containerfile.download + migtools/oadp-vmdp RELATED_IMAGE_VMDP_CLI_DOWNLOAD Containerfile.download + migtools/kubevirt-datamover-controller RELATED_IMAGE_KUBEVIRT_DATAMOVER_CONTROLLER + migtools/kubevirt-datamover-plugin RELATED_IMAGE_KUBEVIRT_DATAMOVER_PLUGIN OADP_BRANCH: oadp-dev OO_CHANNEL: dev OO_INSTALL_NAMESPACE: openshift-adp @@ -192,7 +211,12 @@ tests: TEST_NAME: e2e-test-aws post: - ref: oadp-analyze-e2e-failure + pre: + - chain: ipi-aws-pre + - ref: optional-operators-subscribe + - ref: oadp-depends-on-build test: + - ref: oadp-apply-depends-on-images - as: e2e cli: latest commands: make test-e2e diff --git a/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-dev__4.23.yaml b/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-dev__4.23.yaml index 1319e30084c0d..7b6be81fae557 100644 --- a/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-dev__4.23.yaml +++ b/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-dev__4.23.yaml @@ -151,6 +151,25 @@ tests: dependencies: OO_INDEX: ci-index env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero RELATED_IMAGE_VELERO Dockerfile.ubi + openshift/openshift-velero-plugin RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN + openshift/velero-plugin-for-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS Dockerfile.ubi + openshift/velero-plugin-for-legacy-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS Dockerfile.ubi + openshift/velero-plugin-for-microsoft-azure RELATED_IMAGE_VELERO_PLUGIN_FOR_MICROSOFT_AZURE Dockerfile.ubi + openshift/velero-plugin-for-gcp RELATED_IMAGE_VELERO_PLUGIN_FOR_GCP Dockerfile.ubi + migtools/kubevirt-velero-plugin RELATED_IMAGE_KUBEVIRT_VELERO_PLUGIN Dockerfile.ubi + openshift/hypershift-oadp-plugin RELATED_IMAGE_HYPERSHIFT_VELERO_PLUGIN + openshift/oadp-must-gather RELATED_IMAGE_MUSTGATHER + migtools/oadp-non-admin RELATED_IMAGE_NON_ADMIN_CONTROLLER + migtools/oadp-vm-file-restore RELATED_IMAGE_VM_FILE_RESTORE_CONTROLLER + migtools/oadp-vm-file-restore RELATED_IMAGE_VM_FILE_RESTORE_ACCESS + migtools/oadp-vm-file-restore RELATED_IMAGE_VM_FILE_RESTORE_SSH Containerfile + migtools/filebrowser RELATED_IMAGE_VM_FILE_RESTORE_BROWSER Containerfile + migtools/oadp-cli RELATED_IMAGE_CONSOLE_CLI_DOWNLOAD Containerfile.download + migtools/oadp-vmdp RELATED_IMAGE_VMDP_CLI_DOWNLOAD Containerfile.download + migtools/kubevirt-datamover-controller RELATED_IMAGE_KUBEVIRT_DATAMOVER_CONTROLLER + migtools/kubevirt-datamover-plugin RELATED_IMAGE_KUBEVIRT_DATAMOVER_PLUGIN OADP_BRANCH: oadp-dev OO_CHANNEL: dev OO_INSTALL_NAMESPACE: openshift-adp @@ -159,7 +178,12 @@ tests: TEST_NAME: e2e-test-aws post: - ref: oadp-analyze-e2e-failure + pre: + - chain: ipi-aws-pre + - ref: optional-operators-subscribe + - ref: oadp-depends-on-build test: + - ref: oadp-apply-depends-on-images - as: e2e cli: latest commands: make test-e2e diff --git a/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-dev__5.0.yaml b/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-dev__5.0.yaml index 642b7d924f092..bb0e777f13fe5 100644 --- a/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-dev__5.0.yaml +++ b/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-dev__5.0.yaml @@ -180,6 +180,25 @@ tests: dependencies: OO_INDEX: ci-index env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero RELATED_IMAGE_VELERO Dockerfile.ubi + openshift/openshift-velero-plugin RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN + openshift/velero-plugin-for-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS Dockerfile.ubi + openshift/velero-plugin-for-legacy-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS Dockerfile.ubi + openshift/velero-plugin-for-microsoft-azure RELATED_IMAGE_VELERO_PLUGIN_FOR_MICROSOFT_AZURE Dockerfile.ubi + openshift/velero-plugin-for-gcp RELATED_IMAGE_VELERO_PLUGIN_FOR_GCP Dockerfile.ubi + migtools/kubevirt-velero-plugin RELATED_IMAGE_KUBEVIRT_VELERO_PLUGIN Dockerfile.ubi + openshift/hypershift-oadp-plugin RELATED_IMAGE_HYPERSHIFT_VELERO_PLUGIN + openshift/oadp-must-gather RELATED_IMAGE_MUSTGATHER + migtools/oadp-non-admin RELATED_IMAGE_NON_ADMIN_CONTROLLER + migtools/oadp-vm-file-restore RELATED_IMAGE_VM_FILE_RESTORE_CONTROLLER + migtools/oadp-vm-file-restore RELATED_IMAGE_VM_FILE_RESTORE_ACCESS + migtools/oadp-vm-file-restore RELATED_IMAGE_VM_FILE_RESTORE_SSH Containerfile + migtools/filebrowser RELATED_IMAGE_VM_FILE_RESTORE_BROWSER Containerfile + migtools/oadp-cli RELATED_IMAGE_CONSOLE_CLI_DOWNLOAD Containerfile.download + migtools/oadp-vmdp RELATED_IMAGE_VMDP_CLI_DOWNLOAD Containerfile.download + migtools/kubevirt-datamover-controller RELATED_IMAGE_KUBEVIRT_DATAMOVER_CONTROLLER + migtools/kubevirt-datamover-plugin RELATED_IMAGE_KUBEVIRT_DATAMOVER_PLUGIN OADP_BRANCH: oadp-dev OO_CHANNEL: dev OO_INSTALL_NAMESPACE: openshift-adp @@ -188,7 +207,12 @@ tests: TEST_NAME: e2e-test-aws post: - ref: oadp-analyze-e2e-failure + pre: + - chain: ipi-aws-pre + - ref: optional-operators-subscribe + - ref: oadp-depends-on-build test: + - ref: oadp-apply-depends-on-images - as: e2e cli: latest commands: make test-e2e diff --git a/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-dev__5.1.yaml b/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-dev__5.1.yaml index c2b7c69aad45e..0174618b9a1e5 100644 --- a/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-dev__5.1.yaml +++ b/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-dev__5.1.yaml @@ -182,6 +182,25 @@ tests: dependencies: OO_INDEX: ci-index env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero RELATED_IMAGE_VELERO Dockerfile.ubi + openshift/openshift-velero-plugin RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN + openshift/velero-plugin-for-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS Dockerfile.ubi + openshift/velero-plugin-for-legacy-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS Dockerfile.ubi + openshift/velero-plugin-for-microsoft-azure RELATED_IMAGE_VELERO_PLUGIN_FOR_MICROSOFT_AZURE Dockerfile.ubi + openshift/velero-plugin-for-gcp RELATED_IMAGE_VELERO_PLUGIN_FOR_GCP Dockerfile.ubi + migtools/kubevirt-velero-plugin RELATED_IMAGE_KUBEVIRT_VELERO_PLUGIN Dockerfile.ubi + openshift/hypershift-oadp-plugin RELATED_IMAGE_HYPERSHIFT_VELERO_PLUGIN + openshift/oadp-must-gather RELATED_IMAGE_MUSTGATHER + migtools/oadp-non-admin RELATED_IMAGE_NON_ADMIN_CONTROLLER + migtools/oadp-vm-file-restore RELATED_IMAGE_VM_FILE_RESTORE_CONTROLLER + migtools/oadp-vm-file-restore RELATED_IMAGE_VM_FILE_RESTORE_ACCESS + migtools/oadp-vm-file-restore RELATED_IMAGE_VM_FILE_RESTORE_SSH Containerfile + migtools/filebrowser RELATED_IMAGE_VM_FILE_RESTORE_BROWSER Containerfile + migtools/oadp-cli RELATED_IMAGE_CONSOLE_CLI_DOWNLOAD Containerfile.download + migtools/oadp-vmdp RELATED_IMAGE_VMDP_CLI_DOWNLOAD Containerfile.download + migtools/kubevirt-datamover-controller RELATED_IMAGE_KUBEVIRT_DATAMOVER_CONTROLLER + migtools/kubevirt-datamover-plugin RELATED_IMAGE_KUBEVIRT_DATAMOVER_PLUGIN OADP_BRANCH: oadp-dev OO_CHANNEL: dev OO_INSTALL_NAMESPACE: openshift-adp @@ -190,7 +209,12 @@ tests: TEST_NAME: e2e-test-aws post: - ref: oadp-analyze-e2e-failure + pre: + - chain: ipi-aws-pre + - ref: optional-operators-subscribe + - ref: oadp-depends-on-build test: + - ref: oadp-apply-depends-on-images - as: e2e cli: latest commands: make test-e2e diff --git a/ci-operator/config/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.4.yaml b/ci-operator/config/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.4.yaml index 12799b4db13d9..da6b16681bedd 100644 --- a/ci-operator/config/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.4.yaml +++ b/ci-operator/config/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.4.yaml @@ -1,3 +1,12 @@ +base_images: + claude-ai-helpers: + name: claude-ai-helpers + namespace: ci + tag: latest + test-oadp-operator: + name: oadp-operator-e2e-tests + namespace: konveyor + tag: oadp-1.4 build_root: image_stream_tag: name: builder @@ -13,6 +22,12 @@ promotion: to: - name: openshift-velero-plugin namespace: konveyor +releases: + latest: + candidate: + product: ocp + stream: nightly + version: "4.18" resources: '*': limits: @@ -31,6 +46,129 @@ tests: requests: cpu: 100m memory: 200Mi +- always_run: false + as: e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + steps: + cluster_profile: openshift-org-aws + env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero RELATED_IMAGE_VELERO Dockerfile.ubi + openshift/velero-plugin-for-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS Dockerfile.ubi + openshift/velero-plugin-for-legacy-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS Dockerfile.ubi + openshift/oadp-operator MANAGER_IMAGE + OADP_BRANCH: oadp-1.4 + OO_BUNDLE: quay-proxy.ci.openshift.org/openshift/ci:konveyor_oadp-operator-bundle_oadp-1.4 + OO_INSTALL_MODE: OwnNamespace + OO_INSTALL_NAMESPACE: openshift-adp + OO_INSTALL_TIMEOUT_MINUTES: "25" + OO_MIRROR_TO_CLUSTER_REGISTRY: "true" + OO_PSA_ENFORCE_PRIVILEGED: "true" + TEST_NAME: e2e-test-aws + post: + - ref: oadp-analyze-e2e-failure + - chain: ipi-aws-post + pre: + - chain: ipi-aws-pre + - ref: oadp-operator-sdk-bundle-image + test: + - ref: oadp-depends-on-build + - as: set-related-image + cli: latest + commands: | + set -o errexit + set -o nounset + set -o pipefail + SUBS=$(oc get subscription -n "${OO_INSTALL_NAMESPACE}" -o jsonpath='{.items[*].metadata.name}') + if [ -z "${SUBS}" ]; then + echo "No Subscription found in namespace ${OO_INSTALL_NAMESPACE}" >&2 + exit 1 + fi + if [ "$(echo "${SUBS}" | wc -w)" -gt 1 ]; then + echo "Multiple Subscriptions found in ${OO_INSTALL_NAMESPACE}: ${SUBS}" >&2 + exit 1 + fi + SUB="${SUBS}" + echo "Discovered Subscription: ${SUB}" + # See migtools/kubevirt-datamover-controller's set-related-image step + # for the full rationale on Subscription.spec.config.env vs. patching + # the Deployment directly, and on the MANAGER_IMAGE sentinel used for + # a resolved openshift/oadp-operator Depends-On (reconcile-logic-level + # PRs only, not RBAC/CSV/CRD changes -- see openshift/oadp-operator#2389). + ALL_ENV_LINES="RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN ${OPENSHIFT_VELERO_PLUGIN_IMAGE}" + if [ -s "${SHARED_DIR}/depends-on-images.txt" ]; then + ALL_ENV_LINES="${ALL_ENV_LINES} + $(cat "${SHARED_DIR}/depends-on-images.txt")" + fi + MANAGER_IMAGE_VALUE="" + SUBSCRIPTION_ENV_LINES="" + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + if [ "${ENV_NAME}" = "MANAGER_IMAGE" ]; then + MANAGER_IMAGE_VALUE="${ENV_VALUE}" + else + SUBSCRIPTION_ENV_LINES="${SUBSCRIPTION_ENV_LINES} + ${ENV_NAME} ${ENV_VALUE}" + fi + done <<< "${ALL_ENV_LINES}" + ALL_ENV_LINES="${SUBSCRIPTION_ENV_LINES}" + ENTRIES=() + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + ENTRIES+=("{\"name\":\"${ENV_NAME}\",\"value\":\"${ENV_VALUE}\"}") + done <<< "${ALL_ENV_LINES}" + JOINED=$(IFS=,; echo "${ENTRIES[*]}") + PATCH=$(printf '{"spec":{"config":{"env":[%s]}}}' "${JOINED}") + oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "${PATCH}" + echo "Waiting for Deployment to observe:" + while read -r ENV_NAME _; do + [ -n "${ENV_NAME}" ] && echo " ${ENV_NAME}" + done <<< "${ALL_ENV_LINES}" + for _ in $(seq 1 60); do + ALL_OK=true + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"${ENV_NAME}\")].value}" 2>/dev/null || true) + [ "${CURRENT}" != "${ENV_VALUE}" ] && ALL_OK=false + done <<< "${ALL_ENV_LINES}" + [ "${ALL_OK}" = "true" ] && break + sleep 5 + done + if [ "${ALL_OK}" != "true" ]; then + echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 + oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true + oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true + oc get deployment -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/deployments.yaml" || true + exit 1 + fi + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + if [ -n "${MANAGER_IMAGE_VALUE}" ]; then + echo "Depends-On resolved an oadp-operator PR -- patching the manager Deployment's own container image directly (not a RELATED_IMAGE_* env var, since oadp-operator itself isn't a related-image in this job's context)" + oc set image "deployment/openshift-adp-controller-manager" "manager=${MANAGER_IMAGE_VALUE}" -n "${OO_INSTALL_NAMESPACE}" + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + fi + dependencies: + - env: OPENSHIFT_VELERO_PLUGIN_IMAGE + name: openshift-velero-plugin-oadp-1.4 + env: + - name: OO_INSTALL_NAMESPACE + from: cli + resources: + requests: + cpu: 100m + memory: 100Mi + - as: e2e + cli: latest + commands: make test-e2e + credentials: + - mount_path: /var/run/oadp-credentials + name: oadp-credentials + namespace: test-credentials + from: test-oadp-operator + resources: + requests: + cpu: 1000m + memory: 512Mi zz_generated_metadata: branch: oadp-1.4 org: openshift diff --git a/ci-operator/config/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.5.yaml b/ci-operator/config/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.5.yaml index 0af92848d1407..259e21f22bbc8 100644 --- a/ci-operator/config/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.5.yaml +++ b/ci-operator/config/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.5.yaml @@ -1,3 +1,12 @@ +base_images: + claude-ai-helpers: + name: claude-ai-helpers + namespace: ci + tag: latest + test-oadp-operator: + name: oadp-operator-e2e-tests + namespace: konveyor + tag: oadp-1.5 build_root: image_stream_tag: name: builder @@ -13,6 +22,12 @@ promotion: to: - name: openshift-velero-plugin namespace: konveyor +releases: + latest: + candidate: + product: ocp + stream: nightly + version: "4.19" resources: '*': limits: @@ -31,6 +46,129 @@ tests: requests: cpu: 100m memory: 200Mi +- always_run: false + as: e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + steps: + cluster_profile: openshift-org-aws + env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero RELATED_IMAGE_VELERO Dockerfile.ubi + openshift/velero-plugin-for-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS Dockerfile.ubi + openshift/velero-plugin-for-legacy-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS Dockerfile.ubi + openshift/oadp-operator MANAGER_IMAGE + OADP_BRANCH: oadp-1.5 + OO_BUNDLE: quay-proxy.ci.openshift.org/openshift/ci:konveyor_oadp-operator-bundle_oadp-1.5 + OO_INSTALL_MODE: OwnNamespace + OO_INSTALL_NAMESPACE: openshift-adp + OO_INSTALL_TIMEOUT_MINUTES: "25" + OO_MIRROR_TO_CLUSTER_REGISTRY: "true" + OO_PSA_ENFORCE_PRIVILEGED: "true" + TEST_NAME: e2e-test-aws + post: + - ref: oadp-analyze-e2e-failure + - chain: ipi-aws-post + pre: + - chain: ipi-aws-pre + - ref: oadp-operator-sdk-bundle-image + test: + - ref: oadp-depends-on-build + - as: set-related-image + cli: latest + commands: | + set -o errexit + set -o nounset + set -o pipefail + SUBS=$(oc get subscription -n "${OO_INSTALL_NAMESPACE}" -o jsonpath='{.items[*].metadata.name}') + if [ -z "${SUBS}" ]; then + echo "No Subscription found in namespace ${OO_INSTALL_NAMESPACE}" >&2 + exit 1 + fi + if [ "$(echo "${SUBS}" | wc -w)" -gt 1 ]; then + echo "Multiple Subscriptions found in ${OO_INSTALL_NAMESPACE}: ${SUBS}" >&2 + exit 1 + fi + SUB="${SUBS}" + echo "Discovered Subscription: ${SUB}" + # See migtools/kubevirt-datamover-controller's set-related-image step + # for the full rationale on Subscription.spec.config.env vs. patching + # the Deployment directly, and on the MANAGER_IMAGE sentinel used for + # a resolved openshift/oadp-operator Depends-On (reconcile-logic-level + # PRs only, not RBAC/CSV/CRD changes -- see openshift/oadp-operator#2389). + ALL_ENV_LINES="RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN ${OPENSHIFT_VELERO_PLUGIN_IMAGE}" + if [ -s "${SHARED_DIR}/depends-on-images.txt" ]; then + ALL_ENV_LINES="${ALL_ENV_LINES} + $(cat "${SHARED_DIR}/depends-on-images.txt")" + fi + MANAGER_IMAGE_VALUE="" + SUBSCRIPTION_ENV_LINES="" + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + if [ "${ENV_NAME}" = "MANAGER_IMAGE" ]; then + MANAGER_IMAGE_VALUE="${ENV_VALUE}" + else + SUBSCRIPTION_ENV_LINES="${SUBSCRIPTION_ENV_LINES} + ${ENV_NAME} ${ENV_VALUE}" + fi + done <<< "${ALL_ENV_LINES}" + ALL_ENV_LINES="${SUBSCRIPTION_ENV_LINES}" + ENTRIES=() + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + ENTRIES+=("{\"name\":\"${ENV_NAME}\",\"value\":\"${ENV_VALUE}\"}") + done <<< "${ALL_ENV_LINES}" + JOINED=$(IFS=,; echo "${ENTRIES[*]}") + PATCH=$(printf '{"spec":{"config":{"env":[%s]}}}' "${JOINED}") + oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "${PATCH}" + echo "Waiting for Deployment to observe:" + while read -r ENV_NAME _; do + [ -n "${ENV_NAME}" ] && echo " ${ENV_NAME}" + done <<< "${ALL_ENV_LINES}" + for _ in $(seq 1 60); do + ALL_OK=true + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"${ENV_NAME}\")].value}" 2>/dev/null || true) + [ "${CURRENT}" != "${ENV_VALUE}" ] && ALL_OK=false + done <<< "${ALL_ENV_LINES}" + [ "${ALL_OK}" = "true" ] && break + sleep 5 + done + if [ "${ALL_OK}" != "true" ]; then + echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 + oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true + oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true + oc get deployment -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/deployments.yaml" || true + exit 1 + fi + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + if [ -n "${MANAGER_IMAGE_VALUE}" ]; then + echo "Depends-On resolved an oadp-operator PR -- patching the manager Deployment's own container image directly (not a RELATED_IMAGE_* env var, since oadp-operator itself isn't a related-image in this job's context)" + oc set image "deployment/openshift-adp-controller-manager" "manager=${MANAGER_IMAGE_VALUE}" -n "${OO_INSTALL_NAMESPACE}" + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + fi + dependencies: + - env: OPENSHIFT_VELERO_PLUGIN_IMAGE + name: openshift-velero-plugin-oadp-1.5 + env: + - name: OO_INSTALL_NAMESPACE + from: cli + resources: + requests: + cpu: 100m + memory: 100Mi + - as: e2e + cli: latest + commands: make test-e2e + credentials: + - mount_path: /var/run/oadp-credentials + name: oadp-credentials + namespace: test-credentials + from: test-oadp-operator + resources: + requests: + cpu: 1000m + memory: 512Mi zz_generated_metadata: branch: oadp-1.5 org: openshift diff --git a/ci-operator/config/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.6.yaml b/ci-operator/config/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.6.yaml index bad94bc129b89..0348e58f81a78 100644 --- a/ci-operator/config/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.6.yaml +++ b/ci-operator/config/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.6.yaml @@ -1,3 +1,12 @@ +base_images: + claude-ai-helpers: + name: claude-ai-helpers + namespace: ci + tag: latest + test-oadp-operator: + name: oadp-operator-e2e-tests + namespace: konveyor + tag: oadp-1.6 build_root: image_stream_tag: name: builder @@ -13,6 +22,12 @@ promotion: to: - name: openshift-velero-plugin namespace: konveyor +releases: + latest: + candidate: + product: ocp + stream: nightly + version: "5.0" resources: '*': limits: @@ -31,6 +46,129 @@ tests: requests: cpu: 100m memory: 200Mi +- always_run: false + as: e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + steps: + cluster_profile: openshift-org-aws + env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero RELATED_IMAGE_VELERO Dockerfile.ubi + openshift/velero-plugin-for-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS Dockerfile.ubi + openshift/velero-plugin-for-legacy-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS Dockerfile.ubi + openshift/oadp-operator MANAGER_IMAGE + OADP_BRANCH: oadp-1.6 + OO_BUNDLE: quay-proxy.ci.openshift.org/openshift/ci:konveyor_oadp-operator-bundle_oadp-1.6 + OO_INSTALL_MODE: OwnNamespace + OO_INSTALL_NAMESPACE: openshift-adp + OO_INSTALL_TIMEOUT_MINUTES: "25" + OO_MIRROR_TO_CLUSTER_REGISTRY: "true" + OO_PSA_ENFORCE_PRIVILEGED: "true" + TEST_NAME: e2e-test-aws + post: + - ref: oadp-analyze-e2e-failure + - chain: ipi-aws-post + pre: + - chain: ipi-aws-pre + - ref: oadp-operator-sdk-bundle-image + test: + - ref: oadp-depends-on-build + - as: set-related-image + cli: latest + commands: | + set -o errexit + set -o nounset + set -o pipefail + SUBS=$(oc get subscription -n "${OO_INSTALL_NAMESPACE}" -o jsonpath='{.items[*].metadata.name}') + if [ -z "${SUBS}" ]; then + echo "No Subscription found in namespace ${OO_INSTALL_NAMESPACE}" >&2 + exit 1 + fi + if [ "$(echo "${SUBS}" | wc -w)" -gt 1 ]; then + echo "Multiple Subscriptions found in ${OO_INSTALL_NAMESPACE}: ${SUBS}" >&2 + exit 1 + fi + SUB="${SUBS}" + echo "Discovered Subscription: ${SUB}" + # See migtools/kubevirt-datamover-controller's set-related-image step + # for the full rationale on Subscription.spec.config.env vs. patching + # the Deployment directly, and on the MANAGER_IMAGE sentinel used for + # a resolved openshift/oadp-operator Depends-On (reconcile-logic-level + # PRs only, not RBAC/CSV/CRD changes -- see openshift/oadp-operator#2389). + ALL_ENV_LINES="RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN ${OPENSHIFT_VELERO_PLUGIN_IMAGE}" + if [ -s "${SHARED_DIR}/depends-on-images.txt" ]; then + ALL_ENV_LINES="${ALL_ENV_LINES} + $(cat "${SHARED_DIR}/depends-on-images.txt")" + fi + MANAGER_IMAGE_VALUE="" + SUBSCRIPTION_ENV_LINES="" + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + if [ "${ENV_NAME}" = "MANAGER_IMAGE" ]; then + MANAGER_IMAGE_VALUE="${ENV_VALUE}" + else + SUBSCRIPTION_ENV_LINES="${SUBSCRIPTION_ENV_LINES} + ${ENV_NAME} ${ENV_VALUE}" + fi + done <<< "${ALL_ENV_LINES}" + ALL_ENV_LINES="${SUBSCRIPTION_ENV_LINES}" + ENTRIES=() + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + ENTRIES+=("{\"name\":\"${ENV_NAME}\",\"value\":\"${ENV_VALUE}\"}") + done <<< "${ALL_ENV_LINES}" + JOINED=$(IFS=,; echo "${ENTRIES[*]}") + PATCH=$(printf '{"spec":{"config":{"env":[%s]}}}' "${JOINED}") + oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "${PATCH}" + echo "Waiting for Deployment to observe:" + while read -r ENV_NAME _; do + [ -n "${ENV_NAME}" ] && echo " ${ENV_NAME}" + done <<< "${ALL_ENV_LINES}" + for _ in $(seq 1 60); do + ALL_OK=true + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"${ENV_NAME}\")].value}" 2>/dev/null || true) + [ "${CURRENT}" != "${ENV_VALUE}" ] && ALL_OK=false + done <<< "${ALL_ENV_LINES}" + [ "${ALL_OK}" = "true" ] && break + sleep 5 + done + if [ "${ALL_OK}" != "true" ]; then + echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 + oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true + oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true + oc get deployment -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/deployments.yaml" || true + exit 1 + fi + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + if [ -n "${MANAGER_IMAGE_VALUE}" ]; then + echo "Depends-On resolved an oadp-operator PR -- patching the manager Deployment's own container image directly (not a RELATED_IMAGE_* env var, since oadp-operator itself isn't a related-image in this job's context)" + oc set image "deployment/openshift-adp-controller-manager" "manager=${MANAGER_IMAGE_VALUE}" -n "${OO_INSTALL_NAMESPACE}" + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + fi + dependencies: + - env: OPENSHIFT_VELERO_PLUGIN_IMAGE + name: openshift-velero-plugin-oadp-1.6 + env: + - name: OO_INSTALL_NAMESPACE + from: cli + resources: + requests: + cpu: 100m + memory: 100Mi + - as: e2e + cli: latest + commands: make test-e2e + credentials: + - mount_path: /var/run/oadp-credentials + name: oadp-credentials + namespace: test-credentials + from: test-oadp-operator + resources: + requests: + cpu: 1000m + memory: 512Mi zz_generated_metadata: branch: oadp-1.6 org: openshift diff --git a/ci-operator/config/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-dev.yaml b/ci-operator/config/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-dev.yaml index d234f2e350e18..69dfce40664b1 100644 --- a/ci-operator/config/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-dev.yaml +++ b/ci-operator/config/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-dev.yaml @@ -1,3 +1,12 @@ +base_images: + claude-ai-helpers: + name: claude-ai-helpers + namespace: ci + tag: latest + test-oadp-operator: + name: oadp-operator-e2e-tests + namespace: konveyor + tag: oadp-dev build_root: image_stream_tag: name: builder @@ -13,6 +22,12 @@ promotion: to: - name: openshift-velero-plugin namespace: konveyor +releases: + latest: + candidate: + product: ocp + stream: nightly + version: "5.0" resources: '*': limits: @@ -31,6 +46,129 @@ tests: requests: cpu: 100m memory: 200Mi +- always_run: false + as: e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + steps: + cluster_profile: openshift-org-aws + env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero RELATED_IMAGE_VELERO Dockerfile.ubi + openshift/velero-plugin-for-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS Dockerfile.ubi + openshift/velero-plugin-for-legacy-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS Dockerfile.ubi + openshift/oadp-operator MANAGER_IMAGE + OADP_BRANCH: oadp-dev + OO_BUNDLE: quay-proxy.ci.openshift.org/openshift/ci:konveyor_oadp-operator-bundle_oadp-dev + OO_INSTALL_MODE: OwnNamespace + OO_INSTALL_NAMESPACE: openshift-adp + OO_INSTALL_TIMEOUT_MINUTES: "25" + OO_MIRROR_TO_CLUSTER_REGISTRY: "true" + OO_PSA_ENFORCE_PRIVILEGED: "true" + TEST_NAME: e2e-test-aws + post: + - ref: oadp-analyze-e2e-failure + - chain: ipi-aws-post + pre: + - chain: ipi-aws-pre + - ref: oadp-operator-sdk-bundle-image + test: + - ref: oadp-depends-on-build + - as: set-related-image + cli: latest + commands: | + set -o errexit + set -o nounset + set -o pipefail + SUBS=$(oc get subscription -n "${OO_INSTALL_NAMESPACE}" -o jsonpath='{.items[*].metadata.name}') + if [ -z "${SUBS}" ]; then + echo "No Subscription found in namespace ${OO_INSTALL_NAMESPACE}" >&2 + exit 1 + fi + if [ "$(echo "${SUBS}" | wc -w)" -gt 1 ]; then + echo "Multiple Subscriptions found in ${OO_INSTALL_NAMESPACE}: ${SUBS}" >&2 + exit 1 + fi + SUB="${SUBS}" + echo "Discovered Subscription: ${SUB}" + # See migtools/kubevirt-datamover-controller's set-related-image step + # for the full rationale on Subscription.spec.config.env vs. patching + # the Deployment directly, and on the MANAGER_IMAGE sentinel used for + # a resolved openshift/oadp-operator Depends-On (reconcile-logic-level + # PRs only, not RBAC/CSV/CRD changes -- see openshift/oadp-operator#2389). + ALL_ENV_LINES="RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN ${OPENSHIFT_VELERO_PLUGIN_IMAGE}" + if [ -s "${SHARED_DIR}/depends-on-images.txt" ]; then + ALL_ENV_LINES="${ALL_ENV_LINES} + $(cat "${SHARED_DIR}/depends-on-images.txt")" + fi + MANAGER_IMAGE_VALUE="" + SUBSCRIPTION_ENV_LINES="" + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + if [ "${ENV_NAME}" = "MANAGER_IMAGE" ]; then + MANAGER_IMAGE_VALUE="${ENV_VALUE}" + else + SUBSCRIPTION_ENV_LINES="${SUBSCRIPTION_ENV_LINES} + ${ENV_NAME} ${ENV_VALUE}" + fi + done <<< "${ALL_ENV_LINES}" + ALL_ENV_LINES="${SUBSCRIPTION_ENV_LINES}" + ENTRIES=() + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + ENTRIES+=("{\"name\":\"${ENV_NAME}\",\"value\":\"${ENV_VALUE}\"}") + done <<< "${ALL_ENV_LINES}" + JOINED=$(IFS=,; echo "${ENTRIES[*]}") + PATCH=$(printf '{"spec":{"config":{"env":[%s]}}}' "${JOINED}") + oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "${PATCH}" + echo "Waiting for Deployment to observe:" + while read -r ENV_NAME _; do + [ -n "${ENV_NAME}" ] && echo " ${ENV_NAME}" + done <<< "${ALL_ENV_LINES}" + for _ in $(seq 1 60); do + ALL_OK=true + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"${ENV_NAME}\")].value}" 2>/dev/null || true) + [ "${CURRENT}" != "${ENV_VALUE}" ] && ALL_OK=false + done <<< "${ALL_ENV_LINES}" + [ "${ALL_OK}" = "true" ] && break + sleep 5 + done + if [ "${ALL_OK}" != "true" ]; then + echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 + oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true + oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true + oc get deployment -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/deployments.yaml" || true + exit 1 + fi + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + if [ -n "${MANAGER_IMAGE_VALUE}" ]; then + echo "Depends-On resolved an oadp-operator PR -- patching the manager Deployment's own container image directly (not a RELATED_IMAGE_* env var, since oadp-operator itself isn't a related-image in this job's context)" + oc set image "deployment/openshift-adp-controller-manager" "manager=${MANAGER_IMAGE_VALUE}" -n "${OO_INSTALL_NAMESPACE}" + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + fi + dependencies: + - env: OPENSHIFT_VELERO_PLUGIN_IMAGE + name: openshift-velero-plugin + env: + - name: OO_INSTALL_NAMESPACE + from: cli + resources: + requests: + cpu: 100m + memory: 100Mi + - as: e2e + cli: latest + commands: make test-e2e + credentials: + - mount_path: /var/run/oadp-credentials + name: oadp-credentials + namespace: test-credentials + from: test-oadp-operator + resources: + requests: + cpu: 1000m + memory: 512Mi zz_generated_metadata: branch: oadp-dev org: openshift diff --git a/ci-operator/config/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.4.yaml b/ci-operator/config/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.4.yaml index 50f957a8e39f3..9630a65c24c02 100644 --- a/ci-operator/config/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.4.yaml +++ b/ci-operator/config/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.4.yaml @@ -1,3 +1,12 @@ +base_images: + claude-ai-helpers: + name: claude-ai-helpers + namespace: ci + tag: latest + test-oadp-operator: + name: oadp-operator-e2e-tests + namespace: konveyor + tag: oadp-1.4 build_root: image_stream_tag: name: builder @@ -13,6 +22,12 @@ promotion: to: - name: velero-plugin-for-aws namespace: konveyor +releases: + latest: + candidate: + product: ocp + stream: nightly + version: "4.18" resources: '*': limits: @@ -20,6 +35,130 @@ resources: requests: cpu: 100m memory: 200Mi +tests: +- always_run: false + as: e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + steps: + cluster_profile: openshift-org-aws + env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero RELATED_IMAGE_VELERO Dockerfile.ubi + openshift/velero-plugin-for-legacy-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS Dockerfile.ubi + openshift/openshift-velero-plugin RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN + openshift/oadp-operator MANAGER_IMAGE + OADP_BRANCH: oadp-1.4 + OO_BUNDLE: quay-proxy.ci.openshift.org/openshift/ci:konveyor_oadp-operator-bundle_oadp-1.4 + OO_INSTALL_MODE: OwnNamespace + OO_INSTALL_NAMESPACE: openshift-adp + OO_INSTALL_TIMEOUT_MINUTES: "25" + OO_MIRROR_TO_CLUSTER_REGISTRY: "true" + OO_PSA_ENFORCE_PRIVILEGED: "true" + TEST_NAME: e2e-test-aws + post: + - ref: oadp-analyze-e2e-failure + - chain: ipi-aws-post + pre: + - chain: ipi-aws-pre + - ref: oadp-operator-sdk-bundle-image + test: + - ref: oadp-depends-on-build + - as: set-related-image + cli: latest + commands: | + set -o errexit + set -o nounset + set -o pipefail + SUBS=$(oc get subscription -n "${OO_INSTALL_NAMESPACE}" -o jsonpath='{.items[*].metadata.name}') + if [ -z "${SUBS}" ]; then + echo "No Subscription found in namespace ${OO_INSTALL_NAMESPACE}" >&2 + exit 1 + fi + if [ "$(echo "${SUBS}" | wc -w)" -gt 1 ]; then + echo "Multiple Subscriptions found in ${OO_INSTALL_NAMESPACE}: ${SUBS}" >&2 + exit 1 + fi + SUB="${SUBS}" + echo "Discovered Subscription: ${SUB}" + # See migtools/kubevirt-datamover-controller's set-related-image step + # for the full rationale on Subscription.spec.config.env vs. patching + # the Deployment directly, and on the MANAGER_IMAGE sentinel used for + # a resolved openshift/oadp-operator Depends-On (reconcile-logic-level + # PRs only, not RBAC/CSV/CRD changes -- see openshift/oadp-operator#2389). + ALL_ENV_LINES="RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS ${AWS_PLUGIN_IMAGE}" + if [ -s "${SHARED_DIR}/depends-on-images.txt" ]; then + ALL_ENV_LINES="${ALL_ENV_LINES} + $(cat "${SHARED_DIR}/depends-on-images.txt")" + fi + MANAGER_IMAGE_VALUE="" + SUBSCRIPTION_ENV_LINES="" + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + if [ "${ENV_NAME}" = "MANAGER_IMAGE" ]; then + MANAGER_IMAGE_VALUE="${ENV_VALUE}" + else + SUBSCRIPTION_ENV_LINES="${SUBSCRIPTION_ENV_LINES} + ${ENV_NAME} ${ENV_VALUE}" + fi + done <<< "${ALL_ENV_LINES}" + ALL_ENV_LINES="${SUBSCRIPTION_ENV_LINES}" + ENTRIES=() + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + ENTRIES+=("{\"name\":\"${ENV_NAME}\",\"value\":\"${ENV_VALUE}\"}") + done <<< "${ALL_ENV_LINES}" + JOINED=$(IFS=,; echo "${ENTRIES[*]}") + PATCH=$(printf '{"spec":{"config":{"env":[%s]}}}' "${JOINED}") + oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "${PATCH}" + echo "Waiting for Deployment to observe:" + while read -r ENV_NAME _; do + [ -n "${ENV_NAME}" ] && echo " ${ENV_NAME}" + done <<< "${ALL_ENV_LINES}" + for _ in $(seq 1 60); do + ALL_OK=true + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"${ENV_NAME}\")].value}" 2>/dev/null || true) + [ "${CURRENT}" != "${ENV_VALUE}" ] && ALL_OK=false + done <<< "${ALL_ENV_LINES}" + [ "${ALL_OK}" = "true" ] && break + sleep 5 + done + if [ "${ALL_OK}" != "true" ]; then + echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 + oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true + oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true + oc get deployment -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/deployments.yaml" || true + exit 1 + fi + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + if [ -n "${MANAGER_IMAGE_VALUE}" ]; then + echo "Depends-On resolved an oadp-operator PR -- patching the manager Deployment's own container image directly (not a RELATED_IMAGE_* env var, since oadp-operator itself isn't a related-image in this job's context)" + oc set image "deployment/openshift-adp-controller-manager" "manager=${MANAGER_IMAGE_VALUE}" -n "${OO_INSTALL_NAMESPACE}" + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + fi + dependencies: + - env: AWS_PLUGIN_IMAGE + name: velero-plugin-for-aws-oadp-1.4 + env: + - name: OO_INSTALL_NAMESPACE + from: cli + resources: + requests: + cpu: 100m + memory: 100Mi + - as: e2e + cli: latest + commands: make test-e2e + credentials: + - mount_path: /var/run/oadp-credentials + name: oadp-credentials + namespace: test-credentials + from: test-oadp-operator + resources: + requests: + cpu: 1000m + memory: 512Mi zz_generated_metadata: branch: oadp-1.4 org: openshift diff --git a/ci-operator/config/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.5.yaml b/ci-operator/config/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.5.yaml index 3b7ce8901f92d..a87029229a420 100644 --- a/ci-operator/config/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.5.yaml +++ b/ci-operator/config/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.5.yaml @@ -1,3 +1,12 @@ +base_images: + claude-ai-helpers: + name: claude-ai-helpers + namespace: ci + tag: latest + test-oadp-operator: + name: oadp-operator-e2e-tests + namespace: konveyor + tag: oadp-1.5 build_root: image_stream_tag: name: builder @@ -13,6 +22,12 @@ promotion: to: - name: velero-plugin-for-aws namespace: konveyor +releases: + latest: + candidate: + product: ocp + stream: nightly + version: "4.19" resources: '*': limits: @@ -20,6 +35,130 @@ resources: requests: cpu: 100m memory: 200Mi +tests: +- always_run: false + as: e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + steps: + cluster_profile: openshift-org-aws + env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero RELATED_IMAGE_VELERO Dockerfile.ubi + openshift/velero-plugin-for-legacy-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS Dockerfile.ubi + openshift/openshift-velero-plugin RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN + openshift/oadp-operator MANAGER_IMAGE + OADP_BRANCH: oadp-1.5 + OO_BUNDLE: quay-proxy.ci.openshift.org/openshift/ci:konveyor_oadp-operator-bundle_oadp-1.5 + OO_INSTALL_MODE: OwnNamespace + OO_INSTALL_NAMESPACE: openshift-adp + OO_INSTALL_TIMEOUT_MINUTES: "25" + OO_MIRROR_TO_CLUSTER_REGISTRY: "true" + OO_PSA_ENFORCE_PRIVILEGED: "true" + TEST_NAME: e2e-test-aws + post: + - ref: oadp-analyze-e2e-failure + - chain: ipi-aws-post + pre: + - chain: ipi-aws-pre + - ref: oadp-operator-sdk-bundle-image + test: + - ref: oadp-depends-on-build + - as: set-related-image + cli: latest + commands: | + set -o errexit + set -o nounset + set -o pipefail + SUBS=$(oc get subscription -n "${OO_INSTALL_NAMESPACE}" -o jsonpath='{.items[*].metadata.name}') + if [ -z "${SUBS}" ]; then + echo "No Subscription found in namespace ${OO_INSTALL_NAMESPACE}" >&2 + exit 1 + fi + if [ "$(echo "${SUBS}" | wc -w)" -gt 1 ]; then + echo "Multiple Subscriptions found in ${OO_INSTALL_NAMESPACE}: ${SUBS}" >&2 + exit 1 + fi + SUB="${SUBS}" + echo "Discovered Subscription: ${SUB}" + # See migtools/kubevirt-datamover-controller's set-related-image step + # for the full rationale on Subscription.spec.config.env vs. patching + # the Deployment directly, and on the MANAGER_IMAGE sentinel used for + # a resolved openshift/oadp-operator Depends-On (reconcile-logic-level + # PRs only, not RBAC/CSV/CRD changes -- see openshift/oadp-operator#2389). + ALL_ENV_LINES="RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS ${AWS_PLUGIN_IMAGE}" + if [ -s "${SHARED_DIR}/depends-on-images.txt" ]; then + ALL_ENV_LINES="${ALL_ENV_LINES} + $(cat "${SHARED_DIR}/depends-on-images.txt")" + fi + MANAGER_IMAGE_VALUE="" + SUBSCRIPTION_ENV_LINES="" + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + if [ "${ENV_NAME}" = "MANAGER_IMAGE" ]; then + MANAGER_IMAGE_VALUE="${ENV_VALUE}" + else + SUBSCRIPTION_ENV_LINES="${SUBSCRIPTION_ENV_LINES} + ${ENV_NAME} ${ENV_VALUE}" + fi + done <<< "${ALL_ENV_LINES}" + ALL_ENV_LINES="${SUBSCRIPTION_ENV_LINES}" + ENTRIES=() + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + ENTRIES+=("{\"name\":\"${ENV_NAME}\",\"value\":\"${ENV_VALUE}\"}") + done <<< "${ALL_ENV_LINES}" + JOINED=$(IFS=,; echo "${ENTRIES[*]}") + PATCH=$(printf '{"spec":{"config":{"env":[%s]}}}' "${JOINED}") + oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "${PATCH}" + echo "Waiting for Deployment to observe:" + while read -r ENV_NAME _; do + [ -n "${ENV_NAME}" ] && echo " ${ENV_NAME}" + done <<< "${ALL_ENV_LINES}" + for _ in $(seq 1 60); do + ALL_OK=true + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"${ENV_NAME}\")].value}" 2>/dev/null || true) + [ "${CURRENT}" != "${ENV_VALUE}" ] && ALL_OK=false + done <<< "${ALL_ENV_LINES}" + [ "${ALL_OK}" = "true" ] && break + sleep 5 + done + if [ "${ALL_OK}" != "true" ]; then + echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 + oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true + oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true + oc get deployment -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/deployments.yaml" || true + exit 1 + fi + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + if [ -n "${MANAGER_IMAGE_VALUE}" ]; then + echo "Depends-On resolved an oadp-operator PR -- patching the manager Deployment's own container image directly (not a RELATED_IMAGE_* env var, since oadp-operator itself isn't a related-image in this job's context)" + oc set image "deployment/openshift-adp-controller-manager" "manager=${MANAGER_IMAGE_VALUE}" -n "${OO_INSTALL_NAMESPACE}" + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + fi + dependencies: + - env: AWS_PLUGIN_IMAGE + name: velero-plugin-for-aws-oadp-1.5 + env: + - name: OO_INSTALL_NAMESPACE + from: cli + resources: + requests: + cpu: 100m + memory: 100Mi + - as: e2e + cli: latest + commands: make test-e2e + credentials: + - mount_path: /var/run/oadp-credentials + name: oadp-credentials + namespace: test-credentials + from: test-oadp-operator + resources: + requests: + cpu: 1000m + memory: 512Mi zz_generated_metadata: branch: oadp-1.5 org: openshift diff --git a/ci-operator/config/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.6.yaml b/ci-operator/config/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.6.yaml index 72f9f4e90aa71..bea9afea24684 100644 --- a/ci-operator/config/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.6.yaml +++ b/ci-operator/config/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.6.yaml @@ -1,3 +1,12 @@ +base_images: + claude-ai-helpers: + name: claude-ai-helpers + namespace: ci + tag: latest + test-oadp-operator: + name: oadp-operator-e2e-tests + namespace: konveyor + tag: oadp-1.6 build_root: image_stream_tag: name: builder @@ -13,6 +22,12 @@ promotion: to: - name: velero-plugin-for-aws namespace: konveyor +releases: + latest: + candidate: + product: ocp + stream: nightly + version: "5.0" resources: '*': limits: @@ -20,6 +35,130 @@ resources: requests: cpu: 100m memory: 200Mi +tests: +- always_run: false + as: e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + steps: + cluster_profile: openshift-org-aws + env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero RELATED_IMAGE_VELERO Dockerfile.ubi + openshift/velero-plugin-for-legacy-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS Dockerfile.ubi + openshift/openshift-velero-plugin RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN + openshift/oadp-operator MANAGER_IMAGE + OADP_BRANCH: oadp-1.6 + OO_BUNDLE: quay-proxy.ci.openshift.org/openshift/ci:konveyor_oadp-operator-bundle_oadp-1.6 + OO_INSTALL_MODE: OwnNamespace + OO_INSTALL_NAMESPACE: openshift-adp + OO_INSTALL_TIMEOUT_MINUTES: "25" + OO_MIRROR_TO_CLUSTER_REGISTRY: "true" + OO_PSA_ENFORCE_PRIVILEGED: "true" + TEST_NAME: e2e-test-aws + post: + - ref: oadp-analyze-e2e-failure + - chain: ipi-aws-post + pre: + - chain: ipi-aws-pre + - ref: oadp-operator-sdk-bundle-image + test: + - ref: oadp-depends-on-build + - as: set-related-image + cli: latest + commands: | + set -o errexit + set -o nounset + set -o pipefail + SUBS=$(oc get subscription -n "${OO_INSTALL_NAMESPACE}" -o jsonpath='{.items[*].metadata.name}') + if [ -z "${SUBS}" ]; then + echo "No Subscription found in namespace ${OO_INSTALL_NAMESPACE}" >&2 + exit 1 + fi + if [ "$(echo "${SUBS}" | wc -w)" -gt 1 ]; then + echo "Multiple Subscriptions found in ${OO_INSTALL_NAMESPACE}: ${SUBS}" >&2 + exit 1 + fi + SUB="${SUBS}" + echo "Discovered Subscription: ${SUB}" + # See migtools/kubevirt-datamover-controller's set-related-image step + # for the full rationale on Subscription.spec.config.env vs. patching + # the Deployment directly, and on the MANAGER_IMAGE sentinel used for + # a resolved openshift/oadp-operator Depends-On (reconcile-logic-level + # PRs only, not RBAC/CSV/CRD changes -- see openshift/oadp-operator#2389). + ALL_ENV_LINES="RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS ${AWS_PLUGIN_IMAGE}" + if [ -s "${SHARED_DIR}/depends-on-images.txt" ]; then + ALL_ENV_LINES="${ALL_ENV_LINES} + $(cat "${SHARED_DIR}/depends-on-images.txt")" + fi + MANAGER_IMAGE_VALUE="" + SUBSCRIPTION_ENV_LINES="" + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + if [ "${ENV_NAME}" = "MANAGER_IMAGE" ]; then + MANAGER_IMAGE_VALUE="${ENV_VALUE}" + else + SUBSCRIPTION_ENV_LINES="${SUBSCRIPTION_ENV_LINES} + ${ENV_NAME} ${ENV_VALUE}" + fi + done <<< "${ALL_ENV_LINES}" + ALL_ENV_LINES="${SUBSCRIPTION_ENV_LINES}" + ENTRIES=() + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + ENTRIES+=("{\"name\":\"${ENV_NAME}\",\"value\":\"${ENV_VALUE}\"}") + done <<< "${ALL_ENV_LINES}" + JOINED=$(IFS=,; echo "${ENTRIES[*]}") + PATCH=$(printf '{"spec":{"config":{"env":[%s]}}}' "${JOINED}") + oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "${PATCH}" + echo "Waiting for Deployment to observe:" + while read -r ENV_NAME _; do + [ -n "${ENV_NAME}" ] && echo " ${ENV_NAME}" + done <<< "${ALL_ENV_LINES}" + for _ in $(seq 1 60); do + ALL_OK=true + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"${ENV_NAME}\")].value}" 2>/dev/null || true) + [ "${CURRENT}" != "${ENV_VALUE}" ] && ALL_OK=false + done <<< "${ALL_ENV_LINES}" + [ "${ALL_OK}" = "true" ] && break + sleep 5 + done + if [ "${ALL_OK}" != "true" ]; then + echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 + oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true + oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true + oc get deployment -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/deployments.yaml" || true + exit 1 + fi + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + if [ -n "${MANAGER_IMAGE_VALUE}" ]; then + echo "Depends-On resolved an oadp-operator PR -- patching the manager Deployment's own container image directly (not a RELATED_IMAGE_* env var, since oadp-operator itself isn't a related-image in this job's context)" + oc set image "deployment/openshift-adp-controller-manager" "manager=${MANAGER_IMAGE_VALUE}" -n "${OO_INSTALL_NAMESPACE}" + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + fi + dependencies: + - env: AWS_PLUGIN_IMAGE + name: velero-plugin-for-aws-oadp-1.6 + env: + - name: OO_INSTALL_NAMESPACE + from: cli + resources: + requests: + cpu: 100m + memory: 100Mi + - as: e2e + cli: latest + commands: make test-e2e + credentials: + - mount_path: /var/run/oadp-credentials + name: oadp-credentials + namespace: test-credentials + from: test-oadp-operator + resources: + requests: + cpu: 1000m + memory: 512Mi zz_generated_metadata: branch: oadp-1.6 org: openshift diff --git a/ci-operator/config/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-dev.yaml b/ci-operator/config/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-dev.yaml index 6f72d72d55d32..5297d616b5b1e 100644 --- a/ci-operator/config/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-dev.yaml +++ b/ci-operator/config/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-dev.yaml @@ -1,3 +1,12 @@ +base_images: + claude-ai-helpers: + name: claude-ai-helpers + namespace: ci + tag: latest + test-oadp-operator: + name: oadp-operator-e2e-tests + namespace: konveyor + tag: oadp-dev build_root: image_stream_tag: name: builder @@ -13,6 +22,12 @@ promotion: to: - name: velero-plugin-for-aws namespace: konveyor +releases: + latest: + candidate: + product: ocp + stream: nightly + version: "5.0" resources: '*': limits: @@ -20,6 +35,130 @@ resources: requests: cpu: 100m memory: 200Mi +tests: +- always_run: false + as: e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + steps: + cluster_profile: openshift-org-aws + env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero RELATED_IMAGE_VELERO Dockerfile.ubi + openshift/velero-plugin-for-legacy-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS Dockerfile.ubi + openshift/openshift-velero-plugin RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN + openshift/oadp-operator MANAGER_IMAGE + OADP_BRANCH: oadp-dev + OO_BUNDLE: quay-proxy.ci.openshift.org/openshift/ci:konveyor_oadp-operator-bundle_oadp-dev + OO_INSTALL_MODE: OwnNamespace + OO_INSTALL_NAMESPACE: openshift-adp + OO_INSTALL_TIMEOUT_MINUTES: "25" + OO_MIRROR_TO_CLUSTER_REGISTRY: "true" + OO_PSA_ENFORCE_PRIVILEGED: "true" + TEST_NAME: e2e-test-aws + post: + - ref: oadp-analyze-e2e-failure + - chain: ipi-aws-post + pre: + - chain: ipi-aws-pre + - ref: oadp-operator-sdk-bundle-image + test: + - ref: oadp-depends-on-build + - as: set-related-image + cli: latest + commands: | + set -o errexit + set -o nounset + set -o pipefail + SUBS=$(oc get subscription -n "${OO_INSTALL_NAMESPACE}" -o jsonpath='{.items[*].metadata.name}') + if [ -z "${SUBS}" ]; then + echo "No Subscription found in namespace ${OO_INSTALL_NAMESPACE}" >&2 + exit 1 + fi + if [ "$(echo "${SUBS}" | wc -w)" -gt 1 ]; then + echo "Multiple Subscriptions found in ${OO_INSTALL_NAMESPACE}: ${SUBS}" >&2 + exit 1 + fi + SUB="${SUBS}" + echo "Discovered Subscription: ${SUB}" + # See migtools/kubevirt-datamover-controller's set-related-image step + # for the full rationale on Subscription.spec.config.env vs. patching + # the Deployment directly, and on the MANAGER_IMAGE sentinel used for + # a resolved openshift/oadp-operator Depends-On (reconcile-logic-level + # PRs only, not RBAC/CSV/CRD changes -- see openshift/oadp-operator#2389). + ALL_ENV_LINES="RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS ${AWS_PLUGIN_IMAGE}" + if [ -s "${SHARED_DIR}/depends-on-images.txt" ]; then + ALL_ENV_LINES="${ALL_ENV_LINES} + $(cat "${SHARED_DIR}/depends-on-images.txt")" + fi + MANAGER_IMAGE_VALUE="" + SUBSCRIPTION_ENV_LINES="" + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + if [ "${ENV_NAME}" = "MANAGER_IMAGE" ]; then + MANAGER_IMAGE_VALUE="${ENV_VALUE}" + else + SUBSCRIPTION_ENV_LINES="${SUBSCRIPTION_ENV_LINES} + ${ENV_NAME} ${ENV_VALUE}" + fi + done <<< "${ALL_ENV_LINES}" + ALL_ENV_LINES="${SUBSCRIPTION_ENV_LINES}" + ENTRIES=() + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + ENTRIES+=("{\"name\":\"${ENV_NAME}\",\"value\":\"${ENV_VALUE}\"}") + done <<< "${ALL_ENV_LINES}" + JOINED=$(IFS=,; echo "${ENTRIES[*]}") + PATCH=$(printf '{"spec":{"config":{"env":[%s]}}}' "${JOINED}") + oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "${PATCH}" + echo "Waiting for Deployment to observe:" + while read -r ENV_NAME _; do + [ -n "${ENV_NAME}" ] && echo " ${ENV_NAME}" + done <<< "${ALL_ENV_LINES}" + for _ in $(seq 1 60); do + ALL_OK=true + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"${ENV_NAME}\")].value}" 2>/dev/null || true) + [ "${CURRENT}" != "${ENV_VALUE}" ] && ALL_OK=false + done <<< "${ALL_ENV_LINES}" + [ "${ALL_OK}" = "true" ] && break + sleep 5 + done + if [ "${ALL_OK}" != "true" ]; then + echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 + oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true + oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true + oc get deployment -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/deployments.yaml" || true + exit 1 + fi + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + if [ -n "${MANAGER_IMAGE_VALUE}" ]; then + echo "Depends-On resolved an oadp-operator PR -- patching the manager Deployment's own container image directly (not a RELATED_IMAGE_* env var, since oadp-operator itself isn't a related-image in this job's context)" + oc set image "deployment/openshift-adp-controller-manager" "manager=${MANAGER_IMAGE_VALUE}" -n "${OO_INSTALL_NAMESPACE}" + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + fi + dependencies: + - env: AWS_PLUGIN_IMAGE + name: velero-plugin-for-aws + env: + - name: OO_INSTALL_NAMESPACE + from: cli + resources: + requests: + cpu: 100m + memory: 100Mi + - as: e2e + cli: latest + commands: make test-e2e + credentials: + - mount_path: /var/run/oadp-credentials + name: oadp-credentials + namespace: test-credentials + from: test-oadp-operator + resources: + requests: + cpu: 1000m + memory: 512Mi zz_generated_metadata: branch: oadp-dev org: openshift diff --git a/ci-operator/config/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.4.yaml b/ci-operator/config/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.4.yaml index 57344a4973cf0..8f937222e06d7 100644 --- a/ci-operator/config/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.4.yaml +++ b/ci-operator/config/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.4.yaml @@ -1,3 +1,12 @@ +base_images: + claude-ai-helpers: + name: claude-ai-helpers + namespace: ci + tag: latest + test-oadp-operator: + name: oadp-operator-e2e-tests + namespace: konveyor + tag: oadp-1.4 build_root: image_stream_tag: name: builder @@ -13,6 +22,12 @@ promotion: to: - name: velero-plugin-for-legacy-aws namespace: konveyor +releases: + latest: + candidate: + product: ocp + stream: nightly + version: "4.18" resources: '*': limits: @@ -32,6 +47,129 @@ tests: requests: cpu: 100m memory: 200Mi +- always_run: false + as: e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + steps: + cluster_profile: openshift-org-aws + env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero RELATED_IMAGE_VELERO Dockerfile.ubi + openshift/velero-plugin-for-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS Dockerfile.ubi + openshift/openshift-velero-plugin RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN + openshift/oadp-operator MANAGER_IMAGE + OADP_BRANCH: oadp-1.4 + OO_BUNDLE: quay-proxy.ci.openshift.org/openshift/ci:konveyor_oadp-operator-bundle_oadp-1.4 + OO_INSTALL_MODE: OwnNamespace + OO_INSTALL_NAMESPACE: openshift-adp + OO_INSTALL_TIMEOUT_MINUTES: "25" + OO_MIRROR_TO_CLUSTER_REGISTRY: "true" + OO_PSA_ENFORCE_PRIVILEGED: "true" + TEST_NAME: e2e-test-aws + post: + - ref: oadp-analyze-e2e-failure + - chain: ipi-aws-post + pre: + - chain: ipi-aws-pre + - ref: oadp-operator-sdk-bundle-image + test: + - ref: oadp-depends-on-build + - as: set-related-image + cli: latest + commands: | + set -o errexit + set -o nounset + set -o pipefail + SUBS=$(oc get subscription -n "${OO_INSTALL_NAMESPACE}" -o jsonpath='{.items[*].metadata.name}') + if [ -z "${SUBS}" ]; then + echo "No Subscription found in namespace ${OO_INSTALL_NAMESPACE}" >&2 + exit 1 + fi + if [ "$(echo "${SUBS}" | wc -w)" -gt 1 ]; then + echo "Multiple Subscriptions found in ${OO_INSTALL_NAMESPACE}: ${SUBS}" >&2 + exit 1 + fi + SUB="${SUBS}" + echo "Discovered Subscription: ${SUB}" + # See migtools/kubevirt-datamover-controller's set-related-image step + # for the full rationale on Subscription.spec.config.env vs. patching + # the Deployment directly, and on the MANAGER_IMAGE sentinel used for + # a resolved openshift/oadp-operator Depends-On (reconcile-logic-level + # PRs only, not RBAC/CSV/CRD changes -- see openshift/oadp-operator#2389). + ALL_ENV_LINES="RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS ${LEGACY_AWS_PLUGIN_IMAGE}" + if [ -s "${SHARED_DIR}/depends-on-images.txt" ]; then + ALL_ENV_LINES="${ALL_ENV_LINES} + $(cat "${SHARED_DIR}/depends-on-images.txt")" + fi + MANAGER_IMAGE_VALUE="" + SUBSCRIPTION_ENV_LINES="" + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + if [ "${ENV_NAME}" = "MANAGER_IMAGE" ]; then + MANAGER_IMAGE_VALUE="${ENV_VALUE}" + else + SUBSCRIPTION_ENV_LINES="${SUBSCRIPTION_ENV_LINES} + ${ENV_NAME} ${ENV_VALUE}" + fi + done <<< "${ALL_ENV_LINES}" + ALL_ENV_LINES="${SUBSCRIPTION_ENV_LINES}" + ENTRIES=() + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + ENTRIES+=("{\"name\":\"${ENV_NAME}\",\"value\":\"${ENV_VALUE}\"}") + done <<< "${ALL_ENV_LINES}" + JOINED=$(IFS=,; echo "${ENTRIES[*]}") + PATCH=$(printf '{"spec":{"config":{"env":[%s]}}}' "${JOINED}") + oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "${PATCH}" + echo "Waiting for Deployment to observe:" + while read -r ENV_NAME _; do + [ -n "${ENV_NAME}" ] && echo " ${ENV_NAME}" + done <<< "${ALL_ENV_LINES}" + for _ in $(seq 1 60); do + ALL_OK=true + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"${ENV_NAME}\")].value}" 2>/dev/null || true) + [ "${CURRENT}" != "${ENV_VALUE}" ] && ALL_OK=false + done <<< "${ALL_ENV_LINES}" + [ "${ALL_OK}" = "true" ] && break + sleep 5 + done + if [ "${ALL_OK}" != "true" ]; then + echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 + oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true + oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true + oc get deployment -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/deployments.yaml" || true + exit 1 + fi + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + if [ -n "${MANAGER_IMAGE_VALUE}" ]; then + echo "Depends-On resolved an oadp-operator PR -- patching the manager Deployment's own container image directly (not a RELATED_IMAGE_* env var, since oadp-operator itself isn't a related-image in this job's context)" + oc set image "deployment/openshift-adp-controller-manager" "manager=${MANAGER_IMAGE_VALUE}" -n "${OO_INSTALL_NAMESPACE}" + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + fi + dependencies: + - env: LEGACY_AWS_PLUGIN_IMAGE + name: velero-plugin-for-legacy-aws-oadp-1.4 + env: + - name: OO_INSTALL_NAMESPACE + from: cli + resources: + requests: + cpu: 100m + memory: 100Mi + - as: e2e + cli: latest + commands: make test-e2e + credentials: + - mount_path: /var/run/oadp-credentials + name: oadp-credentials + namespace: test-credentials + from: test-oadp-operator + resources: + requests: + cpu: 1000m + memory: 512Mi zz_generated_metadata: branch: oadp-1.4 org: openshift diff --git a/ci-operator/config/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.5.yaml b/ci-operator/config/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.5.yaml index cb1ccedfe2aab..6e8edb37ae4d7 100644 --- a/ci-operator/config/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.5.yaml +++ b/ci-operator/config/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.5.yaml @@ -1,3 +1,12 @@ +base_images: + claude-ai-helpers: + name: claude-ai-helpers + namespace: ci + tag: latest + test-oadp-operator: + name: oadp-operator-e2e-tests + namespace: konveyor + tag: oadp-1.5 build_root: image_stream_tag: name: builder @@ -13,6 +22,12 @@ promotion: to: - name: velero-plugin-for-legacy-aws namespace: konveyor +releases: + latest: + candidate: + product: ocp + stream: nightly + version: "4.19" resources: '*': limits: @@ -32,6 +47,129 @@ tests: requests: cpu: 100m memory: 200Mi +- always_run: false + as: e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + steps: + cluster_profile: openshift-org-aws + env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero RELATED_IMAGE_VELERO Dockerfile.ubi + openshift/velero-plugin-for-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS Dockerfile.ubi + openshift/openshift-velero-plugin RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN + openshift/oadp-operator MANAGER_IMAGE + OADP_BRANCH: oadp-1.5 + OO_BUNDLE: quay-proxy.ci.openshift.org/openshift/ci:konveyor_oadp-operator-bundle_oadp-1.5 + OO_INSTALL_MODE: OwnNamespace + OO_INSTALL_NAMESPACE: openshift-adp + OO_INSTALL_TIMEOUT_MINUTES: "25" + OO_MIRROR_TO_CLUSTER_REGISTRY: "true" + OO_PSA_ENFORCE_PRIVILEGED: "true" + TEST_NAME: e2e-test-aws + post: + - ref: oadp-analyze-e2e-failure + - chain: ipi-aws-post + pre: + - chain: ipi-aws-pre + - ref: oadp-operator-sdk-bundle-image + test: + - ref: oadp-depends-on-build + - as: set-related-image + cli: latest + commands: | + set -o errexit + set -o nounset + set -o pipefail + SUBS=$(oc get subscription -n "${OO_INSTALL_NAMESPACE}" -o jsonpath='{.items[*].metadata.name}') + if [ -z "${SUBS}" ]; then + echo "No Subscription found in namespace ${OO_INSTALL_NAMESPACE}" >&2 + exit 1 + fi + if [ "$(echo "${SUBS}" | wc -w)" -gt 1 ]; then + echo "Multiple Subscriptions found in ${OO_INSTALL_NAMESPACE}: ${SUBS}" >&2 + exit 1 + fi + SUB="${SUBS}" + echo "Discovered Subscription: ${SUB}" + # See migtools/kubevirt-datamover-controller's set-related-image step + # for the full rationale on Subscription.spec.config.env vs. patching + # the Deployment directly, and on the MANAGER_IMAGE sentinel used for + # a resolved openshift/oadp-operator Depends-On (reconcile-logic-level + # PRs only, not RBAC/CSV/CRD changes -- see openshift/oadp-operator#2389). + ALL_ENV_LINES="RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS ${LEGACY_AWS_PLUGIN_IMAGE}" + if [ -s "${SHARED_DIR}/depends-on-images.txt" ]; then + ALL_ENV_LINES="${ALL_ENV_LINES} + $(cat "${SHARED_DIR}/depends-on-images.txt")" + fi + MANAGER_IMAGE_VALUE="" + SUBSCRIPTION_ENV_LINES="" + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + if [ "${ENV_NAME}" = "MANAGER_IMAGE" ]; then + MANAGER_IMAGE_VALUE="${ENV_VALUE}" + else + SUBSCRIPTION_ENV_LINES="${SUBSCRIPTION_ENV_LINES} + ${ENV_NAME} ${ENV_VALUE}" + fi + done <<< "${ALL_ENV_LINES}" + ALL_ENV_LINES="${SUBSCRIPTION_ENV_LINES}" + ENTRIES=() + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + ENTRIES+=("{\"name\":\"${ENV_NAME}\",\"value\":\"${ENV_VALUE}\"}") + done <<< "${ALL_ENV_LINES}" + JOINED=$(IFS=,; echo "${ENTRIES[*]}") + PATCH=$(printf '{"spec":{"config":{"env":[%s]}}}' "${JOINED}") + oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "${PATCH}" + echo "Waiting for Deployment to observe:" + while read -r ENV_NAME _; do + [ -n "${ENV_NAME}" ] && echo " ${ENV_NAME}" + done <<< "${ALL_ENV_LINES}" + for _ in $(seq 1 60); do + ALL_OK=true + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"${ENV_NAME}\")].value}" 2>/dev/null || true) + [ "${CURRENT}" != "${ENV_VALUE}" ] && ALL_OK=false + done <<< "${ALL_ENV_LINES}" + [ "${ALL_OK}" = "true" ] && break + sleep 5 + done + if [ "${ALL_OK}" != "true" ]; then + echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 + oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true + oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true + oc get deployment -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/deployments.yaml" || true + exit 1 + fi + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + if [ -n "${MANAGER_IMAGE_VALUE}" ]; then + echo "Depends-On resolved an oadp-operator PR -- patching the manager Deployment's own container image directly (not a RELATED_IMAGE_* env var, since oadp-operator itself isn't a related-image in this job's context)" + oc set image "deployment/openshift-adp-controller-manager" "manager=${MANAGER_IMAGE_VALUE}" -n "${OO_INSTALL_NAMESPACE}" + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + fi + dependencies: + - env: LEGACY_AWS_PLUGIN_IMAGE + name: velero-plugin-for-legacy-aws-oadp-1.5 + env: + - name: OO_INSTALL_NAMESPACE + from: cli + resources: + requests: + cpu: 100m + memory: 100Mi + - as: e2e + cli: latest + commands: make test-e2e + credentials: + - mount_path: /var/run/oadp-credentials + name: oadp-credentials + namespace: test-credentials + from: test-oadp-operator + resources: + requests: + cpu: 1000m + memory: 512Mi zz_generated_metadata: branch: oadp-1.5 org: openshift diff --git a/ci-operator/config/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.6.yaml b/ci-operator/config/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.6.yaml index 70ac9946389f4..396bc0877ca2e 100644 --- a/ci-operator/config/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.6.yaml +++ b/ci-operator/config/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.6.yaml @@ -1,3 +1,12 @@ +base_images: + claude-ai-helpers: + name: claude-ai-helpers + namespace: ci + tag: latest + test-oadp-operator: + name: oadp-operator-e2e-tests + namespace: konveyor + tag: oadp-1.6 build_root: image_stream_tag: name: builder @@ -13,6 +22,12 @@ promotion: to: - name: velero-plugin-for-legacy-aws namespace: konveyor +releases: + latest: + candidate: + product: ocp + stream: nightly + version: "5.0" resources: '*': limits: @@ -32,6 +47,129 @@ tests: requests: cpu: 100m memory: 200Mi +- always_run: false + as: e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + steps: + cluster_profile: openshift-org-aws + env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero RELATED_IMAGE_VELERO Dockerfile.ubi + openshift/velero-plugin-for-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS Dockerfile.ubi + openshift/openshift-velero-plugin RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN + openshift/oadp-operator MANAGER_IMAGE + OADP_BRANCH: oadp-1.6 + OO_BUNDLE: quay-proxy.ci.openshift.org/openshift/ci:konveyor_oadp-operator-bundle_oadp-1.6 + OO_INSTALL_MODE: OwnNamespace + OO_INSTALL_NAMESPACE: openshift-adp + OO_INSTALL_TIMEOUT_MINUTES: "25" + OO_MIRROR_TO_CLUSTER_REGISTRY: "true" + OO_PSA_ENFORCE_PRIVILEGED: "true" + TEST_NAME: e2e-test-aws + post: + - ref: oadp-analyze-e2e-failure + - chain: ipi-aws-post + pre: + - chain: ipi-aws-pre + - ref: oadp-operator-sdk-bundle-image + test: + - ref: oadp-depends-on-build + - as: set-related-image + cli: latest + commands: | + set -o errexit + set -o nounset + set -o pipefail + SUBS=$(oc get subscription -n "${OO_INSTALL_NAMESPACE}" -o jsonpath='{.items[*].metadata.name}') + if [ -z "${SUBS}" ]; then + echo "No Subscription found in namespace ${OO_INSTALL_NAMESPACE}" >&2 + exit 1 + fi + if [ "$(echo "${SUBS}" | wc -w)" -gt 1 ]; then + echo "Multiple Subscriptions found in ${OO_INSTALL_NAMESPACE}: ${SUBS}" >&2 + exit 1 + fi + SUB="${SUBS}" + echo "Discovered Subscription: ${SUB}" + # See migtools/kubevirt-datamover-controller's set-related-image step + # for the full rationale on Subscription.spec.config.env vs. patching + # the Deployment directly, and on the MANAGER_IMAGE sentinel used for + # a resolved openshift/oadp-operator Depends-On (reconcile-logic-level + # PRs only, not RBAC/CSV/CRD changes -- see openshift/oadp-operator#2389). + ALL_ENV_LINES="RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS ${LEGACY_AWS_PLUGIN_IMAGE}" + if [ -s "${SHARED_DIR}/depends-on-images.txt" ]; then + ALL_ENV_LINES="${ALL_ENV_LINES} + $(cat "${SHARED_DIR}/depends-on-images.txt")" + fi + MANAGER_IMAGE_VALUE="" + SUBSCRIPTION_ENV_LINES="" + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + if [ "${ENV_NAME}" = "MANAGER_IMAGE" ]; then + MANAGER_IMAGE_VALUE="${ENV_VALUE}" + else + SUBSCRIPTION_ENV_LINES="${SUBSCRIPTION_ENV_LINES} + ${ENV_NAME} ${ENV_VALUE}" + fi + done <<< "${ALL_ENV_LINES}" + ALL_ENV_LINES="${SUBSCRIPTION_ENV_LINES}" + ENTRIES=() + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + ENTRIES+=("{\"name\":\"${ENV_NAME}\",\"value\":\"${ENV_VALUE}\"}") + done <<< "${ALL_ENV_LINES}" + JOINED=$(IFS=,; echo "${ENTRIES[*]}") + PATCH=$(printf '{"spec":{"config":{"env":[%s]}}}' "${JOINED}") + oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "${PATCH}" + echo "Waiting for Deployment to observe:" + while read -r ENV_NAME _; do + [ -n "${ENV_NAME}" ] && echo " ${ENV_NAME}" + done <<< "${ALL_ENV_LINES}" + for _ in $(seq 1 60); do + ALL_OK=true + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"${ENV_NAME}\")].value}" 2>/dev/null || true) + [ "${CURRENT}" != "${ENV_VALUE}" ] && ALL_OK=false + done <<< "${ALL_ENV_LINES}" + [ "${ALL_OK}" = "true" ] && break + sleep 5 + done + if [ "${ALL_OK}" != "true" ]; then + echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 + oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true + oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true + oc get deployment -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/deployments.yaml" || true + exit 1 + fi + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + if [ -n "${MANAGER_IMAGE_VALUE}" ]; then + echo "Depends-On resolved an oadp-operator PR -- patching the manager Deployment's own container image directly (not a RELATED_IMAGE_* env var, since oadp-operator itself isn't a related-image in this job's context)" + oc set image "deployment/openshift-adp-controller-manager" "manager=${MANAGER_IMAGE_VALUE}" -n "${OO_INSTALL_NAMESPACE}" + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + fi + dependencies: + - env: LEGACY_AWS_PLUGIN_IMAGE + name: velero-plugin-for-legacy-aws-oadp-1.6 + env: + - name: OO_INSTALL_NAMESPACE + from: cli + resources: + requests: + cpu: 100m + memory: 100Mi + - as: e2e + cli: latest + commands: make test-e2e + credentials: + - mount_path: /var/run/oadp-credentials + name: oadp-credentials + namespace: test-credentials + from: test-oadp-operator + resources: + requests: + cpu: 1000m + memory: 512Mi zz_generated_metadata: branch: oadp-1.6 org: openshift diff --git a/ci-operator/config/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-dev.yaml b/ci-operator/config/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-dev.yaml index 004ac7d14406c..cddcb3d7014ee 100644 --- a/ci-operator/config/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-dev.yaml +++ b/ci-operator/config/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-dev.yaml @@ -1,3 +1,12 @@ +base_images: + claude-ai-helpers: + name: claude-ai-helpers + namespace: ci + tag: latest + test-oadp-operator: + name: oadp-operator-e2e-tests + namespace: konveyor + tag: oadp-dev build_root: image_stream_tag: name: builder @@ -13,6 +22,12 @@ promotion: to: - name: velero-plugin-for-legacy-aws namespace: konveyor +releases: + latest: + candidate: + product: ocp + stream: nightly + version: "5.0" resources: '*': limits: @@ -32,6 +47,129 @@ tests: requests: cpu: 100m memory: 200Mi +- always_run: false + as: e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + steps: + cluster_profile: openshift-org-aws + env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero RELATED_IMAGE_VELERO Dockerfile.ubi + openshift/velero-plugin-for-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS Dockerfile.ubi + openshift/openshift-velero-plugin RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN + openshift/oadp-operator MANAGER_IMAGE + OADP_BRANCH: oadp-dev + OO_BUNDLE: quay-proxy.ci.openshift.org/openshift/ci:konveyor_oadp-operator-bundle_oadp-dev + OO_INSTALL_MODE: OwnNamespace + OO_INSTALL_NAMESPACE: openshift-adp + OO_INSTALL_TIMEOUT_MINUTES: "25" + OO_MIRROR_TO_CLUSTER_REGISTRY: "true" + OO_PSA_ENFORCE_PRIVILEGED: "true" + TEST_NAME: e2e-test-aws + post: + - ref: oadp-analyze-e2e-failure + - chain: ipi-aws-post + pre: + - chain: ipi-aws-pre + - ref: oadp-operator-sdk-bundle-image + test: + - ref: oadp-depends-on-build + - as: set-related-image + cli: latest + commands: | + set -o errexit + set -o nounset + set -o pipefail + SUBS=$(oc get subscription -n "${OO_INSTALL_NAMESPACE}" -o jsonpath='{.items[*].metadata.name}') + if [ -z "${SUBS}" ]; then + echo "No Subscription found in namespace ${OO_INSTALL_NAMESPACE}" >&2 + exit 1 + fi + if [ "$(echo "${SUBS}" | wc -w)" -gt 1 ]; then + echo "Multiple Subscriptions found in ${OO_INSTALL_NAMESPACE}: ${SUBS}" >&2 + exit 1 + fi + SUB="${SUBS}" + echo "Discovered Subscription: ${SUB}" + # See migtools/kubevirt-datamover-controller's set-related-image step + # for the full rationale on Subscription.spec.config.env vs. patching + # the Deployment directly, and on the MANAGER_IMAGE sentinel used for + # a resolved openshift/oadp-operator Depends-On (reconcile-logic-level + # PRs only, not RBAC/CSV/CRD changes -- see openshift/oadp-operator#2389). + ALL_ENV_LINES="RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS ${LEGACY_AWS_PLUGIN_IMAGE}" + if [ -s "${SHARED_DIR}/depends-on-images.txt" ]; then + ALL_ENV_LINES="${ALL_ENV_LINES} + $(cat "${SHARED_DIR}/depends-on-images.txt")" + fi + MANAGER_IMAGE_VALUE="" + SUBSCRIPTION_ENV_LINES="" + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + if [ "${ENV_NAME}" = "MANAGER_IMAGE" ]; then + MANAGER_IMAGE_VALUE="${ENV_VALUE}" + else + SUBSCRIPTION_ENV_LINES="${SUBSCRIPTION_ENV_LINES} + ${ENV_NAME} ${ENV_VALUE}" + fi + done <<< "${ALL_ENV_LINES}" + ALL_ENV_LINES="${SUBSCRIPTION_ENV_LINES}" + ENTRIES=() + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + ENTRIES+=("{\"name\":\"${ENV_NAME}\",\"value\":\"${ENV_VALUE}\"}") + done <<< "${ALL_ENV_LINES}" + JOINED=$(IFS=,; echo "${ENTRIES[*]}") + PATCH=$(printf '{"spec":{"config":{"env":[%s]}}}' "${JOINED}") + oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "${PATCH}" + echo "Waiting for Deployment to observe:" + while read -r ENV_NAME _; do + [ -n "${ENV_NAME}" ] && echo " ${ENV_NAME}" + done <<< "${ALL_ENV_LINES}" + for _ in $(seq 1 60); do + ALL_OK=true + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"${ENV_NAME}\")].value}" 2>/dev/null || true) + [ "${CURRENT}" != "${ENV_VALUE}" ] && ALL_OK=false + done <<< "${ALL_ENV_LINES}" + [ "${ALL_OK}" = "true" ] && break + sleep 5 + done + if [ "${ALL_OK}" != "true" ]; then + echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 + oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true + oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true + oc get deployment -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/deployments.yaml" || true + exit 1 + fi + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + if [ -n "${MANAGER_IMAGE_VALUE}" ]; then + echo "Depends-On resolved an oadp-operator PR -- patching the manager Deployment's own container image directly (not a RELATED_IMAGE_* env var, since oadp-operator itself isn't a related-image in this job's context)" + oc set image "deployment/openshift-adp-controller-manager" "manager=${MANAGER_IMAGE_VALUE}" -n "${OO_INSTALL_NAMESPACE}" + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + fi + dependencies: + - env: LEGACY_AWS_PLUGIN_IMAGE + name: velero-plugin-for-legacy-aws + env: + - name: OO_INSTALL_NAMESPACE + from: cli + resources: + requests: + cpu: 100m + memory: 100Mi + - as: e2e + cli: latest + commands: make test-e2e + credentials: + - mount_path: /var/run/oadp-credentials + name: oadp-credentials + namespace: test-credentials + from: test-oadp-operator + resources: + requests: + cpu: 1000m + memory: 512Mi zz_generated_metadata: branch: oadp-dev org: openshift diff --git a/ci-operator/config/openshift/velero/openshift-velero-oadp-1.4.yaml b/ci-operator/config/openshift/velero/openshift-velero-oadp-1.4.yaml index 95893a8442c1c..458f66b612ae5 100644 --- a/ci-operator/config/openshift/velero/openshift-velero-oadp-1.4.yaml +++ b/ci-operator/config/openshift/velero/openshift-velero-oadp-1.4.yaml @@ -1,3 +1,12 @@ +base_images: + claude-ai-helpers: + name: claude-ai-helpers + namespace: ci + tag: latest + test-oadp-operator: + name: oadp-operator-e2e-tests + namespace: konveyor + tag: oadp-1.4 build_root: image_stream_tag: name: builder @@ -20,6 +29,12 @@ promotion: velero-restore-helper-oadp-1.4: velero-restore-helper-oadp-1.4 name: velero namespace: konveyor +releases: + latest: + candidate: + product: ocp + stream: nightly + version: "4.18" resources: '*': limits: @@ -27,6 +42,130 @@ resources: requests: cpu: 100m memory: 200Mi +tests: +- always_run: false + as: e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + steps: + cluster_profile: openshift-org-aws + env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero-plugin-for-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS Dockerfile.ubi + openshift/velero-plugin-for-legacy-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS Dockerfile.ubi + openshift/openshift-velero-plugin RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN + openshift/oadp-operator MANAGER_IMAGE + OADP_BRANCH: oadp-1.4 + OO_BUNDLE: quay-proxy.ci.openshift.org/openshift/ci:konveyor_oadp-operator-bundle_oadp-1.4 + OO_INSTALL_MODE: OwnNamespace + OO_INSTALL_NAMESPACE: openshift-adp + OO_INSTALL_TIMEOUT_MINUTES: "25" + OO_MIRROR_TO_CLUSTER_REGISTRY: "true" + OO_PSA_ENFORCE_PRIVILEGED: "true" + TEST_NAME: e2e-test-aws + post: + - ref: oadp-analyze-e2e-failure + - chain: ipi-aws-post + pre: + - chain: ipi-aws-pre + - ref: oadp-operator-sdk-bundle-image + test: + - ref: oadp-depends-on-build + - as: set-related-image + cli: latest + commands: | + set -o errexit + set -o nounset + set -o pipefail + SUBS=$(oc get subscription -n "${OO_INSTALL_NAMESPACE}" -o jsonpath='{.items[*].metadata.name}') + if [ -z "${SUBS}" ]; then + echo "No Subscription found in namespace ${OO_INSTALL_NAMESPACE}" >&2 + exit 1 + fi + if [ "$(echo "${SUBS}" | wc -w)" -gt 1 ]; then + echo "Multiple Subscriptions found in ${OO_INSTALL_NAMESPACE}: ${SUBS}" >&2 + exit 1 + fi + SUB="${SUBS}" + echo "Discovered Subscription: ${SUB}" + # See migtools/kubevirt-datamover-controller's set-related-image step + # for the full rationale on Subscription.spec.config.env vs. patching + # the Deployment directly, and on the MANAGER_IMAGE sentinel used for + # a resolved openshift/oadp-operator Depends-On (reconcile-logic-level + # PRs only, not RBAC/CSV/CRD changes -- see openshift/oadp-operator#2389). + ALL_ENV_LINES="RELATED_IMAGE_VELERO ${VELERO_IMAGE}" + if [ -s "${SHARED_DIR}/depends-on-images.txt" ]; then + ALL_ENV_LINES="${ALL_ENV_LINES} + $(cat "${SHARED_DIR}/depends-on-images.txt")" + fi + MANAGER_IMAGE_VALUE="" + SUBSCRIPTION_ENV_LINES="" + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + if [ "${ENV_NAME}" = "MANAGER_IMAGE" ]; then + MANAGER_IMAGE_VALUE="${ENV_VALUE}" + else + SUBSCRIPTION_ENV_LINES="${SUBSCRIPTION_ENV_LINES} + ${ENV_NAME} ${ENV_VALUE}" + fi + done <<< "${ALL_ENV_LINES}" + ALL_ENV_LINES="${SUBSCRIPTION_ENV_LINES}" + ENTRIES=() + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + ENTRIES+=("{\"name\":\"${ENV_NAME}\",\"value\":\"${ENV_VALUE}\"}") + done <<< "${ALL_ENV_LINES}" + JOINED=$(IFS=,; echo "${ENTRIES[*]}") + PATCH=$(printf '{"spec":{"config":{"env":[%s]}}}' "${JOINED}") + oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "${PATCH}" + echo "Waiting for Deployment to observe:" + while read -r ENV_NAME _; do + [ -n "${ENV_NAME}" ] && echo " ${ENV_NAME}" + done <<< "${ALL_ENV_LINES}" + for _ in $(seq 1 60); do + ALL_OK=true + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"${ENV_NAME}\")].value}" 2>/dev/null || true) + [ "${CURRENT}" != "${ENV_VALUE}" ] && ALL_OK=false + done <<< "${ALL_ENV_LINES}" + [ "${ALL_OK}" = "true" ] && break + sleep 5 + done + if [ "${ALL_OK}" != "true" ]; then + echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 + oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true + oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true + oc get deployment -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/deployments.yaml" || true + exit 1 + fi + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + if [ -n "${MANAGER_IMAGE_VALUE}" ]; then + echo "Depends-On resolved an oadp-operator PR -- patching the manager Deployment's own container image directly (not a RELATED_IMAGE_* env var, since oadp-operator itself isn't a related-image in this job's context)" + oc set image "deployment/openshift-adp-controller-manager" "manager=${MANAGER_IMAGE_VALUE}" -n "${OO_INSTALL_NAMESPACE}" + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + fi + dependencies: + - env: VELERO_IMAGE + name: velero-oadp-1.4 + env: + - name: OO_INSTALL_NAMESPACE + from: cli + resources: + requests: + cpu: 100m + memory: 100Mi + - as: e2e + cli: latest + commands: make test-e2e + credentials: + - mount_path: /var/run/oadp-credentials + name: oadp-credentials + namespace: test-credentials + from: test-oadp-operator + resources: + requests: + cpu: 1000m + memory: 512Mi zz_generated_metadata: branch: oadp-1.4 org: openshift diff --git a/ci-operator/config/openshift/velero/openshift-velero-oadp-1.5.yaml b/ci-operator/config/openshift/velero/openshift-velero-oadp-1.5.yaml index 7bc19293c4946..ef9d2b1459f78 100644 --- a/ci-operator/config/openshift/velero/openshift-velero-oadp-1.5.yaml +++ b/ci-operator/config/openshift/velero/openshift-velero-oadp-1.5.yaml @@ -1,3 +1,12 @@ +base_images: + claude-ai-helpers: + name: claude-ai-helpers + namespace: ci + tag: latest + test-oadp-operator: + name: oadp-operator-e2e-tests + namespace: konveyor + tag: oadp-1.5 build_root: image_stream_tag: name: builder @@ -15,6 +24,12 @@ promotion: velero-oadp-1.5: velero-oadp-1.5 name: velero namespace: konveyor +releases: + latest: + candidate: + product: ocp + stream: nightly + version: "4.19" resources: '*': limits: @@ -22,6 +37,130 @@ resources: requests: cpu: 100m memory: 200Mi +tests: +- always_run: false + as: e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + steps: + cluster_profile: openshift-org-aws + env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero-plugin-for-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS Dockerfile.ubi + openshift/velero-plugin-for-legacy-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS Dockerfile.ubi + openshift/openshift-velero-plugin RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN + openshift/oadp-operator MANAGER_IMAGE + OADP_BRANCH: oadp-1.5 + OO_BUNDLE: quay-proxy.ci.openshift.org/openshift/ci:konveyor_oadp-operator-bundle_oadp-1.5 + OO_INSTALL_MODE: OwnNamespace + OO_INSTALL_NAMESPACE: openshift-adp + OO_INSTALL_TIMEOUT_MINUTES: "25" + OO_MIRROR_TO_CLUSTER_REGISTRY: "true" + OO_PSA_ENFORCE_PRIVILEGED: "true" + TEST_NAME: e2e-test-aws + post: + - ref: oadp-analyze-e2e-failure + - chain: ipi-aws-post + pre: + - chain: ipi-aws-pre + - ref: oadp-operator-sdk-bundle-image + test: + - ref: oadp-depends-on-build + - as: set-related-image + cli: latest + commands: | + set -o errexit + set -o nounset + set -o pipefail + SUBS=$(oc get subscription -n "${OO_INSTALL_NAMESPACE}" -o jsonpath='{.items[*].metadata.name}') + if [ -z "${SUBS}" ]; then + echo "No Subscription found in namespace ${OO_INSTALL_NAMESPACE}" >&2 + exit 1 + fi + if [ "$(echo "${SUBS}" | wc -w)" -gt 1 ]; then + echo "Multiple Subscriptions found in ${OO_INSTALL_NAMESPACE}: ${SUBS}" >&2 + exit 1 + fi + SUB="${SUBS}" + echo "Discovered Subscription: ${SUB}" + # See migtools/kubevirt-datamover-controller's set-related-image step + # for the full rationale on Subscription.spec.config.env vs. patching + # the Deployment directly, and on the MANAGER_IMAGE sentinel used for + # a resolved openshift/oadp-operator Depends-On (reconcile-logic-level + # PRs only, not RBAC/CSV/CRD changes -- see openshift/oadp-operator#2389). + ALL_ENV_LINES="RELATED_IMAGE_VELERO ${VELERO_IMAGE}" + if [ -s "${SHARED_DIR}/depends-on-images.txt" ]; then + ALL_ENV_LINES="${ALL_ENV_LINES} + $(cat "${SHARED_DIR}/depends-on-images.txt")" + fi + MANAGER_IMAGE_VALUE="" + SUBSCRIPTION_ENV_LINES="" + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + if [ "${ENV_NAME}" = "MANAGER_IMAGE" ]; then + MANAGER_IMAGE_VALUE="${ENV_VALUE}" + else + SUBSCRIPTION_ENV_LINES="${SUBSCRIPTION_ENV_LINES} + ${ENV_NAME} ${ENV_VALUE}" + fi + done <<< "${ALL_ENV_LINES}" + ALL_ENV_LINES="${SUBSCRIPTION_ENV_LINES}" + ENTRIES=() + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + ENTRIES+=("{\"name\":\"${ENV_NAME}\",\"value\":\"${ENV_VALUE}\"}") + done <<< "${ALL_ENV_LINES}" + JOINED=$(IFS=,; echo "${ENTRIES[*]}") + PATCH=$(printf '{"spec":{"config":{"env":[%s]}}}' "${JOINED}") + oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "${PATCH}" + echo "Waiting for Deployment to observe:" + while read -r ENV_NAME _; do + [ -n "${ENV_NAME}" ] && echo " ${ENV_NAME}" + done <<< "${ALL_ENV_LINES}" + for _ in $(seq 1 60); do + ALL_OK=true + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"${ENV_NAME}\")].value}" 2>/dev/null || true) + [ "${CURRENT}" != "${ENV_VALUE}" ] && ALL_OK=false + done <<< "${ALL_ENV_LINES}" + [ "${ALL_OK}" = "true" ] && break + sleep 5 + done + if [ "${ALL_OK}" != "true" ]; then + echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 + oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true + oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true + oc get deployment -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/deployments.yaml" || true + exit 1 + fi + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + if [ -n "${MANAGER_IMAGE_VALUE}" ]; then + echo "Depends-On resolved an oadp-operator PR -- patching the manager Deployment's own container image directly (not a RELATED_IMAGE_* env var, since oadp-operator itself isn't a related-image in this job's context)" + oc set image "deployment/openshift-adp-controller-manager" "manager=${MANAGER_IMAGE_VALUE}" -n "${OO_INSTALL_NAMESPACE}" + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + fi + dependencies: + - env: VELERO_IMAGE + name: velero-oadp-1.5 + env: + - name: OO_INSTALL_NAMESPACE + from: cli + resources: + requests: + cpu: 100m + memory: 100Mi + - as: e2e + cli: latest + commands: make test-e2e + credentials: + - mount_path: /var/run/oadp-credentials + name: oadp-credentials + namespace: test-credentials + from: test-oadp-operator + resources: + requests: + cpu: 1000m + memory: 512Mi zz_generated_metadata: branch: oadp-1.5 org: openshift diff --git a/ci-operator/config/openshift/velero/openshift-velero-oadp-1.6.yaml b/ci-operator/config/openshift/velero/openshift-velero-oadp-1.6.yaml index 94b5a4e13c661..c4e3127cfeaea 100644 --- a/ci-operator/config/openshift/velero/openshift-velero-oadp-1.6.yaml +++ b/ci-operator/config/openshift/velero/openshift-velero-oadp-1.6.yaml @@ -1,3 +1,12 @@ +base_images: + claude-ai-helpers: + name: claude-ai-helpers + namespace: ci + tag: latest + test-oadp-operator: + name: oadp-operator-e2e-tests + namespace: konveyor + tag: oadp-1.6 build_root: image_stream_tag: name: builder @@ -15,6 +24,12 @@ promotion: velero-oadp-1.6: velero-oadp-1.6 name: velero namespace: konveyor +releases: + latest: + candidate: + product: ocp + stream: nightly + version: "5.0" resources: '*': limits: @@ -22,6 +37,130 @@ resources: requests: cpu: 100m memory: 200Mi +tests: +- always_run: false + as: e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + steps: + cluster_profile: openshift-org-aws + env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero-plugin-for-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS Dockerfile.ubi + openshift/velero-plugin-for-legacy-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS Dockerfile.ubi + openshift/openshift-velero-plugin RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN + openshift/oadp-operator MANAGER_IMAGE + OADP_BRANCH: oadp-1.6 + OO_BUNDLE: quay-proxy.ci.openshift.org/openshift/ci:konveyor_oadp-operator-bundle_oadp-1.6 + OO_INSTALL_MODE: OwnNamespace + OO_INSTALL_NAMESPACE: openshift-adp + OO_INSTALL_TIMEOUT_MINUTES: "25" + OO_MIRROR_TO_CLUSTER_REGISTRY: "true" + OO_PSA_ENFORCE_PRIVILEGED: "true" + TEST_NAME: e2e-test-aws + post: + - ref: oadp-analyze-e2e-failure + - chain: ipi-aws-post + pre: + - chain: ipi-aws-pre + - ref: oadp-operator-sdk-bundle-image + test: + - ref: oadp-depends-on-build + - as: set-related-image + cli: latest + commands: | + set -o errexit + set -o nounset + set -o pipefail + SUBS=$(oc get subscription -n "${OO_INSTALL_NAMESPACE}" -o jsonpath='{.items[*].metadata.name}') + if [ -z "${SUBS}" ]; then + echo "No Subscription found in namespace ${OO_INSTALL_NAMESPACE}" >&2 + exit 1 + fi + if [ "$(echo "${SUBS}" | wc -w)" -gt 1 ]; then + echo "Multiple Subscriptions found in ${OO_INSTALL_NAMESPACE}: ${SUBS}" >&2 + exit 1 + fi + SUB="${SUBS}" + echo "Discovered Subscription: ${SUB}" + # See migtools/kubevirt-datamover-controller's set-related-image step + # for the full rationale on Subscription.spec.config.env vs. patching + # the Deployment directly, and on the MANAGER_IMAGE sentinel used for + # a resolved openshift/oadp-operator Depends-On (reconcile-logic-level + # PRs only, not RBAC/CSV/CRD changes -- see openshift/oadp-operator#2389). + ALL_ENV_LINES="RELATED_IMAGE_VELERO ${VELERO_IMAGE}" + if [ -s "${SHARED_DIR}/depends-on-images.txt" ]; then + ALL_ENV_LINES="${ALL_ENV_LINES} + $(cat "${SHARED_DIR}/depends-on-images.txt")" + fi + MANAGER_IMAGE_VALUE="" + SUBSCRIPTION_ENV_LINES="" + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + if [ "${ENV_NAME}" = "MANAGER_IMAGE" ]; then + MANAGER_IMAGE_VALUE="${ENV_VALUE}" + else + SUBSCRIPTION_ENV_LINES="${SUBSCRIPTION_ENV_LINES} + ${ENV_NAME} ${ENV_VALUE}" + fi + done <<< "${ALL_ENV_LINES}" + ALL_ENV_LINES="${SUBSCRIPTION_ENV_LINES}" + ENTRIES=() + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + ENTRIES+=("{\"name\":\"${ENV_NAME}\",\"value\":\"${ENV_VALUE}\"}") + done <<< "${ALL_ENV_LINES}" + JOINED=$(IFS=,; echo "${ENTRIES[*]}") + PATCH=$(printf '{"spec":{"config":{"env":[%s]}}}' "${JOINED}") + oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "${PATCH}" + echo "Waiting for Deployment to observe:" + while read -r ENV_NAME _; do + [ -n "${ENV_NAME}" ] && echo " ${ENV_NAME}" + done <<< "${ALL_ENV_LINES}" + for _ in $(seq 1 60); do + ALL_OK=true + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"${ENV_NAME}\")].value}" 2>/dev/null || true) + [ "${CURRENT}" != "${ENV_VALUE}" ] && ALL_OK=false + done <<< "${ALL_ENV_LINES}" + [ "${ALL_OK}" = "true" ] && break + sleep 5 + done + if [ "${ALL_OK}" != "true" ]; then + echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 + oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true + oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true + oc get deployment -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/deployments.yaml" || true + exit 1 + fi + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + if [ -n "${MANAGER_IMAGE_VALUE}" ]; then + echo "Depends-On resolved an oadp-operator PR -- patching the manager Deployment's own container image directly (not a RELATED_IMAGE_* env var, since oadp-operator itself isn't a related-image in this job's context)" + oc set image "deployment/openshift-adp-controller-manager" "manager=${MANAGER_IMAGE_VALUE}" -n "${OO_INSTALL_NAMESPACE}" + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + fi + dependencies: + - env: VELERO_IMAGE + name: velero-oadp-1.6 + env: + - name: OO_INSTALL_NAMESPACE + from: cli + resources: + requests: + cpu: 100m + memory: 100Mi + - as: e2e + cli: latest + commands: make test-e2e + credentials: + - mount_path: /var/run/oadp-credentials + name: oadp-credentials + namespace: test-credentials + from: test-oadp-operator + resources: + requests: + cpu: 1000m + memory: 512Mi zz_generated_metadata: branch: oadp-1.6 org: openshift diff --git a/ci-operator/config/openshift/velero/openshift-velero-oadp-dev.yaml b/ci-operator/config/openshift/velero/openshift-velero-oadp-dev.yaml index c874a14b4e6ba..1a33565b2808b 100644 --- a/ci-operator/config/openshift/velero/openshift-velero-oadp-dev.yaml +++ b/ci-operator/config/openshift/velero/openshift-velero-oadp-dev.yaml @@ -1,3 +1,12 @@ +base_images: + claude-ai-helpers: + name: claude-ai-helpers + namespace: ci + tag: latest + test-oadp-operator: + name: oadp-operator-e2e-tests + namespace: konveyor + tag: oadp-dev build_root: image_stream_tag: name: builder @@ -15,6 +24,12 @@ promotion: velero: velero name: velero namespace: konveyor +releases: + latest: + candidate: + product: ocp + stream: nightly + version: "5.0" resources: '*': limits: @@ -22,6 +37,130 @@ resources: requests: cpu: 100m memory: 200Mi +tests: +- always_run: false + as: e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + steps: + cluster_profile: openshift-org-aws + env: + DEPENDS_ON_CANDIDATES: |- + openshift/velero-plugin-for-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_AWS Dockerfile.ubi + openshift/velero-plugin-for-legacy-aws RELATED_IMAGE_VELERO_PLUGIN_FOR_LEGACY_AWS Dockerfile.ubi + openshift/openshift-velero-plugin RELATED_IMAGE_OPENSHIFT_VELERO_PLUGIN + openshift/oadp-operator MANAGER_IMAGE + OADP_BRANCH: oadp-dev + OO_BUNDLE: quay-proxy.ci.openshift.org/openshift/ci:konveyor_oadp-operator-bundle_oadp-dev + OO_INSTALL_MODE: OwnNamespace + OO_INSTALL_NAMESPACE: openshift-adp + OO_INSTALL_TIMEOUT_MINUTES: "25" + OO_MIRROR_TO_CLUSTER_REGISTRY: "true" + OO_PSA_ENFORCE_PRIVILEGED: "true" + TEST_NAME: e2e-test-aws + post: + - ref: oadp-analyze-e2e-failure + - chain: ipi-aws-post + pre: + - chain: ipi-aws-pre + - ref: oadp-operator-sdk-bundle-image + test: + - ref: oadp-depends-on-build + - as: set-related-image + cli: latest + commands: | + set -o errexit + set -o nounset + set -o pipefail + SUBS=$(oc get subscription -n "${OO_INSTALL_NAMESPACE}" -o jsonpath='{.items[*].metadata.name}') + if [ -z "${SUBS}" ]; then + echo "No Subscription found in namespace ${OO_INSTALL_NAMESPACE}" >&2 + exit 1 + fi + if [ "$(echo "${SUBS}" | wc -w)" -gt 1 ]; then + echo "Multiple Subscriptions found in ${OO_INSTALL_NAMESPACE}: ${SUBS}" >&2 + exit 1 + fi + SUB="${SUBS}" + echo "Discovered Subscription: ${SUB}" + # See migtools/kubevirt-datamover-controller's set-related-image step + # for the full rationale on Subscription.spec.config.env vs. patching + # the Deployment directly, and on the MANAGER_IMAGE sentinel used for + # a resolved openshift/oadp-operator Depends-On (reconcile-logic-level + # PRs only, not RBAC/CSV/CRD changes -- see openshift/oadp-operator#2389). + ALL_ENV_LINES="RELATED_IMAGE_VELERO ${VELERO_IMAGE}" + if [ -s "${SHARED_DIR}/depends-on-images.txt" ]; then + ALL_ENV_LINES="${ALL_ENV_LINES} + $(cat "${SHARED_DIR}/depends-on-images.txt")" + fi + MANAGER_IMAGE_VALUE="" + SUBSCRIPTION_ENV_LINES="" + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + if [ "${ENV_NAME}" = "MANAGER_IMAGE" ]; then + MANAGER_IMAGE_VALUE="${ENV_VALUE}" + else + SUBSCRIPTION_ENV_LINES="${SUBSCRIPTION_ENV_LINES} + ${ENV_NAME} ${ENV_VALUE}" + fi + done <<< "${ALL_ENV_LINES}" + ALL_ENV_LINES="${SUBSCRIPTION_ENV_LINES}" + ENTRIES=() + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + ENTRIES+=("{\"name\":\"${ENV_NAME}\",\"value\":\"${ENV_VALUE}\"}") + done <<< "${ALL_ENV_LINES}" + JOINED=$(IFS=,; echo "${ENTRIES[*]}") + PATCH=$(printf '{"spec":{"config":{"env":[%s]}}}' "${JOINED}") + oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "${PATCH}" + echo "Waiting for Deployment to observe:" + while read -r ENV_NAME _; do + [ -n "${ENV_NAME}" ] && echo " ${ENV_NAME}" + done <<< "${ALL_ENV_LINES}" + for _ in $(seq 1 60); do + ALL_OK=true + while read -r ENV_NAME ENV_VALUE; do + [ -z "${ENV_NAME}" ] && continue + CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"${ENV_NAME}\")].value}" 2>/dev/null || true) + [ "${CURRENT}" != "${ENV_VALUE}" ] && ALL_OK=false + done <<< "${ALL_ENV_LINES}" + [ "${ALL_OK}" = "true" ] && break + sleep 5 + done + if [ "${ALL_OK}" != "true" ]; then + echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 + oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true + oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true + oc get deployment -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/deployments.yaml" || true + exit 1 + fi + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + if [ -n "${MANAGER_IMAGE_VALUE}" ]; then + echo "Depends-On resolved an oadp-operator PR -- patching the manager Deployment's own container image directly (not a RELATED_IMAGE_* env var, since oadp-operator itself isn't a related-image in this job's context)" + oc set image "deployment/openshift-adp-controller-manager" "manager=${MANAGER_IMAGE_VALUE}" -n "${OO_INSTALL_NAMESPACE}" + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + fi + dependencies: + - env: VELERO_IMAGE + name: velero + env: + - name: OO_INSTALL_NAMESPACE + from: cli + resources: + requests: + cpu: 100m + memory: 100Mi + - as: e2e + cli: latest + commands: make test-e2e + credentials: + - mount_path: /var/run/oadp-credentials + name: oadp-credentials + namespace: test-credentials + from: test-oadp-operator + resources: + requests: + cpu: 1000m + memory: 512Mi zz_generated_metadata: branch: oadp-dev org: openshift diff --git a/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.4-postsubmits.yaml b/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.4-postsubmits.yaml index 38a6f00191f9a..0762e22bac4ab 100644 --- a/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.4-postsubmits.yaml +++ b/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.4-postsubmits.yaml @@ -13,6 +13,7 @@ postsubmits: capability/arm64: arm64 ci-operator.openshift.io/is-promotion: "true" ci.openshift.io/generator: prowgen + job-release: "4.18" max_concurrency: 1 name: branch-ci-openshift-openshift-velero-plugin-oadp-1.4-images spec: diff --git a/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.4-presubmits.yaml b/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.4-presubmits.yaml index c08ff02a706d3..713e216db84f1 100644 --- a/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.4-presubmits.yaml +++ b/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.4-presubmits.yaml @@ -1,5 +1,90 @@ presubmits: openshift/openshift-velero-plugin: + - agent: kubernetes + always_run: false + branches: + - ^oadp-1\.4$ + - ^oadp-1\.4- + cluster: build07 + context: ci/prow/e2e-test-aws + decorate: true + decoration_config: + sparse_checkout_files: + - Dockerfile + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: openshift-org-aws + ci.openshift.io/generator: prowgen + job-release: "4.18" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-openshift-velero-plugin-oadp-1.4-e2e-test-aws + rerun_command: /test e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=e2e-test-aws + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-test-aws,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -14,6 +99,7 @@ presubmits: labels: capability/arm64: arm64 ci.openshift.io/generator: prowgen + job-release: "4.18" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-openshift-velero-plugin-oadp-1.4-images rerun_command: /test images @@ -70,6 +156,7 @@ presubmits: - Dockerfile labels: ci.openshift.io/generator: prowgen + job-release: "4.18" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-openshift-velero-plugin-oadp-1.4-unit-test rerun_command: /test unit-test @@ -80,6 +167,7 @@ presubmits: - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials - --target=unit-test command: - ci-operator @@ -101,6 +189,9 @@ presubmits: - mountPath: /etc/boskos name: boskos readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true - mountPath: /secrets/gcs name: gcs-credentials readOnly: true @@ -121,6 +212,9 @@ presubmits: - key: credentials path: credentials secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials - name: manifest-tool-local-pusher secret: secretName: manifest-tool-local-pusher diff --git a/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.5-postsubmits.yaml b/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.5-postsubmits.yaml index 5b314c87e8e3e..574198e971dad 100644 --- a/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.5-postsubmits.yaml +++ b/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.5-postsubmits.yaml @@ -13,6 +13,7 @@ postsubmits: capability/arm64: arm64 ci-operator.openshift.io/is-promotion: "true" ci.openshift.io/generator: prowgen + job-release: "4.19" max_concurrency: 1 name: branch-ci-openshift-openshift-velero-plugin-oadp-1.5-images spec: diff --git a/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.5-presubmits.yaml b/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.5-presubmits.yaml index b9ca0b5973851..db916a6e738fc 100644 --- a/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.5-presubmits.yaml +++ b/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.5-presubmits.yaml @@ -1,5 +1,90 @@ presubmits: openshift/openshift-velero-plugin: + - agent: kubernetes + always_run: false + branches: + - ^oadp-1\.5$ + - ^oadp-1\.5- + cluster: build07 + context: ci/prow/e2e-test-aws + decorate: true + decoration_config: + sparse_checkout_files: + - Dockerfile + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: openshift-org-aws + ci.openshift.io/generator: prowgen + job-release: "4.19" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-openshift-velero-plugin-oadp-1.5-e2e-test-aws + rerun_command: /test e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=e2e-test-aws + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-test-aws,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -14,6 +99,7 @@ presubmits: labels: capability/arm64: arm64 ci.openshift.io/generator: prowgen + job-release: "4.19" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-openshift-velero-plugin-oadp-1.5-images rerun_command: /test images @@ -70,6 +156,7 @@ presubmits: - Dockerfile labels: ci.openshift.io/generator: prowgen + job-release: "4.19" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-openshift-velero-plugin-oadp-1.5-unit-test rerun_command: /test unit-test @@ -80,6 +167,7 @@ presubmits: - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials - --target=unit-test command: - ci-operator @@ -101,6 +189,9 @@ presubmits: - mountPath: /etc/boskos name: boskos readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true - mountPath: /secrets/gcs name: gcs-credentials readOnly: true @@ -121,6 +212,9 @@ presubmits: - key: credentials path: credentials secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials - name: manifest-tool-local-pusher secret: secretName: manifest-tool-local-pusher diff --git a/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.6-postsubmits.yaml b/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.6-postsubmits.yaml index 1ad54f0131e3d..9dd9d7b4c1e81 100644 --- a/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.6-postsubmits.yaml +++ b/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.6-postsubmits.yaml @@ -13,6 +13,7 @@ postsubmits: capability/arm64: arm64 ci-operator.openshift.io/is-promotion: "true" ci.openshift.io/generator: prowgen + job-release: "5.0" max_concurrency: 1 name: branch-ci-openshift-openshift-velero-plugin-oadp-1.6-images spec: diff --git a/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.6-presubmits.yaml b/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.6-presubmits.yaml index 370ba928715db..389538ac0210b 100644 --- a/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.6-presubmits.yaml +++ b/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-1.6-presubmits.yaml @@ -1,5 +1,90 @@ presubmits: openshift/openshift-velero-plugin: + - agent: kubernetes + always_run: false + branches: + - ^oadp-1\.6$ + - ^oadp-1\.6- + cluster: build07 + context: ci/prow/e2e-test-aws + decorate: true + decoration_config: + sparse_checkout_files: + - Dockerfile + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: openshift-org-aws + ci.openshift.io/generator: prowgen + job-release: "5.0" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-openshift-velero-plugin-oadp-1.6-e2e-test-aws + rerun_command: /test e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=e2e-test-aws + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-test-aws,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -14,6 +99,7 @@ presubmits: labels: capability/arm64: arm64 ci.openshift.io/generator: prowgen + job-release: "5.0" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-openshift-velero-plugin-oadp-1.6-images rerun_command: /test images @@ -70,6 +156,7 @@ presubmits: - Dockerfile labels: ci.openshift.io/generator: prowgen + job-release: "5.0" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-openshift-velero-plugin-oadp-1.6-unit-test rerun_command: /test unit-test @@ -80,6 +167,7 @@ presubmits: - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials - --target=unit-test command: - ci-operator @@ -101,6 +189,9 @@ presubmits: - mountPath: /etc/boskos name: boskos readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true - mountPath: /secrets/gcs name: gcs-credentials readOnly: true @@ -121,6 +212,9 @@ presubmits: - key: credentials path: credentials secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials - name: manifest-tool-local-pusher secret: secretName: manifest-tool-local-pusher diff --git a/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-dev-postsubmits.yaml b/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-dev-postsubmits.yaml index 91039802a7776..d652c1c714eb3 100644 --- a/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-dev-postsubmits.yaml +++ b/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-dev-postsubmits.yaml @@ -13,6 +13,7 @@ postsubmits: capability/arm64: arm64 ci-operator.openshift.io/is-promotion: "true" ci.openshift.io/generator: prowgen + job-release: "5.0" max_concurrency: 1 name: branch-ci-openshift-openshift-velero-plugin-oadp-dev-images spec: diff --git a/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-dev-presubmits.yaml b/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-dev-presubmits.yaml index ef5f35c471c01..5083b98681f52 100644 --- a/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-dev-presubmits.yaml +++ b/ci-operator/jobs/openshift/openshift-velero-plugin/openshift-openshift-velero-plugin-oadp-dev-presubmits.yaml @@ -1,5 +1,90 @@ presubmits: openshift/openshift-velero-plugin: + - agent: kubernetes + always_run: false + branches: + - ^oadp-dev$ + - ^oadp-dev- + cluster: build07 + context: ci/prow/e2e-test-aws + decorate: true + decoration_config: + sparse_checkout_files: + - Dockerfile + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: openshift-org-aws + ci.openshift.io/generator: prowgen + job-release: "5.0" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-openshift-velero-plugin-oadp-dev-e2e-test-aws + rerun_command: /test e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=e2e-test-aws + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-test-aws,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -14,6 +99,7 @@ presubmits: labels: capability/arm64: arm64 ci.openshift.io/generator: prowgen + job-release: "5.0" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-openshift-velero-plugin-oadp-dev-images rerun_command: /test images @@ -70,6 +156,7 @@ presubmits: - Dockerfile labels: ci.openshift.io/generator: prowgen + job-release: "5.0" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-openshift-velero-plugin-oadp-dev-unit-test rerun_command: /test unit-test @@ -80,6 +167,7 @@ presubmits: - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials - --target=unit-test command: - ci-operator @@ -101,6 +189,9 @@ presubmits: - mountPath: /etc/boskos name: boskos readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true - mountPath: /secrets/gcs name: gcs-credentials readOnly: true @@ -121,6 +212,9 @@ presubmits: - key: credentials path: credentials secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials - name: manifest-tool-local-pusher secret: secretName: manifest-tool-local-pusher diff --git a/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.4-postsubmits.yaml b/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.4-postsubmits.yaml index 4213e24361f79..7619595cb6a59 100644 --- a/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.4-postsubmits.yaml +++ b/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.4-postsubmits.yaml @@ -13,6 +13,7 @@ postsubmits: capability/arm64: arm64 ci-operator.openshift.io/is-promotion: "true" ci.openshift.io/generator: prowgen + job-release: "4.18" max_concurrency: 1 name: branch-ci-openshift-velero-plugin-for-aws-oadp-1.4-images spec: diff --git a/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.4-presubmits.yaml b/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.4-presubmits.yaml index 2cca4b26a945a..c62c302ee2f43 100644 --- a/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.4-presubmits.yaml +++ b/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.4-presubmits.yaml @@ -1,5 +1,90 @@ presubmits: openshift/velero-plugin-for-aws: + - agent: kubernetes + always_run: false + branches: + - ^oadp-1\.4$ + - ^oadp-1\.4- + cluster: build05 + context: ci/prow/e2e-test-aws + decorate: true + decoration_config: + sparse_checkout_files: + - Dockerfile.ubi + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: openshift-org-aws + ci.openshift.io/generator: prowgen + job-release: "4.18" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-velero-plugin-for-aws-oadp-1.4-e2e-test-aws + rerun_command: /test e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=e2e-test-aws + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-test-aws,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -14,6 +99,7 @@ presubmits: labels: capability/arm64: arm64 ci.openshift.io/generator: prowgen + job-release: "4.18" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-velero-plugin-for-aws-oadp-1.4-images rerun_command: /test images diff --git a/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.5-postsubmits.yaml b/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.5-postsubmits.yaml index d48c7f3e52dbe..4ef2ea7a42235 100644 --- a/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.5-postsubmits.yaml +++ b/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.5-postsubmits.yaml @@ -13,6 +13,7 @@ postsubmits: capability/arm64: arm64 ci-operator.openshift.io/is-promotion: "true" ci.openshift.io/generator: prowgen + job-release: "4.19" max_concurrency: 1 name: branch-ci-openshift-velero-plugin-for-aws-oadp-1.5-images spec: diff --git a/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.5-presubmits.yaml b/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.5-presubmits.yaml index 6d7569f17a480..eb865f17f5969 100644 --- a/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.5-presubmits.yaml +++ b/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.5-presubmits.yaml @@ -1,5 +1,90 @@ presubmits: openshift/velero-plugin-for-aws: + - agent: kubernetes + always_run: false + branches: + - ^oadp-1\.5$ + - ^oadp-1\.5- + cluster: build05 + context: ci/prow/e2e-test-aws + decorate: true + decoration_config: + sparse_checkout_files: + - Dockerfile.ubi + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: openshift-org-aws + ci.openshift.io/generator: prowgen + job-release: "4.19" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-velero-plugin-for-aws-oadp-1.5-e2e-test-aws + rerun_command: /test e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=e2e-test-aws + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-test-aws,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -14,6 +99,7 @@ presubmits: labels: capability/arm64: arm64 ci.openshift.io/generator: prowgen + job-release: "4.19" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-velero-plugin-for-aws-oadp-1.5-images rerun_command: /test images diff --git a/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.6-postsubmits.yaml b/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.6-postsubmits.yaml index c63f22e6a447a..3e9c69836e1ce 100644 --- a/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.6-postsubmits.yaml +++ b/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.6-postsubmits.yaml @@ -13,6 +13,7 @@ postsubmits: capability/arm64: arm64 ci-operator.openshift.io/is-promotion: "true" ci.openshift.io/generator: prowgen + job-release: "5.0" max_concurrency: 1 name: branch-ci-openshift-velero-plugin-for-aws-oadp-1.6-images spec: diff --git a/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.6-presubmits.yaml b/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.6-presubmits.yaml index 801df65ad9914..f35d473367c67 100644 --- a/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.6-presubmits.yaml +++ b/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-1.6-presubmits.yaml @@ -1,5 +1,90 @@ presubmits: openshift/velero-plugin-for-aws: + - agent: kubernetes + always_run: false + branches: + - ^oadp-1\.6$ + - ^oadp-1\.6- + cluster: build05 + context: ci/prow/e2e-test-aws + decorate: true + decoration_config: + sparse_checkout_files: + - Dockerfile.ubi + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: openshift-org-aws + ci.openshift.io/generator: prowgen + job-release: "5.0" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-velero-plugin-for-aws-oadp-1.6-e2e-test-aws + rerun_command: /test e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=e2e-test-aws + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-test-aws,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -14,6 +99,7 @@ presubmits: labels: capability/arm64: arm64 ci.openshift.io/generator: prowgen + job-release: "5.0" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-velero-plugin-for-aws-oadp-1.6-images rerun_command: /test images diff --git a/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-dev-postsubmits.yaml b/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-dev-postsubmits.yaml index 3cc19bc4dbea0..c159f5f6e0058 100644 --- a/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-dev-postsubmits.yaml +++ b/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-dev-postsubmits.yaml @@ -13,6 +13,7 @@ postsubmits: capability/arm64: arm64 ci-operator.openshift.io/is-promotion: "true" ci.openshift.io/generator: prowgen + job-release: "5.0" max_concurrency: 1 name: branch-ci-openshift-velero-plugin-for-aws-oadp-dev-images spec: diff --git a/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-dev-presubmits.yaml b/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-dev-presubmits.yaml index cabd04646ed6a..8522669e4b633 100644 --- a/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-dev-presubmits.yaml +++ b/ci-operator/jobs/openshift/velero-plugin-for-aws/openshift-velero-plugin-for-aws-oadp-dev-presubmits.yaml @@ -1,5 +1,90 @@ presubmits: openshift/velero-plugin-for-aws: + - agent: kubernetes + always_run: false + branches: + - ^oadp-dev$ + - ^oadp-dev- + cluster: build05 + context: ci/prow/e2e-test-aws + decorate: true + decoration_config: + sparse_checkout_files: + - Dockerfile.ubi + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: openshift-org-aws + ci.openshift.io/generator: prowgen + job-release: "5.0" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-velero-plugin-for-aws-oadp-dev-e2e-test-aws + rerun_command: /test e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=e2e-test-aws + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-test-aws,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -14,6 +99,7 @@ presubmits: labels: capability/arm64: arm64 ci.openshift.io/generator: prowgen + job-release: "5.0" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-velero-plugin-for-aws-oadp-dev-images rerun_command: /test images diff --git a/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.4-postsubmits.yaml b/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.4-postsubmits.yaml index aeb412eef1011..44b505559cb89 100644 --- a/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.4-postsubmits.yaml +++ b/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.4-postsubmits.yaml @@ -13,6 +13,7 @@ postsubmits: capability/arm64: arm64 ci-operator.openshift.io/is-promotion: "true" ci.openshift.io/generator: prowgen + job-release: "4.18" max_concurrency: 1 name: branch-ci-openshift-velero-plugin-for-legacy-aws-oadp-1.4-images spec: diff --git a/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.4-presubmits.yaml b/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.4-presubmits.yaml index da0e5c9c9a72d..d273dcab646c8 100644 --- a/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.4-presubmits.yaml +++ b/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.4-presubmits.yaml @@ -1,5 +1,90 @@ presubmits: openshift/velero-plugin-for-legacy-aws: + - agent: kubernetes + always_run: false + branches: + - ^oadp-1\.4$ + - ^oadp-1\.4- + cluster: build01 + context: ci/prow/e2e-test-aws + decorate: true + decoration_config: + sparse_checkout_files: + - Dockerfile.ubi + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: openshift-org-aws + ci.openshift.io/generator: prowgen + job-release: "4.18" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-velero-plugin-for-legacy-aws-oadp-1.4-e2e-test-aws + rerun_command: /test e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=e2e-test-aws + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-test-aws,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -14,6 +99,7 @@ presubmits: labels: capability/arm64: arm64 ci.openshift.io/generator: prowgen + job-release: "4.18" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-velero-plugin-for-legacy-aws-oadp-1.4-images rerun_command: /test images @@ -70,6 +156,7 @@ presubmits: - Dockerfile.ubi labels: ci.openshift.io/generator: prowgen + job-release: "4.18" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-velero-plugin-for-legacy-aws-oadp-1.4-unit-test optional: true @@ -81,6 +168,7 @@ presubmits: - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials - --target=unit-test command: - ci-operator @@ -102,6 +190,9 @@ presubmits: - mountPath: /etc/boskos name: boskos readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true - mountPath: /secrets/gcs name: gcs-credentials readOnly: true @@ -122,6 +213,9 @@ presubmits: - key: credentials path: credentials secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials - name: manifest-tool-local-pusher secret: secretName: manifest-tool-local-pusher diff --git a/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.5-postsubmits.yaml b/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.5-postsubmits.yaml index d971cdfe81508..03ef929f48925 100644 --- a/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.5-postsubmits.yaml +++ b/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.5-postsubmits.yaml @@ -13,6 +13,7 @@ postsubmits: capability/arm64: arm64 ci-operator.openshift.io/is-promotion: "true" ci.openshift.io/generator: prowgen + job-release: "4.19" max_concurrency: 1 name: branch-ci-openshift-velero-plugin-for-legacy-aws-oadp-1.5-images spec: diff --git a/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.5-presubmits.yaml b/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.5-presubmits.yaml index 23aebe7e16da0..535b530502610 100644 --- a/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.5-presubmits.yaml +++ b/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.5-presubmits.yaml @@ -1,5 +1,90 @@ presubmits: openshift/velero-plugin-for-legacy-aws: + - agent: kubernetes + always_run: false + branches: + - ^oadp-1\.5$ + - ^oadp-1\.5- + cluster: build01 + context: ci/prow/e2e-test-aws + decorate: true + decoration_config: + sparse_checkout_files: + - Dockerfile.ubi + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: openshift-org-aws + ci.openshift.io/generator: prowgen + job-release: "4.19" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-velero-plugin-for-legacy-aws-oadp-1.5-e2e-test-aws + rerun_command: /test e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=e2e-test-aws + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-test-aws,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -14,6 +99,7 @@ presubmits: labels: capability/arm64: arm64 ci.openshift.io/generator: prowgen + job-release: "4.19" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-velero-plugin-for-legacy-aws-oadp-1.5-images rerun_command: /test images @@ -70,6 +156,7 @@ presubmits: - Dockerfile.ubi labels: ci.openshift.io/generator: prowgen + job-release: "4.19" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-velero-plugin-for-legacy-aws-oadp-1.5-unit-test optional: true @@ -81,6 +168,7 @@ presubmits: - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials - --target=unit-test command: - ci-operator @@ -102,6 +190,9 @@ presubmits: - mountPath: /etc/boskos name: boskos readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true - mountPath: /secrets/gcs name: gcs-credentials readOnly: true @@ -122,6 +213,9 @@ presubmits: - key: credentials path: credentials secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials - name: manifest-tool-local-pusher secret: secretName: manifest-tool-local-pusher diff --git a/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.6-postsubmits.yaml b/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.6-postsubmits.yaml index 5b5cef1125781..add1653273b7c 100644 --- a/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.6-postsubmits.yaml +++ b/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.6-postsubmits.yaml @@ -13,6 +13,7 @@ postsubmits: capability/arm64: arm64 ci-operator.openshift.io/is-promotion: "true" ci.openshift.io/generator: prowgen + job-release: "5.0" max_concurrency: 1 name: branch-ci-openshift-velero-plugin-for-legacy-aws-oadp-1.6-images spec: diff --git a/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.6-presubmits.yaml b/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.6-presubmits.yaml index 4704a9ecfe789..aebe8097f39f6 100644 --- a/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.6-presubmits.yaml +++ b/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-1.6-presubmits.yaml @@ -1,5 +1,90 @@ presubmits: openshift/velero-plugin-for-legacy-aws: + - agent: kubernetes + always_run: false + branches: + - ^oadp-1\.6$ + - ^oadp-1\.6- + cluster: build01 + context: ci/prow/e2e-test-aws + decorate: true + decoration_config: + sparse_checkout_files: + - Dockerfile.ubi + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: openshift-org-aws + ci.openshift.io/generator: prowgen + job-release: "5.0" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-velero-plugin-for-legacy-aws-oadp-1.6-e2e-test-aws + rerun_command: /test e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=e2e-test-aws + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-test-aws,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -14,6 +99,7 @@ presubmits: labels: capability/arm64: arm64 ci.openshift.io/generator: prowgen + job-release: "5.0" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-velero-plugin-for-legacy-aws-oadp-1.6-images rerun_command: /test images @@ -70,6 +156,7 @@ presubmits: - Dockerfile.ubi labels: ci.openshift.io/generator: prowgen + job-release: "5.0" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-velero-plugin-for-legacy-aws-oadp-1.6-unit-test optional: true @@ -81,6 +168,7 @@ presubmits: - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials - --target=unit-test command: - ci-operator @@ -102,6 +190,9 @@ presubmits: - mountPath: /etc/boskos name: boskos readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true - mountPath: /secrets/gcs name: gcs-credentials readOnly: true @@ -122,6 +213,9 @@ presubmits: - key: credentials path: credentials secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials - name: manifest-tool-local-pusher secret: secretName: manifest-tool-local-pusher diff --git a/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-dev-postsubmits.yaml b/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-dev-postsubmits.yaml index 9566a427ec125..8317116ced90b 100644 --- a/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-dev-postsubmits.yaml +++ b/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-dev-postsubmits.yaml @@ -13,6 +13,7 @@ postsubmits: capability/arm64: arm64 ci-operator.openshift.io/is-promotion: "true" ci.openshift.io/generator: prowgen + job-release: "5.0" max_concurrency: 1 name: branch-ci-openshift-velero-plugin-for-legacy-aws-oadp-dev-images spec: diff --git a/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-dev-presubmits.yaml b/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-dev-presubmits.yaml index 25b542a44766b..b20d7f38e9676 100644 --- a/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-dev-presubmits.yaml +++ b/ci-operator/jobs/openshift/velero-plugin-for-legacy-aws/openshift-velero-plugin-for-legacy-aws-oadp-dev-presubmits.yaml @@ -1,5 +1,90 @@ presubmits: openshift/velero-plugin-for-legacy-aws: + - agent: kubernetes + always_run: false + branches: + - ^oadp-dev$ + - ^oadp-dev- + cluster: build01 + context: ci/prow/e2e-test-aws + decorate: true + decoration_config: + sparse_checkout_files: + - Dockerfile.ubi + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: openshift-org-aws + ci.openshift.io/generator: prowgen + job-release: "5.0" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-velero-plugin-for-legacy-aws-oadp-dev-e2e-test-aws + rerun_command: /test e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=e2e-test-aws + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-test-aws,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -14,6 +99,7 @@ presubmits: labels: capability/arm64: arm64 ci.openshift.io/generator: prowgen + job-release: "5.0" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-velero-plugin-for-legacy-aws-oadp-dev-images rerun_command: /test images @@ -70,6 +156,7 @@ presubmits: - Dockerfile.ubi labels: ci.openshift.io/generator: prowgen + job-release: "5.0" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-velero-plugin-for-legacy-aws-oadp-dev-unit-test optional: true @@ -81,6 +168,7 @@ presubmits: - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials - --target=unit-test command: - ci-operator @@ -102,6 +190,9 @@ presubmits: - mountPath: /etc/boskos name: boskos readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true - mountPath: /secrets/gcs name: gcs-credentials readOnly: true @@ -122,6 +213,9 @@ presubmits: - key: credentials path: credentials secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials - name: manifest-tool-local-pusher secret: secretName: manifest-tool-local-pusher diff --git a/ci-operator/jobs/openshift/velero/openshift-velero-oadp-1.4-postsubmits.yaml b/ci-operator/jobs/openshift/velero/openshift-velero-oadp-1.4-postsubmits.yaml index 87370febf8ed3..443a38f0d20a4 100644 --- a/ci-operator/jobs/openshift/velero/openshift-velero-oadp-1.4-postsubmits.yaml +++ b/ci-operator/jobs/openshift/velero/openshift-velero-oadp-1.4-postsubmits.yaml @@ -14,6 +14,7 @@ postsubmits: capability/arm64: arm64 ci-operator.openshift.io/is-promotion: "true" ci.openshift.io/generator: prowgen + job-release: "4.18" max_concurrency: 1 name: branch-ci-openshift-velero-oadp-1.4-images spec: diff --git a/ci-operator/jobs/openshift/velero/openshift-velero-oadp-1.4-presubmits.yaml b/ci-operator/jobs/openshift/velero/openshift-velero-oadp-1.4-presubmits.yaml index 5c3e4eab3f521..1318e69704598 100644 --- a/ci-operator/jobs/openshift/velero/openshift-velero-oadp-1.4-presubmits.yaml +++ b/ci-operator/jobs/openshift/velero/openshift-velero-oadp-1.4-presubmits.yaml @@ -1,5 +1,91 @@ presubmits: openshift/velero: + - agent: kubernetes + always_run: false + branches: + - ^oadp-1\.4$ + - ^oadp-1\.4- + cluster: build09 + context: ci/prow/e2e-test-aws + decorate: true + decoration_config: + sparse_checkout_files: + - Dockerfile-velero-restore-helper.ubi + - Dockerfile.ubi + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: openshift-org-aws + ci.openshift.io/generator: prowgen + job-release: "4.18" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-velero-oadp-1.4-e2e-test-aws + rerun_command: /test e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=e2e-test-aws + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-test-aws,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -15,6 +101,7 @@ presubmits: labels: capability/arm64: arm64 ci.openshift.io/generator: prowgen + job-release: "4.18" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-velero-oadp-1.4-images rerun_command: /test images diff --git a/ci-operator/jobs/openshift/velero/openshift-velero-oadp-1.5-postsubmits.yaml b/ci-operator/jobs/openshift/velero/openshift-velero-oadp-1.5-postsubmits.yaml index 2df0c631126f0..f00d0d985af8c 100644 --- a/ci-operator/jobs/openshift/velero/openshift-velero-oadp-1.5-postsubmits.yaml +++ b/ci-operator/jobs/openshift/velero/openshift-velero-oadp-1.5-postsubmits.yaml @@ -13,6 +13,7 @@ postsubmits: capability/arm64: arm64 ci-operator.openshift.io/is-promotion: "true" ci.openshift.io/generator: prowgen + job-release: "4.19" max_concurrency: 1 name: branch-ci-openshift-velero-oadp-1.5-images spec: diff --git a/ci-operator/jobs/openshift/velero/openshift-velero-oadp-1.5-presubmits.yaml b/ci-operator/jobs/openshift/velero/openshift-velero-oadp-1.5-presubmits.yaml index d1b1fa520e383..70ad28c581ca4 100644 --- a/ci-operator/jobs/openshift/velero/openshift-velero-oadp-1.5-presubmits.yaml +++ b/ci-operator/jobs/openshift/velero/openshift-velero-oadp-1.5-presubmits.yaml @@ -1,5 +1,90 @@ presubmits: openshift/velero: + - agent: kubernetes + always_run: false + branches: + - ^oadp-1\.5$ + - ^oadp-1\.5- + cluster: build09 + context: ci/prow/e2e-test-aws + decorate: true + decoration_config: + sparse_checkout_files: + - Dockerfile.ubi + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: openshift-org-aws + ci.openshift.io/generator: prowgen + job-release: "4.19" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-velero-oadp-1.5-e2e-test-aws + rerun_command: /test e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=e2e-test-aws + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-test-aws,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -14,6 +99,7 @@ presubmits: labels: capability/arm64: arm64 ci.openshift.io/generator: prowgen + job-release: "4.19" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-velero-oadp-1.5-images rerun_command: /test images diff --git a/ci-operator/jobs/openshift/velero/openshift-velero-oadp-1.6-postsubmits.yaml b/ci-operator/jobs/openshift/velero/openshift-velero-oadp-1.6-postsubmits.yaml index 8ad2b65777bf5..2c6b7a0e31f09 100644 --- a/ci-operator/jobs/openshift/velero/openshift-velero-oadp-1.6-postsubmits.yaml +++ b/ci-operator/jobs/openshift/velero/openshift-velero-oadp-1.6-postsubmits.yaml @@ -13,6 +13,7 @@ postsubmits: capability/arm64: arm64 ci-operator.openshift.io/is-promotion: "true" ci.openshift.io/generator: prowgen + job-release: "5.0" max_concurrency: 1 name: branch-ci-openshift-velero-oadp-1.6-images spec: diff --git a/ci-operator/jobs/openshift/velero/openshift-velero-oadp-1.6-presubmits.yaml b/ci-operator/jobs/openshift/velero/openshift-velero-oadp-1.6-presubmits.yaml index 9f09d5ef3ae1d..b2e495571bd3b 100644 --- a/ci-operator/jobs/openshift/velero/openshift-velero-oadp-1.6-presubmits.yaml +++ b/ci-operator/jobs/openshift/velero/openshift-velero-oadp-1.6-presubmits.yaml @@ -1,5 +1,90 @@ presubmits: openshift/velero: + - agent: kubernetes + always_run: false + branches: + - ^oadp-1\.6$ + - ^oadp-1\.6- + cluster: build09 + context: ci/prow/e2e-test-aws + decorate: true + decoration_config: + sparse_checkout_files: + - Dockerfile.ubi + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: openshift-org-aws + ci.openshift.io/generator: prowgen + job-release: "5.0" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-velero-oadp-1.6-e2e-test-aws + rerun_command: /test e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=e2e-test-aws + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-test-aws,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -14,6 +99,7 @@ presubmits: labels: capability/arm64: arm64 ci.openshift.io/generator: prowgen + job-release: "5.0" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-velero-oadp-1.6-images rerun_command: /test images diff --git a/ci-operator/jobs/openshift/velero/openshift-velero-oadp-dev-postsubmits.yaml b/ci-operator/jobs/openshift/velero/openshift-velero-oadp-dev-postsubmits.yaml index 99b5059e2a1b4..e8384ee4e3c25 100644 --- a/ci-operator/jobs/openshift/velero/openshift-velero-oadp-dev-postsubmits.yaml +++ b/ci-operator/jobs/openshift/velero/openshift-velero-oadp-dev-postsubmits.yaml @@ -13,6 +13,7 @@ postsubmits: capability/arm64: arm64 ci-operator.openshift.io/is-promotion: "true" ci.openshift.io/generator: prowgen + job-release: "5.0" max_concurrency: 1 name: branch-ci-openshift-velero-oadp-dev-images spec: diff --git a/ci-operator/jobs/openshift/velero/openshift-velero-oadp-dev-presubmits.yaml b/ci-operator/jobs/openshift/velero/openshift-velero-oadp-dev-presubmits.yaml index 87aa0300b84f3..0d7ea5e5e88ad 100644 --- a/ci-operator/jobs/openshift/velero/openshift-velero-oadp-dev-presubmits.yaml +++ b/ci-operator/jobs/openshift/velero/openshift-velero-oadp-dev-presubmits.yaml @@ -1,5 +1,90 @@ presubmits: openshift/velero: + - agent: kubernetes + always_run: false + branches: + - ^oadp-dev$ + - ^oadp-dev- + cluster: build09 + context: ci/prow/e2e-test-aws + decorate: true + decoration_config: + sparse_checkout_files: + - Dockerfile.ubi + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: openshift-org-aws + ci.openshift.io/generator: prowgen + job-release: "5.0" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-velero-oadp-dev-e2e-test-aws + rerun_command: /test e2e-test-aws + run_if_changed: (\.go|\.ya?ml|\.sh)$|^go\.(mod|sum)$|^Makefile$|^Dockerfile.*$|^\.dockerignore$ + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=e2e-test-aws + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-test-aws,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -14,6 +99,7 @@ presubmits: labels: capability/arm64: arm64 ci.openshift.io/generator: prowgen + job-release: "5.0" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-openshift-velero-oadp-dev-images rerun_command: /test images diff --git a/ci-operator/step-registry/oadp/apply-depends-on-images/OWNERS b/ci-operator/step-registry/oadp/apply-depends-on-images/OWNERS new file mode 100644 index 0000000000000..08bf362d96bee --- /dev/null +++ b/ci-operator/step-registry/oadp/apply-depends-on-images/OWNERS @@ -0,0 +1,16 @@ +approvers: +- jwmatthews +- sseago +- shawn-hurley +- dymurray +- shubham-pampattiwar +- kaovilai +- mpryc +- joeavaikath +options: {} +reviewers: +- sseago +- shubham-pampattiwar +- kaovilai +- mpryc +- joeavaikath diff --git a/ci-operator/step-registry/oadp/apply-depends-on-images/README.md b/ci-operator/step-registry/oadp/apply-depends-on-images/README.md new file mode 100644 index 0000000000000..c8200fa321cc0 --- /dev/null +++ b/ci-operator/step-registry/oadp/apply-depends-on-images/README.md @@ -0,0 +1,38 @@ +# oadp-apply-depends-on-images-ref + +## Table of Contents + +- [Purpose](#purpose) +- [Process](#process) + - [Environment Variables](#environment-variables) +- [OLM version seam](#olm-version-seam) +- [Provenance](#provenance) + +## Purpose + +Applies whatever [`oadp-depends-on-build`](../depends-on-build/README.md) resolved (`${SHARED_DIR}/depends-on-images.txt`) to the operator already installed in this test cluster. `oadp-depends-on-build` only builds images and writes a plain manifest -- it never touches an installed operator. This step is the other half: make a resolved image actually take effect. + +A total no-op when that manifest doesn't exist or is empty -- the common case for any PR that doesn't use `Depends-On:` at all. + +## Process + +1. If `${SHARED_DIR}/depends-on-images.txt` is missing or empty: exit 0 immediately, no cluster interaction at all. +2. Otherwise, discover the single `Subscription` in `OO_INSTALL_NAMESPACE` (fails if zero or more than one is found). +3. Patch `Subscription.spec.config.env` with one entry per line in the manifest (a single merge patch, replacing the whole array). +4. Wait for `OO_MANAGER_DEPLOYMENT` to observe every one of those env vars, then wait for its rollout to finish. + +### Environment Variables + +- `OO_INSTALL_NAMESPACE` -- the namespace the operator under test is installed into. +- `OLM_API_VERSION` -- `v0` (default, implemented) or `v1` (reserved, not yet implemented -- see below). +- `OO_MANAGER_DEPLOYMENT` -- name of the manager Deployment to wait on (default: `openshift-adp-controller-manager`). + +## OLM version seam + +This ecosystem installs operators via OLMv0 (a `Subscription` whose `spec.config.env` is the supported per-install override mechanism) everywhere as of this writing. `operator-controller`'s `ClusterExtension` (OLMv1) is expected to eventually replace that, with a different config-override shape. + +This step is deliberately the *only* place that knows how to make a resolved Depends-On image take effect -- `oadp-depends-on-build` is fully OLM-version-agnostic. `OLM_API_VERSION=v1` is reserved for that future work but **fails loudly** today (rather than silently no-opping), so a consumer that migrates to OLMv1 cannot accidentally believe Depends-On support carried over for free. Implementing it is future work tracked alongside [openshift/oadp-operator#2389](https://github.com/openshift/oadp-operator/issues/2389). + +## Provenance + +Written alongside [`oadp-depends-on-build`](../depends-on-build/README.md) for [openshift/oadp-operator#2389](https://github.com/openshift/oadp-operator/issues/2389). Patch/wait logic mirrors the `set-related-image` test step already inline in the 4 `migtools/kubevirt-datamover-{controller,plugin}` KDM e2e configs (openshift/oadp-operator#1832 / openshift/release#83049), generalized here as a standalone reusable step for consumers (like `openshift/oadp-operator`'s own e2e) that don't also need to apply an own-repo dependency image inline. diff --git a/ci-operator/step-registry/oadp/apply-depends-on-images/oadp-apply-depends-on-images-commands.sh b/ci-operator/step-registry/oadp/apply-depends-on-images/oadp-apply-depends-on-images-commands.sh new file mode 100644 index 0000000000000..bba800204fe8e --- /dev/null +++ b/ci-operator/step-registry/oadp/apply-depends-on-images/oadp-apply-depends-on-images-commands.sh @@ -0,0 +1,95 @@ +#!/bin/bash + +# Applies whatever oadp-depends-on-build resolved to the operator already +# installed in this test cluster (OLMv0 Subscription.spec.config.env today). +# See oadp-depends-on-build-commands.sh for the full order-of-operations +# writeup (only the triggering PR needs Depends-On:, one-directional by +# default, live re-fetch on every run/retest). +# +# OLM VERSION SEAM: this step is deliberately the ONLY place that knows how +# to make a resolved image "take effect" -- oadp-depends-on-build itself +# only builds images and writes a plain repo-agnostic manifest, with no +# OLM-API knowledge at all. When operator-controller's ClusterExtension +# (OLMv1) eventually replaces the Subscription-based install this +# ecosystem uses today, only this step needs a new code path (see the +# OLM_API_VERSION=v1 branch below, not yet implemented) -- the resolver +# does not change. + +set -o errexit +set -o nounset +set -o pipefail + +if [[ ! -s "${SHARED_DIR}/depends-on-images.txt" ]]; then + echo "[$(date --utc +%FT%T.%3NZ)] No ${SHARED_DIR}/depends-on-images.txt (or empty) -- nothing to apply" + exit 0 +fi + +case "${OLM_API_VERSION}" in + v0) + ;; + v1) + echo "OLM_API_VERSION=v1 (operator-controller ClusterExtension) is not implemented yet -- see openshift/oadp-operator#2389. Refusing to silently skip a requested override rather than pretend it applied." >&2 + exit 1 + ;; + *) + echo "Unknown OLM_API_VERSION '${OLM_API_VERSION}' -- expected 'v0' (implemented) or 'v1' (reserved, not yet implemented)" >&2 + exit 1 + ;; +esac + +SUBS=$(oc get subscription -n "${OO_INSTALL_NAMESPACE}" -o jsonpath='{.items[*].metadata.name}') +if [[ -z "${SUBS}" ]]; then + echo "No Subscription found in namespace ${OO_INSTALL_NAMESPACE}" >&2 + exit 1 +fi +if [[ "$(echo "${SUBS}" | wc -w)" -gt 1 ]]; then + echo "Multiple Subscriptions found in ${OO_INSTALL_NAMESPACE}: ${SUBS}" >&2 + exit 1 +fi +SUB="${SUBS}" +echo "Discovered Subscription: ${SUB}" + +ALL_ENV_LINES=$(cat "${SHARED_DIR}/depends-on-images.txt") + +# Subscription.spec.config.env is OLM's supported override mechanism: it +# wins over same-named CSV env vars and survives reconciliation. Built with +# printf, not jq -- the cli image doesn't ship it, and the patch shape is +# fixed/simple enough not to need it. +# NOTE: --type merge below REPLACES the whole spec.config.env array rather +# than merging by key -- same known limitation as the KDM set-related-image +# steps this mirrors. Safe only while the Subscription in this namespace has +# no pre-existing config.env entries this would clobber. +ENTRIES=() +while read -r ENV_NAME ENV_VALUE; do + [[ -z "${ENV_NAME}" ]] && continue + ENTRIES+=("{\"name\":\"${ENV_NAME}\",\"value\":\"${ENV_VALUE}\"}") +done <<< "${ALL_ENV_LINES}" +JOINED=$(IFS=,; echo "${ENTRIES[*]}") +PATCH=$(printf '{"spec":{"config":{"env":[%s]}}}' "${JOINED}") +oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "${PATCH}" + +echo "Waiting for Deployment ${OO_MANAGER_DEPLOYMENT} to observe:" +# Names only -- ALL_ENV_LINES' second field is an internal-cluster-registry +# pullspec, which must not be echoed into CI logs (this repo's own +# convention: don't log cluster URLs). +while read -r ENV_NAME _; do + [[ -n "${ENV_NAME}" ]] && echo " ${ENV_NAME}" +done <<< "${ALL_ENV_LINES}" +for _ in $(seq 1 60); do + ALL_OK=true + while read -r ENV_NAME ENV_VALUE; do + [[ -z "${ENV_NAME}" ]] && continue + CURRENT=$(oc get deployment/"${OO_MANAGER_DEPLOYMENT}" -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"${ENV_NAME}\")].value}" 2>/dev/null || true) + [[ "${CURRENT}" != "${ENV_VALUE}" ]] && ALL_OK=false + done <<< "${ALL_ENV_LINES}" + [[ "${ALL_OK}" == "true" ]] && break + sleep 5 +done +if [[ "${ALL_OK}" != "true" ]]; then + echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 + oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true + oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true + oc get deployment -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/deployments.yaml" || true + exit 1 +fi +oc rollout status deployment/"${OO_MANAGER_DEPLOYMENT}" -n "${OO_INSTALL_NAMESPACE}" --timeout=180s diff --git a/ci-operator/step-registry/oadp/apply-depends-on-images/oadp-apply-depends-on-images-ref.metadata.json b/ci-operator/step-registry/oadp/apply-depends-on-images/oadp-apply-depends-on-images-ref.metadata.json new file mode 100644 index 0000000000000..bfa8695dad26f --- /dev/null +++ b/ci-operator/step-registry/oadp/apply-depends-on-images/oadp-apply-depends-on-images-ref.metadata.json @@ -0,0 +1,22 @@ +{ + "path": "oadp/apply-depends-on-images/oadp-apply-depends-on-images-ref.yaml", + "owners": { + "approvers": [ + "jwmatthews", + "sseago", + "shawn-hurley", + "dymurray", + "shubham-pampattiwar", + "kaovilai", + "mpryc", + "joeavaikath" + ], + "reviewers": [ + "sseago", + "shubham-pampattiwar", + "kaovilai", + "mpryc", + "joeavaikath" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/oadp/apply-depends-on-images/oadp-apply-depends-on-images-ref.yaml b/ci-operator/step-registry/oadp/apply-depends-on-images/oadp-apply-depends-on-images-ref.yaml new file mode 100644 index 0000000000000..f2576224f5126 --- /dev/null +++ b/ci-operator/step-registry/oadp/apply-depends-on-images/oadp-apply-depends-on-images-ref.yaml @@ -0,0 +1,45 @@ +ref: + as: oadp-apply-depends-on-images + from: cli + commands: oadp-apply-depends-on-images-commands.sh + grace_period: 5m + resources: + requests: + cpu: 100m + memory: 100Mi + env: + - name: OO_INSTALL_NAMESPACE + documentation: The namespace the operator under test is installed into (same value passed to oadp-depends-on-build and to the install step, e.g. oadp-operator-sdk-bundle-image or optional-operators-subscribe). + - name: OLM_API_VERSION + documentation: |- + Which OLM API this cluster's operator install uses, so this step + knows how to apply the resolved images. Only `v0` is implemented + today (patches an OLMv0 Subscription's `spec.config.env`, the only + API this whole ecosystem uses as of this writing). `v1` is reserved + for operator-controller's ClusterExtension, which will eventually + replace OLMv0 across this ecosystem but uses a different + config-override shape -- setting it fails loudly with a clear + "not implemented" message rather than silently no-opping, so a + future OLMv1 migration cannot accidentally believe Depends-On + support carried over for free. See openshift/oadp-operator#2389. + default: v0 + - name: OO_MANAGER_DEPLOYMENT + documentation: Name of the operator's own manager Deployment to wait on for the Subscription.spec.config.env override to roll out. Defaults to oadp-operator's own manager Deployment name. + default: openshift-adp-controller-manager + documentation: |- + Applies whatever `oadp-depends-on-build` resolved + (`${SHARED_DIR}/depends-on-images.txt`, see that ref) to the operator + already installed in this test cluster, so a Depends-On-resolved image + actually takes effect instead of just sitting in the internal + registry unused. + + A total no-op (no Subscription lookup, no patch, nothing) when that + file doesn't exist or is empty -- the common case for any PR that + doesn't use Depends-On at all. + + Deliberately separate from `oadp-depends-on-build`: that step only + builds images and is OLM-version-agnostic (it doesn't touch any + installed operator at all); this step is where OLM-API-specific + "make it take effect" logic lives, so a future OLMv1 + (operator-controller ClusterExtension) implementation only touches + this one step, not the resolver. diff --git a/ci-operator/step-registry/oadp/depends-on-build/OWNERS b/ci-operator/step-registry/oadp/depends-on-build/OWNERS new file mode 100644 index 0000000000000..08bf362d96bee --- /dev/null +++ b/ci-operator/step-registry/oadp/depends-on-build/OWNERS @@ -0,0 +1,16 @@ +approvers: +- jwmatthews +- sseago +- shawn-hurley +- dymurray +- shubham-pampattiwar +- kaovilai +- mpryc +- joeavaikath +options: {} +reviewers: +- sseago +- shubham-pampattiwar +- kaovilai +- mpryc +- joeavaikath diff --git a/ci-operator/step-registry/oadp/depends-on-build/README.md b/ci-operator/step-registry/oadp/depends-on-build/README.md new file mode 100644 index 0000000000000..4dae034dbbf75 --- /dev/null +++ b/ci-operator/step-registry/oadp/depends-on-build/README.md @@ -0,0 +1,83 @@ +# oadp-depends-on-build-ref + +## Table of Contents + +- [Purpose](#purpose) +- [Process](#process) + - [Trigger semantics for a multi-repo PR author](#trigger-semantics-for-a-multi-repo-pr-author) + - [Worked example: oadp-operator depending on oadp-non-admin](#worked-example-oadp-operator-depending-on-oadp-non-admin) + - [Environment Variables](#environment-variables) + - [Output](#output) +- [Known limitations](#known-limitations) +- [Provenance](#provenance) + +## Purpose + +Lets a CI job testing one repo's PR also pull in an unmerged PR from one or more sibling repos, via a `Depends-On:` line in the triggering PR's own description -- the same PR-description convention already used by `openstack-k8s-operators-kuttl-commands.sh`. Unlike that step (a plain source checkout), a resolved dependency here becomes a real pushed container image, because downstream needs an actual pullspec (e.g. a Kubernetes `Subscription`'s `RELATED_IMAGE_*` override). + +Written generically to cover the N-repo case tracked by [openshift/oadp-operator#2389](https://github.com/openshift/oadp-operator/issues/2389) ("test oadp-operator + kdm-controller + kdm-plugin + velero-plugin-for-aws etc. together"). Consumed by: + +- The 4 `migtools/kubevirt-datamover-{controller,plugin}` (KDM) e2e configs (`oadp-dev`/`oadp-1.6`). The plugin configs declare 2 candidates (the sibling controller repo, and `openshift/velero` itself -- e.g. testing a plugin PR against an unmerged velero PR that changes how it calls `Execute()`/other plugin-interface functions); the controller configs declare 2 as well (the sibling plugin repo, and `openshift/oadp-operator` via the `MANAGER_IMAGE` sentinel below). See [openshift/oadp-operator#1832](https://github.com/openshift/oadp-operator/issues/1832) for the KDM e2e coverage this builds on. +- `openshift/oadp-operator`'s own `e2e-test-aws`, across all 10 branch/OCP-version configs from `oadp-1.4` through `oadp-dev`, each declaring one candidate per `RELATED_IMAGE_*` its bundle substitutes (the exact set varies per branch -- older branches ship fewer components) -- see [`oadp-apply-depends-on-images`](../apply-depends-on-images/README.md) for how a resolved image actually takes effect there (an OLMv0 Subscription patch, with an explicit seam for future OLMv1/operator-controller support). +- `openshift/velero`, `openshift/velero-plugin-for-aws`, `openshift/velero-plugin-for-legacy-aws`, and `openshift/openshift-velero-plugin`'s own new `e2e-test-aws` jobs (4 branches each, `oadp-1.4` through `oadp-dev`: 16 configs total). Unlike KDM's `TEST_VIRT_KDM=true` or oadp-operator's own full-bundle build, these install a plain, unmodified oadp-operator bundle (`oadp-operator-sdk-bundle-image`) and run the operator's **default** `make test-e2e` suite with no component flag -- every one of these 4 repos is already exercised by the default (non-`virt`/`hcp`/`cli`) backup/restore specs, so no dedicated spec selection is needed. Each of the 4 declares the other 3 as candidates plus `openshift/oadp-operator MANAGER_IMAGE`, so any pairing/triple/full-quad combo among them (plus an oadp-operator reconcile-logic change) is triggerable from any one of the 4 PRs. `openshift/velero-plugin-for-microsoft-azure` and `openshift/velero-plugin-for-gcp` are intentionally not included in this round. `migtools/kubevirt-velero-plugin` and `openshift/hypershift-oadp-plugin` are also not included -- both need a non-default test flag (`TEST_VIRT`/`TEST_HCP`) with its own expensive cluster setup (KubeVirt/HyperShift), so a "normal" job here wouldn't actually exercise them. + +## Process + +1. Reads the triggering PR's description via the GitHub API, using Prow's own injected `REPO_OWNER`/`REPO_NAME`/`PULL_NUMBER` (no JSON parsing needed to identify the PR itself). +2. Scans it for every `Depends-On: https://github.com///pull/` line (Gerrit/Zuul convention, one per line). +3. For each line whose `/` matches an entry in `DEPENDS_ON_CANDIDATES`: fetches that PR's source as a GitHub tarball (no `git` dependency), builds it as a container image via an OpenShift binary `Build` (`oc new-build --strategy=docker --binary` + `oc start-build --from-dir=...`) running **inside the target test cluster**, and records the result. +4. A PR with no matching `Depends-On:` line for any configured candidate is a total no-op -- nothing is built, nothing is written, no other step's behavior changes. + +Building runs entirely inside the target cluster as a normal OpenShift `Build` (buildah managed by OCP -- nothing to install locally), landing in that cluster's own internal registry as an `ImageStreamTag`. No external route, insecure-registry marking, or `MachineConfigPool` rollout is needed here, unlike `oadp-operator-sdk-bundle-image`'s `OO_MIRROR_TO_CLUSTER_REGISTRY` -- the only consumer of this image is that same cluster's own kubelet, which already trusts its internal registry natively. + +### Trigger semantics for a multi-repo PR author + +- **Only the triggering PR needs a `Depends-On:` line.** The depended-on PR needs no changes at all -- no reciprocal marker, nothing added to it. +- **One-directional by default.** A `Depends-On:` line on the kdm-controller PR makes *that job* pull in the named kdm-plugin PR. It does not make the kdm-plugin job pull in the controller PR back -- that's a different job reading a different PR's description. For a symmetric combo (both jobs testing both PRs together), add a `Depends-On:` line to *both* PRs, each pointing at the other. +- **Editing it after the PR is already open works.** This step fetches the PR description live from the GitHub API every run, not a cached copy from PR-open time. Add/edit/remove the line, then `/test ` (or `/retest`, or push again) -- the very next run picks up whatever the description says at that moment. +- **A later push to the *depended-on* PR does not auto-retrigger anything.** Only the triggering PR's own presubmit re-run (a new commit, `/retest`, or `/test `) re-resolves, using whatever the depended-on PR's HEAD is at that moment. + +### Worked example: oadp-operator depending on oadp-non-admin + +Say a CRD field is being added in lockstep across two repos: `migtools/oadp-non-admin` PR #456 adds the field to its CRD, and a companion `openshift/oadp-operator` PR #789 updates the DPA-to-CRD sync logic to read it. Neither PR alone is fully testable -- the operator PR's new sync code has nothing to read without the CRD's new field, and the CRD PR alone has no consumer. + +To test them together: add to oadp-operator PR #789's description -- a full PR description might look like this: + +> ## Summary +> +> Reads the new `spec.backupSpec.excludedResources` field on `NonAdminBackup` and +> forwards it to the generated DPA, so non-admin users can exclude resources from +> their own backups the same way cluster-admins already can. +> +> Needs the CRD's own new field, added in a companion oadp-non-admin PR. +> +> Depends-On: https://github.com/migtools/oadp-non-admin/pull/456 +> +> ## Test plan +> +> - [ ] e2e (`oadp-operator`'s `e2e-test-aws`, this PR's Depends-On resolves +> oadp-non-admin#456 automatically) + +`oadp-operator`'s `e2e-test-aws` job then: builds oadp-operator PR #789 (as it always does, via ci-operator's own `OO_INDEX` dependency -- unrelated to Depends-On), notices the Depends-On line matches its `migtools/oadp-non-admin` candidate, builds oadp-non-admin PR #456's source as an image, and (via `oadp-apply-depends-on-images`) patches the Subscription so `RELATED_IMAGE_NON_ADMIN_CONTROLLER` points at that PR-built image instead of whatever the released bundle ships -- before `make test-e2e` runs. The oadp-non-admin PR #456 itself needs no changes -- the `Depends-On:` line can sit anywhere in the description (own paragraph, bullet, wherever reads naturally); the resolver only looks for the line, not its surrounding structure. + +### Environment Variables + +- `OO_INSTALL_NAMESPACE` + - The namespace to build the depended-on image(s) into. Should match the namespace the operator under test is installed into. +- `DEPENDS_ON_CANDIDATES` + - One line per `(repo, image)` pair this job is willing to resolve, `/ []`. Plain text, not JSON -- this image has no guaranteed `jq` (same reasoning as `oadp-operator-sdk-bundle-image`). `` is optional (defaults to `Dockerfile` at the repo root); set it when a repo's own ci-operator config builds with something else (`Dockerfile.ubi`, `Containerfile`, etc). The same repo may appear on more than one line -- a repo producing several images (e.g. `migtools/oadp-vm-file-restore`, which builds 3 separate `RELATED_IMAGE_*` targets from 3 different Dockerfiles) gets its source fetched once and built once per matching line. Add more lines to test more repos (or more images per repo) together in the same job; this script does not change. + - The second field is normally a real `RELATED_IMAGE_*` env var name, but the sentinel value `MANAGER_IMAGE` is special-cased by consumers that install oadp-operator itself (the 4 KDM configs) -- it means "this candidate is oadp-operator's own manager image, not a component oadp-operator deploys," and gets applied by patching the manager Deployment's own container image directly (`oc set image`) instead of a Subscription env var. This resolver step itself treats `MANAGER_IMAGE` like any other value (just writes the line to the manifest); only the *apply* side (KDM's own `set-related-image`) knows what to do with it. Covers oadp-operator PRs that change reconcile logic (e.g. how it builds a managed Deployment's spec) -- an oadp-operator PR that changes RBAC/CSV/CRD manifests still needs the alternate-bundle mechanism described in Known limitations below. + +### Output + +For each resolved candidate, one line is appended to `${SHARED_DIR}/depends-on-images.txt`: ` `. A downstream step (e.g. `oadp-apply-depends-on-images`, or KDM's inline `set-related-image` test step) reads this file and folds each line into its own patch. The file does not exist at all when nothing was resolved. + +## Known limitations + +- **Unauthenticated GitHub API calls**: same as `openstack-k8s-operators-kuttl-commands.sh`, no token is used, so this is subject to GitHub's unauthenticated rate limit (60/hr per IP). Acceptable for now given the existing precedent; would need a credentialed step if this becomes a bottleneck. +- **First real run still pending**: rehearsal only exercises the no-Depends-On (default) path, since no real PR carries the marker yet. The positive path needs a real pair of PRs to verify end-to-end -- one carrying a `Depends-On:` line, the other just existing as a normal open PR (no reciprocal marker needed, per the trigger semantics above) -- e.g. a KDM controller/plugin pair, or an oadp-operator PR against any one of its 17 sibling repos. +- **Always put `Depends-On:` on the oadp-operator PR, never the sibling's, for any scenario touching oadp-operator's own RBAC/CSV/CRD manifests.** `MANAGER_IMAGE` (above) covers reconcile-logic-level oadp-operator dependencies from a *sibling's* job (kdm-controller's own configs use it), but a change to oadp-operator's RBAC/CSV/CRDs themselves isn't a container-image swap at all -- it needs the operator's *own* bundle build, RBAC/CSV/CRDs and all, which only oadp-operator's own `e2e-test-aws` produces natively (via ci-operator's `OO_INDEX` dependency, entirely separate from this resolver). There is no gap here in practice: this resolver is already wired into oadp-operator's own job with `migtools/oadp-non-admin` as one of its candidates, so testing "an oadp-operator PR that changes RBAC together with a companion oadp-non-admin PR" is fully supported today -- just author/edit the **oadp-operator PR's** description with `Depends-On: https://github.com/migtools/oadp-non-admin/pull/` (exactly the worked example above), not the other way around. A sibling repo's own e2e attempting to pull in an unmerged oadp-operator PR directly has no way to build that alternate bundle (see the worked example's own direction) -- don't attempt it from that side. + +## Provenance + +PR-description convention follows `ci-operator/step-registry/openstack-k8s-operators/kuttl/openstack-k8s-operators-kuttl-commands.sh`. Written for [openshift/oadp-operator#2389](https://github.com/openshift/oadp-operator/issues/2389), first wired into the KDM e2e jobs from [openshift/oadp-operator#1832](https://github.com/openshift/oadp-operator/issues/1832) / openshift/release#83049. diff --git a/ci-operator/step-registry/oadp/depends-on-build/oadp-depends-on-build-commands.sh b/ci-operator/step-registry/oadp/depends-on-build/oadp-depends-on-build-commands.sh new file mode 100644 index 0000000000000..39f6b1fdbd7ef --- /dev/null +++ b/ci-operator/step-registry/oadp/depends-on-build/oadp-depends-on-build-commands.sh @@ -0,0 +1,197 @@ +#!/bin/bash + +# Generic N-candidate Depends-On resolver (openshift/oadp-operator#2389), +# following the same PR-description convention already used by +# ci-operator/step-registry/openstack-k8s-operators/kuttl. Unlike that step +# (source checkout only), a resolved dependency here becomes a real pushed +# container image, since downstream needs an actual pullspec (a Kubernetes +# Subscription's RELATED_IMAGE_* override). +# +# ORDER OF OPERATIONS for a multi-repo PR author (e.g. testing a +# kdm-controller PR together with an unmerged kdm-plugin PR): +# +# 1. Open (or already have open) a PR in EACH repo you want tested +# together. +# 2. Only THIS step's OWN triggering PR's description is ever read here -- +# REPO_OWNER/REPO_NAME/PULL_NUMBER below identify it. The repo(s) named +# in its Depends-On line(s) are never asked "do you depend on this PR +# back?" -- a depended-on PR needs ZERO changes, no reciprocal marker, +# nothing added to it at all. +# 3. This is ONE-DIRECTIONAL by default: adding a Depends-On line to +# the kdm-controller PR only makes the kdm-controller job pull in the +# kdm-plugin PR. It does NOT make the kdm-plugin job pull in the +# kdm-controller PR back -- that job resolves Depends-On from ITS OWN +# PR's description, which is a different PR with a different body. +# For a SYMMETRIC combo (both jobs testing both PRs together), add a +# Depends-On line to BOTH PRs, each pointing at the other. +# 4. Depends-On can be added, edited, or removed at any time, including +# well after the PR was first opened -- this step always fetches the +# CURRENT PR body live from the GitHub API (below) at the moment the +# job actually runs, not at PR-open time or from any cached/webhook +# payload. So: add/edit the Depends-On line, then `/test ` +# (or `/retest`, or just push again) -- no special re-trigger dance, +# the very next run picks it up. +# 5. Nothing here re-runs automatically when the DEPENDED-ON PR gets a new +# push -- only the triggering PR's own presubmit re-run (a new commit, +# `/retest`, or an explicit `/test `) re-resolves, and it +# re-resolves to whatever that PR's HEAD is AT THAT MOMENT. + +set -o nounset +set -o errexit +set -o pipefail + +if test -f "${SHARED_DIR}/proxy-conf.sh" +then + # shellcheck disable=SC1090 + source "${SHARED_DIR}/proxy-conf.sh" +fi + +echo "Checking/installing oc..." +if ! command -v oc &> /dev/null; then + curl -L https://openshift-mirror-list.ci-systems.workers.dev/pub/openshift-v4/clients/oc/latest/linux/oc.tar.gz -o /tmp/oc.tar.gz && tar xzvf /tmp/oc.tar.gz -C /tmp + export PATH="/tmp:${PATH}" +fi +oc version --client + +# Prow injects these flat env vars for presubmit jobs directly -- no JSON +# parsing (jq or otherwise) needed to identify the triggering PR. This step +# is only ever wired into presubmit test configs, so requiring them is a +# feature (fails loudly if ever misused from a different job type) rather +# than a limitation. +: "${REPO_OWNER:?REPO_OWNER not set -- oadp-depends-on-build only makes sense on a presubmit}" +: "${REPO_NAME:?REPO_NAME not set -- oadp-depends-on-build only makes sense on a presubmit}" +: "${PULL_NUMBER:?PULL_NUMBER not set -- oadp-depends-on-build only makes sense on a presubmit}" + +# Live fetch, not a cached/webhook copy: this is what makes step 4 above +# ("edit Depends-On after the fact, then /test") work -- every run of this +# step re-reads whatever the PR description says right now. +echo "[$(date --utc +%FT%T.%3NZ)] Fetching PR description for ${REPO_OWNER}/${REPO_NAME}#${PULL_NUMBER}" +PR_JSON=$(curl -sf -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/pulls/${PULL_NUMBER}") + +# Isolate just the JSON "body" field before scanning for Depends-On lines -- +# scanning the raw response risks a false match if the PR TITLE itself +# happens to contain "Depends-On: " text (titles are also present in +# this response). No jq in this image (same reasoning as +# oadp-operator-sdk-bundle-image), so extract the escaped body value with +# grep -P instead of pulling in a full JSON parser for one field -- this +# image already assumes GNU coreutils (the `date --utc` calls throughout +# this script are GNU-only too), and GNU grep's PCRE support is standard on +# the RHEL/UBI base this image is built from. +PR_BODY_ESCAPED=$(printf '%s' "${PR_JSON}" | grep -Po '"body":"(\\.|[^"\\])*"' | head -1) +PR_BODY_ESCAPED="${PR_BODY_ESCAPED#\"body\":\"}" +PR_BODY_ESCAPED="${PR_BODY_ESCAPED%\"}" +DEPENDS_ON_LINES=$(printf '%s' "${PR_BODY_ESCAPED}" | grep -oiE 'depends-on:[^"\\]*https://github\.com/[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+/pull/[0-9]+' || true) + +if [[ -z "${DEPENDS_ON_LINES}" ]]; then + echo "[$(date --utc +%FT%T.%3NZ)] No Depends-On lines found in PR description -- nothing to resolve" + exit 0 +fi + +echo "[$(date --utc +%FT%T.%3NZ)] Found Depends-On line(s):" +echo "${DEPENDS_ON_LINES}" + +RESOLVED_ANY=false +SEEN_URLS="" + +while IFS= read -r line; do + [[ -z "${line}" ]] && continue + DEP_URL=$(printf '%s' "${line}" | grep -oE 'https://github\.com/[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+/pull/[0-9]+') + + # Dedup by exact URL (a PR body accidentally repeating the identical + # Depends-On line), NOT by repo -- one repo can legitimately match + # several DEPENDS_ON_CANDIDATES lines below (e.g. oadp-vm-file-restore + # builds 3 separate images from 3 different Dockerfiles in the same + # repo, each feeding a different RELATED_IMAGE_* var), and all of those + # must be built from this one PR checkout. + if [[ " ${SEEN_URLS} " == *" ${DEP_URL} "* ]]; then + echo "[$(date --utc +%FT%T.%3NZ)] ${DEP_URL} already processed from an earlier identical Depends-On line -- skipping duplicate" + continue + fi + SEEN_URLS="${SEEN_URLS} ${DEP_URL}" + + DEP_REPO=$(printf '%s' "${DEP_URL}" | sed -E 's#https://github\.com/([^/]+/[^/]+)/pull/[0-9]+#\1#') + DEP_PR=$(printf '%s' "${DEP_URL}" | sed -E 's#.*/pull/([0-9]+)#\1#') + + # Collect every DEPENDS_ON_CANDIDATES line naming this repo -- may be + # more than one (see comment above), so this does NOT stop at the + # first match. + MATCHED_CANDIDATES="" + while IFS= read -r CAND_LINE; do + [[ -z "${CAND_LINE}" ]] && continue + CAND_REPO=$(printf '%s' "${CAND_LINE}" | awk '{print $1}') + [[ "${CAND_REPO}" == "${DEP_REPO}" ]] && MATCHED_CANDIDATES="${MATCHED_CANDIDATES}${CAND_LINE} +" + done <<< "${DEPENDS_ON_CANDIDATES}" + + if [[ -z "${MATCHED_CANDIDATES}" ]]; then + echo "[$(date --utc +%FT%T.%3NZ)] Depends-On ${DEP_REPO}#${DEP_PR} found, but ${DEP_REPO} is not a configured candidate for this job -- skipping" + continue + fi + + echo "[$(date --utc +%FT%T.%3NZ)] Fetching ${DEP_REPO}#${DEP_PR} once for $(printf '%s' "${MATCHED_CANDIDATES}" | grep -c .) matching candidate(s)" + SRC_DIR=$(mktemp -d) + TARBALL_URL="https://github.com/${DEP_REPO}/archive/refs/pull/${DEP_PR}/head.tar.gz" + curl -sfL "${TARBALL_URL}" -o /tmp/depends-on-src.tar.gz + tar xzf /tmp/depends-on-src.tar.gz -C "${SRC_DIR}" --strip-components=1 + rm -f /tmp/depends-on-src.tar.gz + + while IFS= read -r CAND_LINE; do + [[ -z "${CAND_LINE}" ]] && continue + # Third field is an optional Dockerfile path relative to the repo + # root, for a repo whose default build target isn't a plain + # "Dockerfile" (e.g. Dockerfile.ubi, Containerfile) -- mirrors that + # repo's own dockerfile_path in its ci-operator config. Defaults to + # "Dockerfile" when omitted. + read -r _ RELATED_ENV CAND_DOCKERFILE <<< "${CAND_LINE}" + CAND_DOCKERFILE="${CAND_DOCKERFILE:-Dockerfile}" + echo "[$(date --utc +%FT%T.%3NZ)] Resolving ${DEP_REPO}#${DEP_PR} (${CAND_DOCKERFILE}) -> ${RELATED_ENV}" + + # Build entirely inside the target test cluster: a normal + # OpenShift binary Build (buildah managed by OCP, nothing to + # install locally) that uploads SRC_DIR as its input and lands the + # result in this cluster's own internal registry as an + # ImageStreamTag. No external route, insecure-registry marking, or + # MachineConfigPool rollout needed -- unlike + # oadp-operator-sdk-bundle-image's OO_MIRROR_TO_CLUSTER_REGISTRY + # dance, the only consumer of this image is this same cluster's + # own kubelet, which already trusts its own internal registry + # natively. + BUILD_NAME="depends-on-$(printf '%s' "${RELATED_ENV}" | tr '[:upper:]_' '[:lower:]-' | tr -c 'a-z0-9-' '-')" + echo "[$(date --utc +%FT%T.%3NZ)] Creating BuildConfig/ImageStream ${BUILD_NAME} in ${OO_INSTALL_NAMESPACE}" + oc new-build --strategy=docker --binary --name="${BUILD_NAME}" -n "${OO_INSTALL_NAMESPACE}" + if [[ "${CAND_DOCKERFILE}" != "Dockerfile" ]]; then + oc patch bc/"${BUILD_NAME}" -n "${OO_INSTALL_NAMESPACE}" --type merge \ + -p "{\"spec\":{\"strategy\":{\"dockerStrategy\":{\"dockerfilePath\":\"${CAND_DOCKERFILE}\"}}}}" + fi + + echo "[$(date --utc +%FT%T.%3NZ)] Starting binary build ${BUILD_NAME} from ${SRC_DIR}" + set +o errexit + oc start-build "${BUILD_NAME}" --from-dir="${SRC_DIR}" --follow --wait -n "${OO_INSTALL_NAMESPACE}" + BUILD_STATUS=$? + set -o errexit + + if [[ "${BUILD_STATUS}" -ne 0 ]]; then + echo "[$(date --utc +%FT%T.%3NZ)] Build ${BUILD_NAME} failed (exit ${BUILD_STATUS}) -- dumping diagnostics" >&2 + oc get build,bc -n "${OO_INSTALL_NAMESPACE}" -l "buildconfig=${BUILD_NAME}" || true + oc logs "bc/${BUILD_NAME}" -n "${OO_INSTALL_NAMESPACE}" --all-containers || true + rm -rf "${SRC_DIR}" + exit "${BUILD_STATUS}" + fi + + IMAGE_REF=$(oc get istag "${BUILD_NAME}:latest" -n "${OO_INSTALL_NAMESPACE}" -o jsonpath='{.image.dockerImageReference}') + if [[ -z "${IMAGE_REF}" ]]; then + echo "[$(date --utc +%FT%T.%3NZ)] Failed to resolve pullspec for ${BUILD_NAME}:latest" >&2 + rm -rf "${SRC_DIR}" + exit 1 + fi + echo "[$(date --utc +%FT%T.%3NZ)] ${DEP_REPO}#${DEP_PR} (${CAND_DOCKERFILE}) built, exposing via ${RELATED_ENV} (pullspec written to ${SHARED_DIR}/depends-on-images.txt, not logged -- internal cluster registry address)" + echo "${RELATED_ENV} ${IMAGE_REF}" >> "${SHARED_DIR}/depends-on-images.txt" + RESOLVED_ANY=true + done <<< "${MATCHED_CANDIDATES}" + rm -rf "${SRC_DIR}" +done <<< "${DEPENDS_ON_LINES}" + +if [[ "${RESOLVED_ANY}" != "true" ]]; then + echo "[$(date --utc +%FT%T.%3NZ)] Depends-On line(s) found, but none matched a configured candidate for this job -- nothing to resolve" +fi diff --git a/ci-operator/step-registry/oadp/depends-on-build/oadp-depends-on-build-ref.metadata.json b/ci-operator/step-registry/oadp/depends-on-build/oadp-depends-on-build-ref.metadata.json new file mode 100644 index 0000000000000..4ac6a969101f7 --- /dev/null +++ b/ci-operator/step-registry/oadp/depends-on-build/oadp-depends-on-build-ref.metadata.json @@ -0,0 +1,22 @@ +{ + "path": "oadp/depends-on-build/oadp-depends-on-build-ref.yaml", + "owners": { + "approvers": [ + "jwmatthews", + "sseago", + "shawn-hurley", + "dymurray", + "shubham-pampattiwar", + "kaovilai", + "mpryc", + "joeavaikath" + ], + "reviewers": [ + "sseago", + "shubham-pampattiwar", + "kaovilai", + "mpryc", + "joeavaikath" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/oadp/depends-on-build/oadp-depends-on-build-ref.yaml b/ci-operator/step-registry/oadp/depends-on-build/oadp-depends-on-build-ref.yaml new file mode 100644 index 0000000000000..f8180e7f75cb4 --- /dev/null +++ b/ci-operator/step-registry/oadp/depends-on-build/oadp-depends-on-build-ref.yaml @@ -0,0 +1,72 @@ +ref: + as: oadp-depends-on-build + from_image: + name: "4.18" + namespace: origin + tag: operator-sdk + commands: oadp-depends-on-build-commands.sh + grace_period: 10m + resources: + requests: + cpu: 300m + memory: 300Mi + env: + - name: OO_INSTALL_NAMESPACE + documentation: The namespace the depended-on image(s) will be built into (via an OpenShift BuildConfig/ImageStream). Should match the namespace the operator under test is installed into, so the resulting ImageStreamTag is reachable by that namespace's Subscription/Deployment. + - name: DEPENDS_ON_CANDIDATES + documentation: |- + One line per (repo, image) pair this job is willing to resolve a + cross-repo dependency for, in the form: + `/ []` + (whitespace-separated fields; plain text, not JSON/YAML -- this image + has no guaranteed `jq`, same reasoning as this repo's other oadp/ + steps). `` is optional and defaults to `Dockerfile` + at the repo root -- set it when a repo's own ci-operator config uses + something else (e.g. `Dockerfile.ubi`, `Containerfile`), matching its + `images.items[].dockerfile_path`. + + The SAME `/` may appear on more than one line: a repo that + builds several images (e.g. one repo producing 3 separate + RELATED_IMAGE_* targets from 3 different Dockerfiles) gets its source + fetched once and built once per matching line. + + The triggering PR's own description is scanned for one or more + `Depends-On: https://github.com///pull/` lines + (Gerrit/Zuul convention, one per line). Any line whose `/` + matches a repo in this list is resolved: that PR's source is + fetched, built as a container image inside the target test cluster, + and one line is appended to `${SHARED_DIR}/depends-on-images.txt` + (` `) per matching line, for a + later step to apply. + + A PR with no matching Depends-On line is a total no-op: no file is + written, nothing downstream changes. Add more lines to test more + repos (or more images per repo) together in one job; this script + does not change. + documentation: |- + Generic N-candidate resolver for openshift/oadp-operator#2389 style + cross-repo "test these unmerged PRs together" scenarios, following the + Depends-On PR-description convention already used by + openstack-k8s-operators-kuttl-commands.sh. Unlike that step (which only + needs a source checkout), a resolved dependency here is built into a + real container image via `oc new-build --strategy=docker --binary` + + `oc start-build --from-dir=...` against the target test cluster, since + downstream consumers (e.g. a Kubernetes Subscription's + RELATED_IMAGE_* override) need an actual pullspec, not just source. + + Building runs entirely inside the target cluster as a normal + OpenShift Build (buildah managed by OCP, nothing to install locally), + with output landing in that cluster's own internal registry as an + ImageStreamTag -- no external route, insecure-registry marking, or + MachineConfigPool rollout is needed, because the only consumer of the + resulting image is that same cluster's own kubelet. + + Consumed by the 4 kubevirt-datamover-controller/-plugin KDM e2e configs + (each declaring exactly 1 candidate: its sibling repo) and by + openshift-oadp-operator's own `e2e-test-aws` (oadp-dev, 5.0 variant), + which declares one candidate per RELATED_IMAGE_* it substitutes into + its bundle (see that config's `operator.substitutions` and + `config/manager/manager.yaml` in openshift/oadp-operator for the + authoritative repo/env-var/dockerfile mapping). Named/structured + generically so any future job can declare more candidates without any + change here.