Skip to content

Commit

Permalink
Align EKB and eventing-core installed versions in e2e tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
creydr committed Mar 15, 2024
1 parent 414a057 commit ac826a0
Showing 1 changed file with 35 additions and 18 deletions.
53 changes: 35 additions & 18 deletions openshift/e2e-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ function timeout() {
}

function install_serverless() {
ekb_tag="$(yq r openshift/project.yaml project.tag)"
ekb_branch=${ekb_tag/knative-nightly/release-next}
ekb_branch=${ekb_branch/knative-v/release-v}

header "Installing Serverless Operator"

cat <<EOF | oc apply -f -
Expand All @@ -71,24 +75,37 @@ EOF
create_tls_secrets || return $?
)

KNATIVE_EVENTING_KAFKA_BROKER_MANIFESTS_DIR="$(pwd)/openshift/release/artifacts"
export KNATIVE_EVENTING_KAFKA_BROKER_MANIFESTS_DIR

local operator_dir=/tmp/serverless-operator
git clone --branch main https://github.com/openshift-knative/serverless-operator.git $operator_dir
export GOPATH=/tmp/go
local failed=0
pushd $operator_dir || return $?
export ON_CLUSTER_BUILDS=true
export DOCKER_REPO_OVERRIDE=image-registry.openshift-image-registry.svc:5000/openshift-marketplace
if [[ ${INSTALL_KEDA} == "true" ]]; then
make OPENSHIFT_CI="true" TRACING_BACKEND=zipkin \
generated-files images install-tracing install-kafka-with-keda || failed=$?
else
make OPENSHIFT_CI="true" TRACING_BACKEND=zipkin \
generated-files images install-tracing install-kafka || failed=$?
fi
popd || return $?
KNATIVE_EVENTING_KAFKA_BROKER_MANIFESTS_DIR="$(pwd)/openshift/release/artifacts"
export KNATIVE_EVENTING_KAFKA_BROKER_MANIFESTS_DIR

local operator_dir=/tmp/serverless-operator
git clone --branch main https://github.com/openshift-knative/serverless-operator.git $operator_dir
export GOPATH=/tmp/go
local failed=0
pushd $operator_dir || return $?
export ON_CLUSTER_BUILDS=true
export DOCKER_REPO_OVERRIDE=image-registry.openshift-image-registry.svc:5000/openshift-marketplace

export OPENSHIFT_CI="true"
export TRACING_BACKEND="zipkin"
export USE_RELEASE_NEXT="false"
if [ "$ekb_branch" = "release-next" ]; then
export USE_RELEASE_NEXT="true"
make generated-files-release-next
else
# use same eventing-core version as for EKB
yq w --inplace "${operator_dir}/olm-catalog/serverless-operator/project.yaml" 'dependencies.eventing' "${ekb_tag}"
yq w --inplace "${operator_dir}/olm-catalog/serverless-operator/project.yaml" 'dependencies.eventing_artifacts_branch' "${ekb_branch}"

make generated-files
fi

if [[ ${INSTALL_KEDA} == "true" ]]; then
make images install-tracing install-kafka-with-keda || failed=$?
else
make images install-tracing install-kafka || failed=$?
fi
popd || return $?

oc apply -f openshift/knative-eventing.yaml
oc wait --for=condition=Ready knativeeventing.operator.knative.dev knative-eventing -n knative-eventing --timeout=900s
Expand Down

0 comments on commit ac826a0

Please sign in to comment.