-
Notifications
You must be signed in to change notification settings - Fork 2.2k
OSAC-793: add nightly full-installation vmaas E2E with Slack notification #79378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| approvers: | ||
| - osac-cicd | ||
| reviewers: | ||
| - osac-cicd |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -o nounset | ||
| set -o errexit | ||
| set -o pipefail | ||
|
|
||
| echo "Running ALL vmaas E2E tests" | ||
|
|
||
| REMOTE_RESULTS_DIR="/tmp/test-results" | ||
|
|
||
| function collect_artifacts() { | ||
| echo "Collecting test artifacts..." | ||
| timeout -s 9 2m scp -F "${SHARED_DIR}/ssh_config" \ | ||
| "ci_machine:${REMOTE_RESULTS_DIR}/junit_vmaas.xml" \ | ||
| "${ARTIFACT_DIR}/junit_vmaas.xml" 2>/dev/null || true | ||
| } | ||
| trap collect_artifacts EXIT | ||
|
|
||
| echo "Collecting deployed component versions..." | ||
| ssh -F "${SHARED_DIR}/ssh_config" ci_machine bash -s "${E2E_NAMESPACE}" <<'VERSION_EOF' > "${SHARED_DIR}/versions.txt" | ||
| KUBECONFIG=$(find ${KUBECONFIG} -type f -print -quit 2>/dev/null) | ||
| NS="$1" | ||
| for deploy in fulfillment-grpc-server fulfillment-controller osac-operator-controller-manager; do | ||
| IMG=$(oc get deploy "${deploy}" -n "${NS}" -o jsonpath='{.spec.template.spec.containers[0].image}' 2>/dev/null) || continue | ||
| echo "${deploy}=${IMG}" | ||
| done | ||
| VERSION_EOF | ||
| echo "Versions written to SHARED_DIR" | ||
|
|
||
| TEST_EXIT=0 | ||
| timeout -s 9 90m ssh -F "${SHARED_DIR}/ssh_config" ci_machine bash -s \ | ||
| "${E2E_NAMESPACE}" \ | ||
| "${E2E_VM_TEMPLATE}" \ | ||
| "${E2E_CLUSTER_TEMPLATE}" \ | ||
| "${OSAC_TEST_IMAGE}" \ | ||
| "${REMOTE_RESULTS_DIR}" \ | ||
| <<'REMOTE_EOF' || TEST_EXIT=$? | ||
| set -euo pipefail | ||
|
|
||
| NAMESPACE="$1" | ||
| VM_TEMPLATE="$2" | ||
| CLUSTER_TEMPLATE="$3" | ||
| TEST_IMAGE="$4" | ||
| RESULTS_DIR="$5" | ||
|
|
||
| mkdir -p "${RESULTS_DIR}" | ||
|
|
||
| KUBECONFIG=$(find ${KUBECONFIG} -type f -print -quit 2>/dev/null) | ||
| [[ -z "${KUBECONFIG}" ]] && echo "ERROR: No kubeconfig found" && exit 1 | ||
|
|
||
| PULL_SECRET_PATH="/root/pull-secret" | ||
|
|
||
| set +x | ||
| podman run --authfile "${PULL_SECRET_PATH}" --rm --network=host \ | ||
| -v "${KUBECONFIG}:/root/.kube/config:z" \ | ||
| -v "${PULL_SECRET_PATH}:/root/pull-secret:z" \ | ||
| -v "${RESULTS_DIR}":/tmp/test-results:z \ | ||
| -e KUBECONFIG=/root/.kube/config \ | ||
| -e OSAC_VM_KUBECONFIG=/root/.kube/config \ | ||
| -e OSAC_NAMESPACE="${NAMESPACE}" \ | ||
| -e OSAC_VM_TEMPLATE="${VM_TEMPLATE}" \ | ||
| -e OSAC_CLUSTER_TEMPLATE="${CLUSTER_TEMPLATE}" \ | ||
| -e OSAC_PULL_SECRET_PATH=/root/pull-secret \ | ||
| "${TEST_IMAGE}" \ | ||
| make test-vmaas | ||
| REMOTE_EOF | ||
|
|
||
| if [[ "${TEST_EXIT}" -ne 0 ]]; then | ||
| echo "FAILED" > "${SHARED_DIR}/test-result" | ||
| echo "Some tests failed (exit code: ${TEST_EXIT})" | ||
| exit "${TEST_EXIT}" | ||
| fi | ||
|
|
||
| echo "PASSED" > "${SHARED_DIR}/test-result" | ||
| echo "All tests passed." |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| ref: | ||
| as: osac-project-baremetal-test-all | ||
| from: dev-scripts | ||
| dependencies: | ||
| - name: osac-test-infra | ||
| env: OSAC_TEST_IMAGE | ||
| grace_period: 10m | ||
| timeout: 2h0m0s | ||
| commands: osac-project-baremetal-test-all-commands.sh | ||
| resources: | ||
| requests: | ||
| cpu: 100m | ||
| memory: 200Mi | ||
| env: | ||
| - name: E2E_NAMESPACE | ||
| default: "osac-e2e-ci" | ||
| documentation: The namespace to use for the e2e tests | ||
| - name: E2E_VM_TEMPLATE | ||
| default: "osac.templates.ocp_virt_vm" | ||
| documentation: The VM template to use for vmaas tests | ||
| - name: E2E_CLUSTER_TEMPLATE | ||
| default: "osac.templates.ocp_4_17_small" | ||
| documentation: The cluster template to use for CaaS tests | ||
| documentation: |- | ||
| Runs all vmaas e2e tests on a full-installation cluster via make test-vmaas. | ||
| Produces JUnit XML for per-test reporting in Prow. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| approvers: | ||
| - osac-cicd | ||
| reviewers: | ||
| - osac-cicd |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -o nounset | ||
| set -o errexit | ||
| set -o pipefail | ||
|
|
||
| echo "************ osac-installer-all-latest commands ************" | ||
| echo "E2E_NAMESPACE: ${E2E_NAMESPACE}" | ||
| echo "E2E_KUSTOMIZE_OVERLAY: ${E2E_KUSTOMIZE_OVERLAY}" | ||
| echo "E2E_VM_TEMPLATE: ${E2E_VM_TEMPLATE}" | ||
| echo "OSAC_INSTALLER_IMAGE: ${OSAC_INSTALLER_IMAGE}" | ||
| echo "FULFILLMENT_IMAGE: ${FULFILLMENT_IMAGE}" | ||
| echo "OPERATOR_IMAGE: ${OPERATOR_IMAGE}" | ||
| echo "AAP_IMAGE: ${AAP_IMAGE}" | ||
| echo "-------------------------------------------" | ||
|
|
||
| base64 -d /var/run/osac-installer-aap/license > /tmp/license.zip | ||
|
|
||
| timeout -s 9 10m scp -F "${SHARED_DIR}/ssh_config" /tmp/license.zip ci_machine:/tmp/license.zip | ||
|
|
||
| timeout -s 9 120m ssh -F "${SHARED_DIR}/ssh_config" ci_machine bash - << EOF|& sed -e 's/.*auths\{0,1\}".*/*** PULL_SECRET ***/g' | ||
| set -euo pipefail | ||
|
|
||
| export KUBECONFIG=\$(find \${KUBECONFIG} -type f -print -quit) | ||
|
|
||
| oc annotate sc lvms-vg1 storageclass.kubernetes.io/is-default-class=true --overwrite | ||
|
|
||
| echo "Waiting for OpenShift Virtualization to be ready..." | ||
| oc wait --for=condition=Available hyperconverged/kubevirt-hyperconverged -n openshift-cnv --timeout=900s | ||
|
|
||
| cat <<NADEOF | oc apply -f - | ||
| apiVersion: k8s.cni.cncf.io/v1 | ||
| kind: NetworkAttachmentDefinition | ||
| metadata: | ||
| name: default | ||
| namespace: openshift-ovn-kubernetes | ||
| spec: | ||
| config: '{"cniVersion": "0.4.0", "name": "ovn-kubernetes", "type": "ovn-k8s-cni-overlay"}' | ||
| NADEOF | ||
|
|
||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| podman run --authfile /root/pull-secret --rm --network=host \ | ||
| -v \${KUBECONFIG}:/root/.kube/config:z \ | ||
| -v /root/pull-secret:/installer/overlays/${E2E_KUSTOMIZE_OVERLAY}/files/quay-pull-secret.json:z \ | ||
| -v /tmp/license.zip:/installer/overlays/${E2E_KUSTOMIZE_OVERLAY}/files/license.zip:z \ | ||
| -e INSTALLER_NAMESPACE=${E2E_NAMESPACE} \ | ||
| -e INSTALLER_KUSTOMIZE_OVERLAY=${E2E_KUSTOMIZE_OVERLAY} \ | ||
| -e INSTALLER_VM_TEMPLATE=${E2E_VM_TEMPLATE} \ | ||
| ${OSAC_INSTALLER_IMAGE} sh -c ' | ||
|
Comment on lines
+41
to
+48
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pass all referenced override vars into the installer container. The in-container script uses Proposed fix podman run --authfile /root/pull-secret --rm --network=host \
-v ${KUBECONFIG}:/root/.kube/config:z \
-v /root/pull-secret:/installer/overlays/${E2E_KUSTOMIZE_OVERLAY}/files/quay-pull-secret.json:z \
-v /tmp/license.zip:/installer/overlays/${E2E_KUSTOMIZE_OVERLAY}/files/license.zip:z \
-e INSTALLER_NAMESPACE=${E2E_NAMESPACE} \
-e INSTALLER_KUSTOMIZE_OVERLAY=${E2E_KUSTOMIZE_OVERLAY} \
-e INSTALLER_VM_TEMPLATE=${E2E_VM_TEMPLATE} \
+-e FULFILLMENT_IMAGE=${FULFILLMENT_IMAGE} \
+-e OPERATOR_IMAGE=${OPERATOR_IMAGE} \
+-e AAP_IMAGE=${AAP_IMAGE} \
+-e E2E_KUSTOMIZE_OVERLAY=${E2E_KUSTOMIZE_OVERLAY} \
${OSAC_INSTALLER_IMAGE} sh -c 'Also applies to: 53-63 🤖 Prompt for AI Agents |
||
| set -euo pipefail | ||
|
|
||
| echo "=== Installing kustomize ===" | ||
| curl -fsSL https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv5.6.0/kustomize_v5.6.0_linux_amd64.tar.gz | tar xzf - -C /usr/local/bin | ||
|
|
||
| echo "=== Overriding fulfillment-service image ===" | ||
| cd /installer/base | ||
| kustomize edit set image ghcr.io/osac-project/fulfillment-service=${FULFILLMENT_IMAGE} | ||
|
|
||
| echo "=== Overriding osac-operator image ===" | ||
| kustomize edit set image ghcr.io/osac-project/osac-operator=${OPERATOR_IMAGE} | ||
|
|
||
| echo "=== Overriding AAP EE image ===" | ||
| cd /installer | ||
| sed -i "s|AAP_EE_IMAGE=.*|AAP_EE_IMAGE=${AAP_IMAGE}|" overlays/${E2E_KUSTOMIZE_OVERLAY}/kustomization.yaml | ||
| sed -i "s|AAP_PROJECT_GIT_BRANCH=.*|AAP_PROJECT_GIT_BRANCH=main|" overlays/${E2E_KUSTOMIZE_OVERLAY}/kustomization.yaml | ||
|
|
||
| echo "=== Running setup.sh with all overrides ===" | ||
| sh scripts/setup.sh | ||
| ' | ||
|
|
||
| EOF | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "path": "osac-project/installer/all-latest/osac-project-installer-all-latest-ref.yaml", | ||
| "owners": { | ||
| "approvers": [ | ||
| "osac-cicd" | ||
| ], | ||
| "reviewers": [ | ||
| "osac-cicd" | ||
| ] | ||
| } | ||
| } |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix test-type mismatch in env var documentation.
Line 23 says
E2E_CLUSTER_TEMPLATEis for “CaaS tests”, but this step is documented/routed as vmaas tests. Please align wording to avoid operator confusion.Also applies to: 25-26
🤖 Prompt for AI Agents