Skip to content

Commit 998ab56

Browse files
Generate eBPF files as part of the build process (#1666)
1 parent 837114e commit 998ab56

File tree

244 files changed

+36289
-15233
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

244 files changed

+36289
-15233
lines changed

.github/workflows/backport.yml

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
repository: grafana/grafana-github-actions
1717
path: ./actions
1818
ref: main
19-
lfs: true
2019
- name: Install Actions
2120
run: npm install --production --prefix ./actions
2221
- name: Run backport

.github/workflows/check_ebpf_integrity.yml

-19
This file was deleted.

.github/workflows/clang-format-check.yml

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ jobs:
1515
uses: actions/checkout@v3
1616
with:
1717
fetch-depth: 0
18-
lfs: true
1918

2019
- name: Install Clang-Format
2120
run: sudo apt-get install clang-format

.github/workflows/clang-tidy-check.yml

-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ jobs:
1313
steps:
1414
- name: Checkout code
1515
uses: actions/checkout@v3
16-
with:
17-
lfs: true
1816

1917
- name: Install clang-tidy
2018
run: |

.github/workflows/generator-image.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ jobs:
1818
steps:
1919
- name: Checkout repository
2020
uses: actions/checkout@v4
21-
with:
22-
lfs: true
2321

2422
- name: Set up QEMU
2523
uses: docker/setup-qemu-action@v3
@@ -55,4 +53,4 @@ jobs:
5553
labels: ${{ steps.meta.outputs.labels }}
5654
tags: |
5755
"${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.timestamp.outputs.ts }}"
58-
"${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main"
56+
"${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main"

.github/workflows/git-lfs-check.yml

-40
This file was deleted.

.github/workflows/helm-test.yml

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ jobs:
2727
uses: actions/checkout@v4
2828
with:
2929
fetch-depth: 0 # required for chart-testing to work
30-
lfs: true
3130

3231
- name: Regenerate docs
3332
run: |

.github/workflows/publish-technical-documentation-release.yml

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ jobs:
2020
- uses: actions/checkout@v4
2121
with:
2222
fetch-depth: 0
23-
lfs: true
2423
- uses: grafana/writers-toolkit/publish-technical-documentation-release@publish-technical-documentation-release/v2
2524
with:
2625
release_tag_regexp: '^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$'

.github/workflows/publish_dockerhub_main.yml

-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ jobs:
1616
steps:
1717
- id: checkout
1818
uses: actions/checkout@v4
19-
with:
20-
lfs: true
2119

2220
- id: push-beyla-to-dockerhub
2321
uses: grafana/shared-workflows/actions/build-push-to-dockerhub@main

.github/workflows/publish_dockerhub_release.yml

-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ jobs:
1616
steps:
1717
- id: checkout
1818
uses: actions/checkout@v4
19-
with:
20-
lfs: true
2119

2220
- id: push-beyla-to-dockerhub
2321
uses: grafana/shared-workflows/actions/build-push-to-dockerhub@main

.github/workflows/pull_request.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@ jobs:
1515
go: [ '1.23' ]
1616
steps:
1717
- uses: actions/checkout@v3
18-
with:
19-
lfs: true
2018
- name: Set up Go
2119
uses: actions/setup-go@v3
2220
with:
2321
go-version: ${{ matrix.go }}
2422
- name: Run verification and unit tests
25-
run: make verify cov-exclude-generated
23+
run: make docker-generate verify cov-exclude-generated
2624
- name: Report coverage
2725
uses: codecov/codecov-action@v4
2826
env:

.github/workflows/pull_request_check_license.yml

-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ jobs:
1515
go: [ '1.23' ]
1616
steps:
1717
- uses: actions/checkout@v3
18-
with:
19-
lfs: true
2018
- name: Set up Go
2119
uses: actions/setup-go@v3
2220
with:

.github/workflows/pull_request_integration_tests.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ jobs:
1515
go: [ '1.23' ]
1616
steps:
1717
- uses: actions/checkout@v3
18-
with:
19-
lfs: true
2018
- name: Set up Go
2119
uses: actions/setup-go@v3
2220
with:
@@ -26,7 +24,7 @@ jobs:
2624
docker system prune -af
2725
docker volume prune -f
2826
- name: Run integration tests
29-
run: make integration-test
27+
run: make docker-generate integration-test
3028
timeout-minutes: 60
3129
- name: Upload integration test logs
3230
uses: actions/upload-artifact@v4

.github/workflows/pull_request_integration_tests_arm.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ jobs:
1515
go: [ '1.23' ]
1616
steps:
1717
- uses: actions/checkout@v3
18-
with:
19-
lfs: true
2018
- name: Set up Go
2119
uses: actions/setup-go@v3
2220
with:
@@ -26,7 +24,7 @@ jobs:
2624
docker system prune -af
2725
docker volume prune -f
2826
- name: Run integration tests
29-
run: make integration-test-arm
27+
run: make docker-generate integration-test-arm
3028
timeout-minutes: 60
3129
- name: Upload integration test logs
3230
uses: actions/upload-artifact@v4

.github/workflows/pull_request_k8s_integration_tests.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ jobs:
1515
go: [ '1.23' ]
1616
steps:
1717
- uses: actions/checkout@v3
18-
with:
19-
lfs: true
2018
- name: Set up Go
2119
uses: actions/setup-go@v3
2220
with:
@@ -26,7 +24,7 @@ jobs:
2624
docker system prune -af
2725
docker volume prune -f
2826
- name: Run integration tests
29-
run: make integration-test-k8s
27+
run: make docker-generate integration-test-k8s
3028
timeout-minutes: 60
3129
- name: Upload integration test logs
3230
uses: actions/upload-artifact@v4

.github/workflows/pull_request_oats_test.yml

-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ jobs:
1515
go: [ '1.23' ]
1616
steps:
1717
- uses: actions/checkout@v3
18-
with:
19-
lfs: true
2018
- name: Set up Go
2119
uses: actions/setup-go@v3
2220
with:

.github/workflows/release-binaries.yml

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ jobs:
1414
go: [ '1.23' ]
1515
steps:
1616
- uses: actions/checkout@v3
17-
with:
18-
lfs: true
1917
- name: Set up Go
2018
uses: actions/setup-go@v3
2119
with:

.github/workflows/update-offsets.yml

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ jobs:
99
steps:
1010
- name: "Checkout repo"
1111
uses: actions/checkout@v3
12-
with:
13-
lfs: true
1412
- name: "Update Go"
1513
uses: actions/setup-go@v4
1614
with:

.github/workflows/workflow_integration_tests_vm.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ jobs:
2525
go: [ '1.22' ]
2626
steps:
2727
- uses: actions/checkout@v3
28-
with:
29-
lfs: true
3028
- name: Clean up disk space
3129
run: |
3230
docker system prune -af
@@ -37,6 +35,7 @@ jobs:
3735
sudo apt-get install -y --no-install-recommends qemu-utils qemu-system-x86
3836
- name: Run VM integration tests
3937
run: |
38+
make docker-generate
4039
sudo make -C test/vm KERNEL_VER=${{ inputs.kernel-version }} ARCH=${{ inputs.arch }} && [ -f testoutput/success ]
4140
timeout-minutes: ${{ inputs.timeout-minutes }}
4241
- name: Upload integration test logs

Dockerfile

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
# Build the autoinstrumenter binary
2-
FROM golang:1.23 AS builder
2+
FROM ghcr.io/grafana/beyla-ebpf-generator:main AS builder
33

44
# TODO: embed software version in executable
55

66
ARG TARGETARCH
77

88
ENV GOARCH=$TARGETARCH
99

10-
WORKDIR /opt/app-root
10+
WORKDIR /src
1111

12-
RUN apt-get update
13-
RUN apt-get install -qy ca-certificates
12+
RUN apk add make git bash
1413

1514
# Copy the go manifests and source
1615
COPY .git/ .git/
@@ -26,6 +25,7 @@ COPY NOTICE NOTICE
2625
COPY third_party_licenses.csv third_party_licenses.csv
2726

2827
# Build
28+
RUN /generate.sh
2929
RUN make compile
3030

3131
# Create final image from minimal + built binary
@@ -35,11 +35,11 @@ LABEL maintainer="Grafana Labs <[email protected]>"
3535

3636
WORKDIR /
3737

38-
COPY --from=builder /opt/app-root/bin/beyla .
39-
COPY --from=builder /opt/app-root/LICENSE .
40-
COPY --from=builder /opt/app-root/NOTICE .
41-
COPY --from=builder /opt/app-root/third_party_licenses.csv .
38+
COPY --from=builder /src/bin/beyla .
39+
COPY --from=builder /src/LICENSE .
40+
COPY --from=builder /src/NOTICE .
41+
COPY --from=builder /src/third_party_licenses.csv .
4242

4343
COPY --from=builder /etc/ssl/certs /etc/ssl/certs
4444

45-
ENTRYPOINT [ "/beyla" ]
45+
ENTRYPOINT [ "/beyla" ]

0 commit comments

Comments
 (0)