Skip to content

Commit a34e932

Browse files
committed
make repositories of install dependencies configurable
make repositories of dependencies like runc, crun, cni and critools configurable Signed-off-by: Akhil Mohan <[email protected]> (cherry picked from commit 7a0ad09) Signed-off-by: Akhil Mohan <[email protected]>
1 parent fe457eb commit a34e932

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

script/setup/install-cni

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ set -eu -o pipefail
2424
CNI_COMMIT=${1:-$(go list -f "{{.Version}}" -m github.com/containernetworking/plugins)}
2525
CNI_DIR=${DESTDIR:=''}/opt/cni
2626
CNI_CONFIG_DIR=${DESTDIR}/etc/cni/net.d
27+
: "${CNI_REPO:=https://github.com/containernetworking/plugins.git}"
2728

2829
# e2e and Cirrus will fail with "sudo: command not found"
2930
SUDO=''
@@ -32,7 +33,7 @@ if (( $EUID != 0 )); then
3233
fi
3334

3435
TMPROOT=$(mktemp -d)
35-
git clone https://github.com/containernetworking/plugins.git "${TMPROOT}"/plugins
36+
git clone "${CNI_REPO}" "${TMPROOT}"/plugins
3637
pushd "${TMPROOT}"/plugins
3738
git checkout "$CNI_COMMIT"
3839
./build_linux.sh

script/setup/install-critools

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ go install github.com/onsi/ginkgo/v2/[email protected]
3333

3434
: "${CRITEST_COMMIT:=$(cat "${script_dir}/critools-version")}"
3535
: "${DESTDIR:=""}"
36+
: "${CRI_TOOLS_REPO:=https://github.com/kubernetes-sigs/cri-tools.git}"
3637

3738
TMPROOT=$(mktemp -d)
38-
git clone https://github.com/kubernetes-sigs/cri-tools.git "${TMPROOT}/cri-tools"
39+
git clone "${CRI_TOOLS_REPO}" "${TMPROOT}/cri-tools"
3940
pushd "${TMPROOT}"/cri-tools
4041
git checkout "$CRITEST_COMMIT"
4142
make

script/setup/install-runc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ fi
3131
function install_runc() {
3232
# When updating runc-version, consider updating the runc module in go.mod as well
3333
: "${RUNC_VERSION:=$(cat "${script_dir}/runc-version")}"
34+
: "${RUNC_REPO:=https://github.com/opencontainers/runc.git}"
3435

3536
TMPROOT=$(mktemp -d)
36-
git clone https://github.com/opencontainers/runc.git "${TMPROOT}"/runc
37+
git clone "${RUNC_REPO}" "${TMPROOT}"/runc
3738
pushd "${TMPROOT}"/runc
3839
git checkout "${RUNC_VERSION}"
3940
make BUILDTAGS='seccomp' runc
@@ -44,7 +45,8 @@ function install_runc() {
4445

4546
function install_crun() {
4647
: "${CRUN_VERSION:=$(cat "${script_dir}/crun-version")}"
47-
$SUDO curl -S -o /usr/local/sbin/runc -L https://github.com/containers/crun/releases/download/"${CRUN_VERSION}"/crun-"${CRUN_VERSION}"-linux-"$(go env GOARCH)"
48+
: "${CRUN_REPO:=https://github.com/containers/crun}"
49+
$SUDO curl -S -o /usr/local/sbin/runc -L "${CRUN_REPO}"/releases/download/"${CRUN_VERSION}"/crun-"${CRUN_VERSION}"-linux-"$(go env GOARCH)"
4850
$SUDO chmod +x /usr/local/sbin/runc
4951
}
5052

0 commit comments

Comments
 (0)