Skip to content

Retrieve kernelRelease from kernel package name and kernelMachine #203

Retrieve kernelRelease from kernel package name and kernelMachine

Retrieve kernelRelease from kernel package name and kernelMachine #203

Workflow file for this run

name: docs
on: [push]
jobs:
run-build-design-proof:
# This job runs the proof of building a Falco eBPF probe in Bash w/ Docker from docs/BUILD_DESIGN.md
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: amazonlinux2
run: |
kernel_pkgs=$(docker run --rm amazonlinux:2 yum --showduplicates list kernel-devel | tail -n+3 | awk '{ print $2 }')
last_kernel_pkg=$(echo "${kernel_pkgs}" | tail -n1)
bash ./docs/BUILD_DESIGN_assets/build-amazonlinux2-ebpf-probe.sh "$last_kernel_pkg"
- name: cos
run: |
last_image_name=$(
git clone -q https://cos.googlesource.com/cos/manifest-snapshots /tmp/cos &&
REFS=($(git -C /tmp/cos ls-remote -q --sort=-v:refname --head origin 'refs/heads/release-R*' | head -n1)) &&
MILESTONE="${REFS[1]##*release-R}" &&
BUILD_IDS=$(git -C /tmp/cos log --pretty="%D" "origin/release-R${MILESTONE}" | sed -e 's/.*tag: \([0-9\.]\+\).*/\1/g') &&
for BUILD_ID in ${BUILD_IDS[@]}; do \
if curl -fIs "https://storage.googleapis.com/cos-tools/${BUILD_ID}/kernel_commit" > /dev/null; then break; fi \
done &&
echo "cos-$MILESTONE-${BUILD_ID//./-}")
bash ./docs/BUILD_DESIGN_assets/build-cos-ebpf-probe.sh "$last_image_name"