-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[YUNIKORN-1865] Update build process to follow standard conventions
- Moved (source) Dockerfiles to docker/{component} - Changed output directory from _output/ to build/ - All development binaries write to build/dev/ - All production binaries write to build/bin/ - All Docker images are build using build/docker/{component} as a buildroot - Rename scheduler binary to yunikorn-scheduler - Rename plugin binary to yunikorn-scheduler-plugin - Rename admission controller binary to yunikorn-admission-controller - Allow setting GO environment variable to the name of an alternative compiler (i.e. GO=go1.20.5) - Update Makefile to use proper dependencies so that build steps can be cached
- Loading branch information
1 parent
2ab4fc4
commit 85a0d62
Showing
15 changed files
with
235 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,5 @@ jobs: | |
run: make test | ||
- name: Code coverage | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
files: build/coverage.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ | |
|
||
set -e | ||
|
||
WORKDIR=$(pwd)/_output/fsm | ||
WORKDIR=$(pwd)/build/fsm | ||
|
||
output_fsm() { | ||
# print digraph header | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,8 @@ | |
HELM=tools/helm | ||
KIND=tools/kind | ||
KUBECTL=tools/kubectl | ||
GO="${GO:-go}" | ||
export GO | ||
|
||
function check_cmd() { | ||
CMD=$1 | ||
|
@@ -84,7 +86,8 @@ function install_cluster() { | |
# use latest helm charts from the release repo to install yunikorn unless path is provided | ||
if [ "${GIT_CLONE}" = "true" ]; then | ||
check_cmd "git" | ||
git clone --depth 1 https://github.com/apache/yunikorn-release.git ./yunikorn-release | ||
rm -rf ./build/yunikorn-release | ||
git clone --depth 1 https://github.com/apache/yunikorn-release.git ./build/yunikorn-release | ||
fi | ||
if [ ! -d "${CHART_PATH}" ]; then | ||
exit_on_error "helm charts not found in path: ${CHART_PATH}" | ||
|
@@ -99,8 +102,8 @@ function install_cluster() { | |
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/[email protected] | ||
echo "step 4/7: installing Ginkgo & Gomega at $("${GO}" env GOPATH)/bin" | ||
"${GO}" install github.com/onsi/ginkgo/v2/[email protected] | ||
check_cmd "ginkgo" | ||
|
||
# create K8s cluster | ||
|
@@ -165,18 +168,19 @@ Examples: | |
${NAME} -a test -n yk8s -v kindest/node:v1.27.3 | ||
Use a local helm chart path: | ||
${NAME} -a test -n yk8s -v kindest/node:v1.27.3 -p ./yunikorn-release/helm-charts/yunikorn | ||
${NAME} -a test -n yk8s -v kindest/node:v1.27.3 -p ../yunikorn-release/helm-charts/yunikorn | ||
EOF | ||
} | ||
|
||
# setup architectures and OS type | ||
check_cmd "${GO}" | ||
check_cmd "make" | ||
eval "$(make arch)" | ||
OS=$(uname -s | tr '[:upper:]' '[:lower:]') | ||
check_os | ||
|
||
KIND_CONFIG=./scripts/kind.yaml | ||
CHART_PATH="./yunikorn-release/helm-charts/yunikorn" | ||
CHART_PATH="./build/yunikorn-release/helm-charts/yunikorn" | ||
GIT_CLONE=true | ||
SCHEDULER_IMAGE="scheduler-${DOCKER_ARCH}-latest" | ||
ADMISSION_IMAGE="admission-${DOCKER_ARCH}-latest" | ||
|
@@ -247,7 +251,7 @@ check_opt "kind-cluster-name" "${CLUSTER_NAME}" | |
# - delete k8s cluster | ||
if [ "${ACTION}" == "test" ]; then | ||
# make will fail without go installed but we call it before that... | ||
check_cmd "go" | ||
check_cmd "${GO}" | ||
check_opt "kind-node-image-version" "${CLUSTER_VERSION}" | ||
check_opt "chart-path" "${CHART_PATH}" | ||
install_cluster | ||
|