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 86bfdde
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- update-nixpkgs-*
pull_request:
env:
GO_VERSION: '1.22'
GO_VERSION: '1.21'
CONMON_BINARY: /usr/local/bin/conmon # from: scripts/github-actions-setup
permissions:
contents: read
Expand Down
18 changes: 8 additions & 10 deletions dependencies.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
dependencies:
- name: go-build
version: 1.21
refPaths:
- path: go.mod
match: go
- path: .github/workflows/integration.yml
match: GO_VERSION

- name: go
version: 1.22
refPaths:
- path: .github/workflows/verify.yml
match: GO_VERSION
- path: .github/workflows/integration.yml
match: GO_VERSION
- path: .github/workflows/test.yml
match: GO_VERSION
- path: .github/workflows/release-branch-forward.yml
Expand Down Expand Up @@ -46,8 +52,6 @@ dependencies:
- name: cri-tools
version: v1.30.0
refPaths:
- path: scripts/versions
match: cri-tools
- path: contrib/test/ci/vars.yml
match: cri_tools_git_version

Expand All @@ -57,12 +61,6 @@ dependencies:
- path: scripts/versions
match: buildah

- name: runc
version: v1.1.12
refPaths:
- path: scripts/versions
match: runc

- name: bats
version: v1.11.0
refPaths:
Expand Down
66 changes: 33 additions & 33 deletions scripts/github-actions-setup
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,25 @@ prepare_system() {
sudo systemctl restart systemd-journald
}

install_bats() {
git clone https://github.com/bats-core/bats-core
pushd bats-core
git checkout "${VERSIONS["bats"]}"
sudo ./install.sh /usr/local
install_from_github_org_repo() {
URL=https://github.com/$1/$2
DIR=$(mktemp -ud)

git clone "$URL" "$DIR"
pushd "$DIR"
git checkout "$3"
"${@:4}"
popd
rm -rf bats-core
mkdir -p ~/.parallel
touch ~/.parallel/will-cite
sudo rm -rf "$DIR"
}

install_bats() {
install_from_github_org_repo \
bats-core \
bats-core \
"${VERSIONS["bats"]}" \
sudo ./install.sh /usr/local
sudo touch ~/.parallel/will-cite
}

install_conmon() {
Expand All @@ -82,14 +92,12 @@ install_conmonrs() {
}

install_critools() {
URL=https://github.com/kubernetes-sigs/cri-tools
install_from_github_org_repo \
kubernetes-sigs \
cri-tools \
master \
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,11 @@ 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 \
main \
sudo -E PATH="$PATH" make PREFIX=/usr runc install

runc --version
}
Expand Down Expand Up @@ -143,15 +146,12 @@ install_files() {
}

install_buildah() {
URL=https://github.com/containers/buildah.git
install_from_github_org_repo \
containers \
buildah \
"${VERSIONS["buildah"]}" \
sudo -E PATH="$PATH" make PREFIX=/usr bin/buildah install

git clone $URL
pushd buildah
git checkout "${VERSIONS["buildah"]}"
make bin/buildah
sudo install -m 755 bin/buildah /usr/bin/buildah
popd
sudo rm -rf buildah
sudo buildah --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 86bfdde

Please sign in to comment.