Skip to content

Commit 11a32ef

Browse files
committed
hack ci jobs to use a custom kube version
1 parent e6c3d13 commit 11a32ef

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

hack/check-everything.sh

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

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

0 commit comments

Comments
 (0)