lburgazzoli commented on code in PR #5573:
URL: https://github.com/apache/camel-k/pull/5573#discussion_r1625445606


##########
e2e/knative/files/setup.sh:
##########
@@ -0,0 +1,244 @@
+#!/bin/bash
+
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+# ---------------------------------------------------------------------------
+
+####
+#
+# This script takes care of Knative setup
+#
+####
+
+KNATIVE_VERSION=1.14.0
+YQ_VERSION=4.44.1
+
+TIMEOUT="150s"
+
+set -e
+
+# Get the os/arch
+ARCH=$(uname -m)
+OS=$(uname -s | tr '[:upper:]' '[:lower:]')
+
+# Check/Install: yq
+#
+
+SUDO=${SUDO:-sudo}
+
+echo -n "Checking yq ... "
+if which yq > /dev/null 2>&1; then
+  echo "ok"
+else
+  yq="yq_${OS}_${ARCH}"
+  echo "installing ${yq}-v${YQ_VERSION}"
+  ${SUDO} wget 
https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/${yq} -O 
/usr/bin/yq && ${SUDO} chmod +x /usr/bin/yq

Review Comment:
   FWIW and probably too late, a way of providing additional software 
(especially if it can be installed by go install) is to install it in the local 
bin folder, as an example 
https://github.com/dapr-sandbox/dapr-kubernetes-operator/blob/main/Makefile#L313-L317.
 
   
   The reason to install a specific version  is that sometime the one provided 
by the os distribution may be outdated and not working as expected.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to