Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ images:
- destination_dir: .
source_path: /tmp/osac
to: osac-cli
- dockerfile_path: Containerfile
to: fulfillment-service
- dockerfile_path: Containerfile
to: fulfillment-service-pr
- dockerfile_literal: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,22 @@ base_images:
name: test
namespace: ocp-kni
tag: dev-scripts
fulfillment-service:
name: latest
namespace: osac-project
tag: fulfillment-service
osac-aap:
name: latest
namespace: osac-project
tag: osac-aap
osac-installer:
name: latest
namespace: osac-project
tag: osac-installer
osac-operator:
name: latest
namespace: osac-project
tag: osac-operator
build_root:
image_stream_tag:
name: release
Expand Down Expand Up @@ -67,6 +79,23 @@ tests:
- intranet
steps:
workflow: osac-project-cluster-tool-vmaas
- as: nightly-e2e-vmaas
capabilities:
- intranet
cron: 0 3 * * *
steps:
cluster_profile: packet-assisted
env:
ASSISTED_CONFIG: |
OLM_OPERATORS=cnv,lvm
NUM_MASTERS=1
NUM_WORKERS=0
MASTER_MEMORY=65536
MASTER_DISK_COUNT=2
MASTER_DISK=200000000000
MASTER_CPU=24
OPENSHIFT_VERSION=4.20
workflow: osac-project-ofcir-baremetal-nightly
- as: e2e-metal-vmaas-compute-instance-creation
capabilities:
- intranet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -679,3 +679,88 @@ periodics:
- name: result-aggregator
secret:
secretName: result-aggregator
- agent: kubernetes
cluster: build03
cron: 0 3 * * *
decorate: true
decoration_config:
sparse_checkout_files:
- Containerfile
extra_refs:
- base_ref: main
org: osac-project
repo: osac-test-infra
sparse_checkout_files:
- Containerfile
labels:
capability/intranet: intranet
ci-operator.openshift.io/cloud: packet-edge
ci-operator.openshift.io/cloud-cluster-profile: packet-assisted
ci.openshift.io/generator: prowgen
job-release: "4.20"
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: periodic-ci-osac-project-osac-test-infra-main-nightly-e2e-vmaas
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=nightly-e2e-vmaas
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
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
@@ -1,5 +1,5 @@
{
"path": "osac-project/installer/component/osac-project-installer-component-ref.yaml",
"path": "osac-project/baremetal/test-all/osac-project-baremetal-test-all-ref.yaml",
"owners": {
"approvers": [
"osac-cicd"
Expand Down
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
Comment on lines +21 to +23
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix test-type mismatch in env var documentation.

Line 23 says E2E_CLUSTER_TEMPLATE is 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
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@ci-operator/step-registry/osac-project/baremetal/test-all/osac-project-baremetal-test-all-ref.yaml`
around lines 21 - 23, The env var documentation for E2E_CLUSTER_TEMPLATE
currently references “CaaS tests” but this step is for vmaas tests; update the
documentation string for E2E_CLUSTER_TEMPLATE (and the other similar entries
around it) to reference “vmaas tests” (or otherwise match the step routing) so
the env var description aligns with the step’s test-type; locate occurrences of
E2E_CLUSTER_TEMPLATE and the adjacent variable docs and replace “CaaS tests”
with “vmaas tests” (or a consistent vmaas-specific phrase).

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

Comment thread
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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Pass all referenced override vars into the installer container.

The in-container script uses FULFILLMENT_IMAGE, OPERATOR_IMAGE, AAP_IMAGE, and E2E_KUSTOMIZE_OVERLAY, but they are not passed via podman run -e. With set -u enabled inside the container, this will fail before setup completes.

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
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@ci-operator/step-registry/osac-project/installer/all-latest/osac-project-installer-all-latest-commands.sh`
around lines 40 - 47, The podman run invocation that starts the installer
container does not export required environment variables (FULFILLMENT_IMAGE,
OPERATOR_IMAGE, AAP_IMAGE, and E2E_KUSTOMIZE_OVERLAY) into the container,
causing failures when the in-container script (run with set -u) references them;
update the podman run commands (the block that constructs the container
invocation and the similar block around lines 53-63) to pass these variables via
-e FULFILLMENT_IMAGE=${FULFILLMENT_IMAGE} -e OPERATOR_IMAGE=${OPERATOR_IMAGE} -e
AAP_IMAGE=${AAP_IMAGE} and ensure E2E_KUSTOMIZE_OVERLAY is also exported with -e
E2E_KUSTOMIZE_OVERLAY=${E2E_KUSTOMIZE_OVERLAY} so the installer script can read
them inside the container.

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"
]
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
ref:
as: osac-project-installer-component
as: osac-project-installer-all-latest
from: dev-scripts
dependencies:
- name: osac-installer
env: OSAC_INSTALLER_IMAGE
- name: component-image
env: COMPONENT_IMAGE
- name: fulfillment-service
env: FULFILLMENT_IMAGE
- name: osac-operator
env: OPERATOR_IMAGE
- name: osac-aap
env: AAP_IMAGE
grace_period: 10m
timeout: 3h0m0s
commands: osac-project-installer-component-commands.sh
commands: osac-project-installer-all-latest-commands.sh
resources:
requests:
cpu: 100m
Expand All @@ -27,8 +31,7 @@ ref:
- name: E2E_VM_TEMPLATE
default: "osac.templates.ocp_virt_vm"
documentation: The template to use for the e2e tests
- name: COMPONENT_IMAGE_NAME
documentation: The image name in base/kustomization.yaml to replace (e.g. ghcr.io/osac-project/fulfillment-service)
- name: AAP_EE_IMAGE_OVERRIDE
default: ""
documentation: If non-empty, also override AAP_EE_IMAGE in the overlay kustomization to use COMPONENT_IMAGE
documentation: |-
Installs OSAC with all component images overridden to their latest
CI-built versions. Swaps fulfillment-service, osac-operator, and
osac-aap (EE image + git branch) before running setup.sh.

This file was deleted.

Loading