This is an automated email from the ASF dual-hosted git repository.

chia7712 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yunikorn-k8shim.git


The following commit(s) were added to refs/heads/master by this push:
     new a59fd1c8 [YUNIKORN-2560] Download ginkgo to tools folder (#820)
a59fd1c8 is described below

commit a59fd1c84d197de8d1c3ac0f6a378cfa314e08ee
Author: YUN SUN <yun.sun7...@gmail.com>
AuthorDate: Thu Apr 18 00:51:56 2024 +0800

    [YUNIKORN-2560] Download ginkgo to tools folder (#820)
    
    Closes: #820
    
    Signed-off-by: Chia-Ping Tsai <chia7...@gmail.com>
---
 Makefile                 | 10 +++++++++-
 scripts/run-e2e-tests.sh | 17 ++++++-----------
 2 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/Makefile b/Makefile
index e566f0ee..76a99f8d 100644
--- a/Makefile
+++ b/Makefile
@@ -174,6 +174,9 @@ export 
SPARK_PYTHON_IMAGE=docker.io/apache/spark-py:v$(SPARK_PYTHON_VERSION)
 GO_LICENSES_VERSION=v1.6.0
 GO_LICENSES_BIN=$(TOOLS_DIR)/go-licenses
 
+# ginkgo
+GINKGO_BIN=$(TOOLS_DIR)/ginkgo
+
 FLAG_PREFIX=github.com/apache/yunikorn-k8shim/pkg/conf
 
 # Image hashes
@@ -219,7 +222,7 @@ conf/scheduler-config-local.yaml: conf/scheduler-config.yaml
 
 # Install tools
 .PHONY: tools
-tools: $(SHELLCHECK_BIN) $(GOLANGCI_LINT_BIN) $(KUBECTL_BIN) $(KIND_BIN) 
$(HELM_BIN) $(SPARK_SUBMIT_CMD) $(GO_LICENSES_BIN)
+tools: $(SHELLCHECK_BIN) $(GOLANGCI_LINT_BIN) $(KUBECTL_BIN) $(KIND_BIN) 
$(HELM_BIN) $(SPARK_SUBMIT_CMD) $(GO_LICENSES_BIN) $(GINKGO_BIN)
 
 # Install shellcheck
 $(SHELLCHECK_BIN):
@@ -273,6 +276,11 @@ $(GO_LICENSES_BIN):
        @mkdir -p "$(TOOLS_DIR)"
        @GOBIN="$(BASE_DIR)/$(TOOLS_DIR)" "$(GO)" install 
"github.com/google/go-licenses@$(GO_LICENSES_VERSION)"
 
+$(GINKGO_BIN):
+       @echo "installing ginkgo"
+       @mkdir -p "$(TOOLS_DIR)"
+       @GOBIN="$(BASE_DIR)/$(TOOLS_DIR)" "$(GO)" install 
"github.com/onsi/ginkgo/v2/ginkgo"
+
 # Run lint against the previous commit for PR and branch build
 # In dev setup look at all changes on top of master
 .PHONY: lint
diff --git a/scripts/run-e2e-tests.sh b/scripts/run-e2e-tests.sh
index ce3cad1e..8f1d493e 100755
--- a/scripts/run-e2e-tests.sh
+++ b/scripts/run-e2e-tests.sh
@@ -76,12 +76,12 @@ function install_tools() {
 }
 
 function install_cluster() {
-  echo "step 1/7: checking required configuration"
+  echo "step 1/6: checking required configuration"
   if [ ! -r "${KIND_CONFIG}" ]; then
     exit_on_error "kind config not found: ${KIND_CONFIG}"
   fi
 
-  echo "step 2/7: install tools"
+  echo "step 2/6: install tools"
   install_tools
 
   # use latest helm charts from the release repo to install yunikorn unless 
path is provided
@@ -95,20 +95,15 @@ function install_cluster() {
   fi
 
   # build docker images from latest code, so that we can install yunikorn with 
these latest images
-  echo "step 3/7: building docker images from latest code"
+  echo "step 3/6: building docker images from latest code"
   check_docker
   QUIET="--quiet" REGISTRY=local VERSION=latest make image
   exit_on_error "build docker images failed"
   QUIET="--quiet" REGISTRY=local VERSION=latest make webtest_image
   exit_on_error "build test web images failed"
 
-  # install ginkgo and gomega for e2e tests.
-  echo "step 4/7: installing Ginkgo & Gomega at $("${GO}" env GOPATH)/bin"
-  "${GO}" install github.com/onsi/ginkgo/v2/ginkgo
-  check_cmd "ginkgo"
-
   # create K8s cluster
-  echo "step 5/7: installing K8s cluster using kind"
+  echo "step 4/6: installing K8s cluster using kind"
   "${KIND}" create cluster --name "${CLUSTER_NAME}" --image 
"${CLUSTER_VERSION}" --config="${KIND_CONFIG}"
   exit_on_error "install K8s cluster failed"
   "${KUBECTL}" cluster-info --context kind-"${CLUSTER_NAME}"
@@ -119,7 +114,7 @@ function install_cluster() {
   "${KUBECTL}" describe nodes
 
   # pre-load yunikorn docker images to kind
-  echo "step 6/7: pre-load yunikorn images"
+  echo "step 5/6: pre-load yunikorn images"
   "${KIND}" load docker-image "local/yunikorn:${SCHEDULER_IMAGE}" --name 
"${CLUSTER_NAME}"
   exit_on_error "pre-load scheduler image failed: ${SCHEDULER_IMAGE}"
   "${KIND}" load docker-image "local/yunikorn:${ADMISSION_IMAGE}" --name 
"${CLUSTER_NAME}"
@@ -127,7 +122,7 @@ function install_cluster() {
   "${KIND}" load docker-image "local/yunikorn:${WEBTEST_IMAGE}" --name 
"${CLUSTER_NAME}"
   exit_on_error "pre-load web image failed: ${WEBTEST_IMAGE}"
 
-  echo "step 7/7: installing yunikorn"
+  echo "step 6/6: installing yunikorn"
   "${HELM}" install yunikorn "${CHART_PATH}" --namespace yunikorn \
     --set image.repository=local/yunikorn \
     --set image.tag="${SCHEDULER_IMAGE}" \


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@yunikorn.apache.org
For additional commands, e-mail: issues-h...@yunikorn.apache.org

Reply via email to