diff --git a/.ci/build.sh b/.ci/build.sh index 37a26d027e1cb..00f61ceefe291 100755 --- a/.ci/build.sh +++ b/.ci/build.sh @@ -1,5 +1,8 @@ source ~/.bashrc GO_VERSION=${GO_VERSION:-1.19} +VERSION=$(git describe --tags --abbrev=0) +MAJOR_MINOR_PATCH=$(echo $VERSION | cut -d'-' -f1) +BUILD_NUMBER=${BUILD_NUMBER:-000} configure_go() { if [ -n "${USE_SYSTEM_GO:-}" ] ; then @@ -15,4 +18,4 @@ configure_go() { configure_go -KUBE_BUILD_PLATFORMS=linux/amd64 make all WHAT=cmd/kubelet GOFLAGS=-v \ No newline at end of file +make WHAT=cmd/kubelet KUBE_GIT_VERSION=$MAJOR_MINOR_PATCH-emp.$BUILD_NUMBER KUBE_GIT_COMMIT=$(git rev-parse HEAD) KUBE_GIT_TREE_STATE="clean" GOFLAGS=-v \ No newline at end of file