File tree Expand file tree Collapse file tree
ci-operator/step-registry/rosa/operator Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717
1818# Get cluster access: prefer shared kubeconfig from provision step,
1919# fall back to backplane for persistent clusters
20- if [[ -f " ${SHARED_DIR} /kubeconfig" ]]; then
20+ if [[ -n " ${SHARED_DIR :- } " && - f " ${SHARED_DIR} /kubeconfig" ]]; then
2121 log " Using kubeconfig from provision step"
2222 export KUBECONFIG=" ${SHARED_DIR} /kubeconfig"
2323elif [[ -n " ${OPERATOR_E2E_CLUSTER_ID:- } " ]]; then
@@ -50,14 +50,14 @@ log "Connected to cluster: $(oc whoami --show-server)"
5050
5151# Run the operator e2e tests
5252JUNIT_REPORT=" ${ARTIFACT_DIR} /junit-${OPERATOR_NAME} -e2e.xml"
53- GINKGO_FLAGS= " --ginkgo.junit-report=${JUNIT_REPORT} --ginkgo.v"
53+ GINKGO_ARGS=( " --ginkgo.junit-report=${JUNIT_REPORT} " " --ginkgo.v" )
5454
5555if [[ -n " ${GINKGO_LABEL_FILTER:- } " ]]; then
56- GINKGO_FLAGS= " ${GINKGO_FLAGS} --ginkgo.label-filter=${GINKGO_LABEL_FILTER} "
56+ GINKGO_ARGS+=( " --ginkgo.label-filter=${GINKGO_LABEL_FILTER} " )
5757fi
5858
5959log " Running ${OPERATOR_NAME} e2e tests..."
60- /usr/local/bin/e2e.test ${GINKGO_FLAGS} || {
60+ /usr/local/bin/e2e.test " ${GINKGO_ARGS[@]} " || {
6161 log " Tests failed. JUnit report at ${JUNIT_REPORT} "
6262 exit 1
6363}
Original file line number Diff line number Diff line change 1111}
1212
1313# Use shared kubeconfig from provision step if available
14- if [[ -f " ${SHARED_DIR} /kubeconfig" ]]; then
14+ if [[ -n " ${SHARED_DIR :- } " && - f " ${SHARED_DIR} /kubeconfig" ]]; then
1515 export KUBECONFIG=" ${SHARED_DIR} /kubeconfig"
1616fi
1717
@@ -31,6 +31,7 @@ if [[ -z "${OPERATOR_IMAGE:-}" ]]; then
3131fi
3232
3333OPERATOR_NAMESPACE=" ${OPERATOR_NAMESPACE:- openshift-${OPERATOR_NAME} } "
34+ OPERATOR_DEPLOYMENT_NAME=" ${OPERATOR_DEPLOYMENT_NAME:- ${OPERATOR_NAME} } "
3435
3536log " Installing ${OPERATOR_NAME} via PKO ClusterPackage"
3637log " PKO image: ${OPERATOR_PKO_IMAGE} "
6162EOF
6263
6364# Wait for the operator deployment to be available
64- log " Waiting for ${OPERATOR_NAME} deployment to be ready..."
65- oc wait deployment " ${OPERATOR_NAME } " \
65+ log " Waiting for deployment ${OPERATOR_DEPLOYMENT_NAME} to be ready..."
66+ oc wait deployment " ${OPERATOR_DEPLOYMENT_NAME } " \
6667 -n " ${OPERATOR_NAMESPACE} " \
6768 --for=condition=Available \
6869 --timeout=300s
Original file line number Diff line number Diff line change 2121 - name : OPERATOR_NAMESPACE
2222 default : " "
2323 documentation : Namespace for the operator. Defaults to openshift-<OPERATOR_NAME>.
24+ - name : OPERATOR_DEPLOYMENT_NAME
25+ default : " "
26+ documentation : Name of the deployment to wait on. Defaults to OPERATOR_NAME.
2427 - name : OPERATOR_CRD_DIR
2528 default : " "
2629 documentation : Path to directory containing CRD manifests to pre-apply. Optional.
You can’t perform that action at this time.
0 commit comments