Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tetragon: build arm64 tarball #1484

Merged
merged 2 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 56 additions & 2 deletions .github/workflows/build-images-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,47 @@ jobs:
cd image-digest/
find -type f | sort | xargs -d '\n' cat

tarball-release:
name: Create Tetragon Tarball Releases
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
# We use the native arch build
- os: ubuntu-22.04
arch: amd64
- os: buildjet-2vcpu-ubuntu-2204-arm
arch: arm64
steps:
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@2a1a44ac4aa01993040736bd95bb470da1a38365 # v2.8.0

- name: Checkout Source Code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
persist-credentials: false
fetch-depth: 0
submodules: true

- name: Set up Go
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1

- name: Getting version tag
id: tag
run: echo "tag=$(make version)" >> $GITHUB_OUTPUT

- name: Generate Tetragon Tarball
run: make tarball-release

# Cache tarball releases for later
- name: Save tetragon-${{ steps.tag.outputs.tag }}-${{ matrix.arch }}.tar.gz Tarball
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: tetragon-${{ steps.tag.outputs.tag }}-${{ matrix.arch }}
path: release/
retention-days: 1

draft-github-release:
name: Create Release
if: github.repository == 'cilium/tetragon'
Expand All @@ -180,11 +221,24 @@ jobs:
- name: Set up Go
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1

- name: Getting version tag
id: tag
run: echo "tag=$(make version)" >> $GITHUB_OUTPUT

- name: Generate tetra CLI artifacts
run: make cli-release

- name: Generate Tetragon Tarball
run: make tarball-release
- name: Retrieve tetragon-${{ steps.tag.outputs.tag }}-amd64.tar.gz
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: tetragon-${{ steps.tag.outputs.tag }}-amd64
path: release

- name: Retrieve tetragon-${{ steps.tag.outputs.tag }}-arm64.tar.gz
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: tetragon-${{ steps.tag.outputs.tag }}-arm64
path: release

- name: Create Release
id: create_release
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/packages-e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@ jobs:
strategy:
matrix:
include:
# We use the native arch build
- os: ubuntu-22.04
arch: amd64
match_arch: x86-64
- os: buildjet-2vcpu-ubuntu-2204-arm
arch: arm64
match_arch: arm64

steps:
# https://github.com/docker/setup-buildx-action
Expand Down Expand Up @@ -54,6 +59,8 @@ jobs:
retry_wait_seconds: 5
retry_on: error
command: |
# Ensure that default native builds work
file /usr/local/bin/tetragon | grep ${{ matrix.match_arch }} -
sudo systemctl is-active tetragon
sudo tetra status

Expand Down