Skip to content

Commit

Permalink
Install cri-tools and runc from their main branches
Browse files Browse the repository at this point in the history
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
  • Loading branch information
saschagrunert committed Apr 26, 2024
1 parent 0650d0e commit 60242bc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
36 changes: 19 additions & 17 deletions scripts/github-actions-setup
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ prepare_system() {
sudo systemctl restart systemd-journald
}

install_from_github_org_repo() {
URL=https://github.com/$1/$2
DIR=$(mktemp -ud)

git clone "$URL" "$DIR"
pushd "$DIR"
"${@:3}"
popd
sudo rm -rf "$DIR"
}

install_bats() {
git clone https://github.com/bats-core/bats-core
pushd bats-core
Expand All @@ -82,14 +93,11 @@ install_conmonrs() {
}

install_critools() {
URL=https://github.com/kubernetes-sigs/cri-tools
install_from_github_org_repo \
kubernetes-sigs \
cri-tools \
sudo -E PATH="$PATH" make BINDIR=/usr/bin install

git clone $URL
pushd cri-tools
git checkout "${VERSIONS["cri-tools"]}"
sudo -E PATH="$PATH" make BINDIR=/usr/bin install
popd
sudo rm -rf cri-tools
sudo critest --version
sudo crictl --version
}
Expand All @@ -106,16 +114,10 @@ install_cni_plugins() {
}

install_runc() {
URL=https://github.com/opencontainers/runc/releases/download/"${VERSIONS["runc"]}"
BINARY=/usr/sbin/runc
sudo wget -O "$BINARY" "$URL/runc.$GOARCH"
sudo chmod +x "$BINARY"

# Verify the SHA256
SUMFILE=runc.sha256sum
wget "$URL"/$SUMFILE
grep -qw "$(sha256sum "$BINARY" | awk '{ print $1 }')" $SUMFILE
rm $SUMFILE
install_from_github_org_repo \
opencontainers \
runc \
sudo make PREFIX=/usr runc install

runc --version
}
Expand Down
2 changes: 0 additions & 2 deletions scripts/versions
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
declare -A VERSIONS=(
["cni-plugins"]=v1.4.1
["conmon"]=v2.1.10
["cri-tools"]=v1.30.0
["runc"]=v1.1.12
["bats"]=v1.11.0
["buildah"]=v1.34.0
)

0 comments on commit 60242bc

Please sign in to comment.