Skip to content

Commit ba4f8d8

Browse files
committed
hack ci jobs to use a custom kube version
1 parent aa78068 commit ba4f8d8

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

hack/check-everything.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,32 @@ tmp_bin=/tmp/cr-tests-bin
4141
)
4242
export KUBEBUILDER_ASSETS="$(${tmp_bin}/setup-envtest use --use-env -p path "${ENVTEST_K8S_VERSION}")"
4343

44+
# HACK
45+
k8s_clone_dir=$tmp_root/kubernetes
46+
(
47+
k8s_repo_url=https://github.com/kubernetes/kubernetes.git
48+
49+
echo "Cloning Kube repository from $k8s_repo_url..."
50+
git clone $k8s_repo_url $k8s_clone_dir
51+
52+
cd $k8s_clone_dir
53+
echo "Building Kube from source code..."
54+
make
55+
)
56+
k8s_bin_dir=$(
57+
k8s_output_dir=${k8s_clone_dir}/_output/local/go/bin
58+
if [ -d "${k8s_output_dir}" ]; then
59+
cd ${k8s_output_dir}
60+
pwd
61+
else
62+
echo "Directory ${k8s_output_dir} does not exist."
63+
exit 1
64+
fi
65+
)
66+
echo "Replacing kube-apiserver binary from ${k8s_bin_dir} to ${KUBEBUILDER_ASSETS}"
67+
cp -f "${k8s_bin_dir}/kube-apiserver" "${KUBEBUILDER_ASSETS}/kube-apiserver"
68+
# END OF HACK
69+
4470
# Run tests.
4571
${hack_dir}/test-all.sh
4672

0 commit comments

Comments
 (0)