Skip to content

Commit

Permalink
[test] Runs cross platform build to ensure all the checks pass
Browse files Browse the repository at this point in the history
 - Test PR for knative#157
 /hold
  • Loading branch information
navidshaikh committed Nov 6, 2019
1 parent e23488f commit 6147d6c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 3 deletions.
27 changes: 24 additions & 3 deletions openshift/e2e-tests-openshift.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ readonly SERVING_NAMESPACE="knative-serving"
readonly SERVICEMESH_NAMESPACE="istio-system"
readonly E2E_TIMEOUT="60m"
readonly E2E_PARALLEL="1"

readonly CS_NS="openshift-marketplace"
readonly OPERATOR_NS="openshift-operators"
env

function scale_up_workers(){
Expand Down Expand Up @@ -196,7 +197,21 @@ EOF
}

function deploy_serverless_operator(){
oc apply -f openshift/serverless/operator-install.yaml
git clone https://github.com/openshift-knative/serverless-operator.git /tmp/serverless-operator
/tmp/serverless-operator/hack/catalog.sh | oc apply -n $CS_NS -f -
cat <<-EOF | kubectl apply -f -
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: serverless-operator-sub
generateName: serverless-operator-
namespace: $OPERATOR_NS
spec:
source: serverless-operator
sourceNamespace: $CS_NS
name: serverless-operator
channel: techpreview
EOF
}

function enable_knative_interaction_with_registry() {
Expand All @@ -213,7 +228,13 @@ function enable_knative_interaction_with_registry() {

function build_knative_client() {
failed=0
./hack/build.sh -f || failed=1
# run this cross platform build to ensure all the checks pass (as this is done while building artifacts)
./hack/build.sh -x || failed=1

if [[ $failed -eq 0 ]]; then
mv kn-linux-amd64 kn
fi

return $failed
}

Expand Down
14 changes: 14 additions & 0 deletions openshift/serverless/operator-install.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2019 The OpenShift Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: operators.coreos.com/v1
kind: CatalogSourceConfig
metadata:
Expand Down

0 comments on commit 6147d6c

Please sign in to comment.