Skip to content

Commit

Permalink
[release-v0.19.1] chore: Add ppc64 to cross build (knative#584)
Browse files Browse the repository at this point in the history
* chore: Add ppc64 to cross build

* fix: Use serving from release branch

* fix: Use serverless operator release branch
  • Loading branch information
dsimansk authored Jan 25, 2021
1 parent 28dee37 commit 1a621da
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 7 deletions.
2 changes: 2 additions & 0 deletions hack/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ cross_build() {
GOOS=windows GOARCH=amd64 go build -mod=vendor -ldflags "${ld_flags}" -o ./kn-windows-amd64.exe ./cmd/... || failed=1
echo " Z kn-linux-s390x"
GOOS=linux GOARCH=s390x go build -mod=vendor -ldflags "${ld_flags}" -o ./kn-linux-s390x ./cmd/... || failed=1
echo " P kn-linux-ppc64le"
GOOS=linux GOARCH=ppc64le go build -mod=vendor -ldflags "${ld_flags}" -o ./kn-linux-ppc64le ./cmd/... || failed=1

return ${failed}
}
Expand Down
40 changes: 39 additions & 1 deletion openshift/e2e-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ readonly OLM_NAMESPACE="openshift-marketplace"

# if you want to setup the nightly serving/eventing, set `release-next` OR
# set release branch name for example: release-v0.19.1
readonly SERVING_BRANCH="release-next"
readonly SERVING_BRANCH="release-v0.19.0"
# Pin the version due to issue in current nightly version
readonly EVENTING_BRANCH="release-v0.19.2"

Expand Down Expand Up @@ -190,6 +190,44 @@ install_knative_eventing_branch() {
popd
}

install_serverless_operator_branch() {
local branch=$1
local operator_dir=/tmp/serverless-operator
local failed=0
header "Installing serverless operator from openshift-knative/serverless-operator branch $branch"
rm -rf $operator_dir
git clone --branch $branch https://github.com/openshift-knative/serverless-operator.git $operator_dir || failed=1
pushd $operator_dir
# unset OPENSHIFT_BUILD_NAMESPACE (old CI) and OPENSHIFT_CI (new CI) as its used in serverless-operator's CI
# environment as a switch to use CI built images, we want pre-built images of k-s-o and k-o-i
unset OPENSHIFT_BUILD_NAMESPACE
unset OPENSHIFT_CI

# Replace deprecated registry.svc.ci with registry.ci until release branch is fixed
sed -i 's|registry.svc.ci.openshift.org/openshift/openshift-serverless-v1.13.0|registry.ci.openshift.org/openshift/openshift-serverless-v1.13.0|g' olm-catalog/serverless-operator/manifests/serverless-operator.clusterserviceversion.yaml
cat olm-catalog/serverless-operator/manifests/serverless-operator.clusterserviceversion.yaml

# Install all components Serving,Eventing,Strimzi and Kafka
SCALE_UP=6 make install || failed=1
subheader "Successfully installed serverless operator."

# header "Applying Strimzi Topic CR"
# cat <<-EOF | oc apply -n kafka -f - || failed=1
#apiVersion: kafka.strimzi.io/v1beta1
#kind: KafkaTopic
#metadata:
# name: test-topic
# labels:
# strimzi.io/cluster: my-cluster
#spec:
# partitions: 100
# replicas: 1
#EOF

popd
return $failed
}

# Add to exec script if needed
resources_debug() {
echo ">> Check resources"
Expand Down
9 changes: 3 additions & 6 deletions openshift/e2e-tests-openshift.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@ failed=0
# Build binary
(( !failed )) && build_knative_client || failed=1
# Run unit tests
# Temp disabled due to running into OOM
# (( !failed )) && run_unit_tests || failed=1
# Serving setup & tests
(( !failed )) && install_knative_serving_branch "${SERVING_BRANCH}" || failed=1
(( !failed )) && run_unit_tests || failed=1
# Serverless operator setup & tests
(( !failed )) && install_serverless_operator_branch "release-1.13" || failed=1
(( !failed )) && run_client_e2e_tests serving || failed=1
# Eventing setup & tests
(( !failed )) && install_knative_eventing_branch "${EVENTING_BRANCH}" || failed=1
(( !failed )) && run_client_e2e_tests eventing || failed=1

(( failed )) && exit 1
Expand Down

0 comments on commit 1a621da

Please sign in to comment.