Skip to content

Commit

Permalink
adapted build and test scripts for new go version
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshu-kun committed May 26, 2022
1 parent 53c9f33 commit df517c4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
11 changes: 7 additions & 4 deletions .ci/build
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,20 @@ fi

# If no LOCAL_BUILD environment variable is set, we configure the `go build` command
# to build for linux OS, amd64 architectures and without CGO enablement.
BINARY_PATH=${BINARY_PATH}/cluster-autoscaler
cd "${BINARY_PATH}"

if [[ -z "$LOCAL_BUILD" ]]; then
go build \
-a \
-v \
-o ${BINARY_PATH}/cluster-autoscaler/cluster-autoscaler \
cluster-autoscaler/main.go
-o cluster-autoscaler \
main.go

# If the LOCAL_BUILD environment variable is set, we simply run `go build`.
else
go build \
-v \
-o ${BINARY_PATH}/cluster-autoscaler/cluster-autoscaler \
cluster-autoscaler/main.go
-o cluster-autoscaler \
main.go
fi
6 changes: 4 additions & 2 deletions .ci/test
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ fi

##############################################################################

go test $(go list ./cluster-autoscaler/... | grep -v cloudprovider | grep -v vendor | grep -v integration)
go test $(go list ./cluster-autoscaler/cloudprovider/mcm/... | grep -v vendor)
cd cluster-autoscaler

go test $(go list ./... | grep -v cloudprovider | grep -v vendor | grep -v integration)
go test $(go list ./cloudprovider/mcm/... | grep -v vendor | grep -v integration)

#TODO: Return success failure properly
echo "CI tests are done"
4 changes: 2 additions & 2 deletions cluster-autoscaler/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -1065,8 +1065,8 @@ Once script is successfully executed, execute following commands to confirm the
git status
# Try following steps to confirm the correctness.
go test $(go list ../cluster-autoscaler/... | grep -v cloudprovider | grep -v vendor)
go test $(go list ../cluster-autoscaler/cloudprovider/mcm/... | grep -v vendor)
go test $(go list ../cluster-autoscaler/... | grep -v cloudprovider | grep -v vendor | grep -v integration)
go test $(go list ../cluster-autoscaler/cloudprovider/mcm/... | grep -v vendor | grep -v integration)
go build main.go
go run main.go --kubeconfig=kubeconfig.yaml --cloud-provider=mcm --nodes=0:3:ca-test.test-machine-deployment
Expand Down

0 comments on commit df517c4

Please sign in to comment.