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

iovisor/bcc: add Docker image build/push workflow #489

Merged
merged 1 commit into from
Dec 15, 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
47 changes: 47 additions & 0 deletions .github/workflows/build-push-iovisor-bcc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build and push iovisor/bcc ubuntu 22.04
on:
workflow_dispatch:
inputs:
ghcr_org:
type: string
required: false
default: flatcar
description: |
The name of the GitHub org where the docker images should be pushed.

permissions:
contents: read

jobs:
build_and_push:
permissions:
packages: write
strategy:
fail-fast: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: ader1990/bcc
ref: fix_debian_changelog
fetch-depth: 0
fetch-tags: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry (ghcr)
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
id: docker_build
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile.ubuntu
platforms: linux/amd64,linux/arm64/v8
push: true
tags: ghcr.io/${{ inputs.ghcr_org }}/bcc:latest
4 changes: 1 addition & 3 deletions kola/tests/bpf/bpf.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
)

// cmdPrefix is a temporary hack to pull `bcc` tools into Flatcar
const cmdPrefix = "docker run -d --name %s -v /lib/modules:/lib/modules -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/fs/bpf:/sys/fs/bpf --privileged --net host --pid host quay.io/iovisor/bcc %s"
const cmdPrefix = "docker run -d --name %s -v /lib/modules:/lib/modules -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/fs/bpf:/sys/fs/bpf --privileged --net host --pid host ghcr.io/flatcar/bcc %s"

var (
plog = capnslog.NewPackageLogger("github.com/flatcar/mantle", "kola/tests/bpf")
Expand All @@ -40,8 +40,6 @@ func init() {
// required while SELinux policy is not correcly updated to support
// `bpf` and `perfmon` permission.
Flags: []register.Flag{register.NoEnableSelinux},
// exclude `arm64` while `quay.io/iovisor/bcc` does not have `arm64` support.
Architectures: []string{"amd64"},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change might break the CI as the arm64 workflow has not been run before.

// This test is normally not related to the cloud environment
Platforms: []string{"qemu", "qemu-unpriv"},
})
Expand Down