Skip to content

Commit a0a8cfb

Browse files
authored
Merge branch 'main' into renovate-collector-integration
2 parents 3d073d1 + ec8ec3d commit a0a8cfb

File tree

12 files changed

+103
-19
lines changed

12 files changed

+103
-19
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: enhancement
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
7+
component: ebpf-profiler
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Start producing release artifacts for the eBPF profiler distribution.
11+
12+
# One or more tracking issues or pull requests related to the change
13+
issues: [984]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# Optional: The change log or logs in which this entry should be included.
21+
# e.g. '[user]' or '[user, api]'
22+
# Include 'user' if the change is relevant to end users.
23+
# Include 'api' if there is a change to a library API.
24+
# Default: '[user]'
25+
change_logs: [user]

.github/workflows/base-binary-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ env:
2323

2424
jobs:
2525
goreleaser:
26-
runs-on: ubuntu-latest
26+
runs-on: ubuntu-24.04
2727

2828
permissions:
2929
id-token: write

.github/workflows/base-ci-binary.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@ on:
1818
default: ""
1919
description: "The collector dependency will be put into this folder"
2020

21-
2221
env:
2322
# renovate: datasource=github-releases packageName=goreleaser/goreleaser-pro
2423
GORELEASER_PRO_VERSION: v2.11.2
2524

2625
jobs:
2726
check-goreleaser:
28-
runs-on: ubuntu-latest
27+
runs-on: ubuntu-24.04
2928
steps:
3029
- name: Checkout Releases Repo
3130
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

.github/workflows/base-ci-goreleaser.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
goarch:
1313
required: true
1414
type: string
15+
runner_os:
16+
required: false
17+
type: string
18+
default: ubuntu-24.04
1519
nightly:
1620
required: false
1721
type: boolean
@@ -62,7 +66,7 @@ jobs:
6266
GOARCH: riscv64
6367
- GOOS: windows
6468
GOARCH: riscv64
65-
runs-on: ubuntu-24.04
69+
runs-on: ${{ inputs.runner_os }}
6670
outputs:
6771
version: ${{ steps.prep.outputs.version }}
6872

@@ -267,7 +271,7 @@ jobs:
267271
exclude:
268272
- GOOS: darwin
269273
- GOOS: windows
270-
runs-on: ubuntu-24.04
274+
runs-on: ${{ inputs.runner_os }}
271275
steps:
272276
- name: Checkout
273277
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

.github/workflows/ci-goreleaser-ebpf-profiler.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,26 @@ on:
2828
- "go.sum"
2929

3030
jobs:
31-
check-goreleaser:
31+
check-goreleaser-amd64:
3232
name: CI - eBPF Profiler - GoReleaser
3333
uses: ./.github/workflows/base-ci-goreleaser.yaml
3434
with:
3535
distribution: otelcol-ebpf-profiler
3636
config_file: ebpf-profiler-config.yaml
37-
docker_run_options: '--privileged --pid=host -v /sys/kernel/debug/:/sys/kernel/debug/:ro'
38-
otelcol_run_options: '--feature-gates=service.profilesSupport'
37+
docker_run_options: "--privileged --pid=host -v /sys/kernel/debug/:/sys/kernel/debug/:ro"
38+
otelcol_run_options: "--feature-gates=service.profilesSupport"
3939
goos: '[ "linux" ]'
4040
goarch: '[ "amd64" ]'
4141
secrets: inherit
42+
check-goreleaser-arm64:
43+
name: CI - eBPF Profiler - GoReleaser
44+
uses: ./.github/workflows/base-ci-goreleaser.yaml
45+
with:
46+
distribution: otelcol-ebpf-profiler
47+
config_file: ebpf-profiler-config.yaml
48+
docker_run_options: "--privileged --pid=host -v /sys/kernel/debug/:/sys/kernel/debug/:ro"
49+
otelcol_run_options: "--feature-gates=service.profilesSupport"
50+
goos: '[ "linux" ]'
51+
goarch: '[ "arm64" ]'
52+
runner_os: ubuntu-24.04-arm
53+
secrets: inherit
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Release eBPF Profiler
2+
3+
on:
4+
push:
5+
tags: ["v*"]
6+
7+
jobs:
8+
release:
9+
name: Release eBPF Profiler
10+
uses: ./.github/workflows/base-release.yaml
11+
with:
12+
distribution: otelcol-ebpf-profiler
13+
goos: '[ "linux" ]'
14+
goarch: '[ "amd64", "arm64" ]'
15+
nightly: ${{ contains(github.ref, '-nightly') }}
16+
secrets: inherit
17+
permissions: write-all

.github/workflows/update-version.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ jobs:
2323
contents: write # required for pushing changes
2424
pull-requests: write # required for creating PR
2525

26-
env:
27-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2826
steps:
2927
- uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1
3028
id: otelbot-token
@@ -47,7 +45,7 @@ jobs:
4745
run: |
4846
.github/workflows/scripts/bump-versions.sh --commit --pull-request
4947
env:
50-
GITHUB_TOKEN: ${{ steps.otelbot-token.outputs.token }}
48+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5149
next_beta_core: ${{ github.event.inputs.next_beta_core }}
5250
next_beta_contrib: ${{ github.event.inputs.next_beta_contrib }}
5351
next_stable_core: ${{ github.event.inputs.next_stable_core }}

cmd/goreleaser/internal/configure.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ var (
5454
winContainerArchs = []string{"amd64"}
5555
darwinArchs = []string{"amd64", "arm64"}
5656
k8sArchs = []string{"amd64", "arm64", "ppc64le", "riscv64", "s390x"}
57-
ebpfProfilerArchs = []string{"amd64"}
57+
ebpfProfilerArchs = []string{"amd64", "arm64"}
5858
ocbArchs = []string{"amd64", "arm64", "ppc64le", "riscv64"}
5959
opAmpArchs = []string{"amd64", "arm64", "ppc64le"}
6060

@@ -181,7 +181,7 @@ var (
181181
d.containerImageManifests = slices.Concat(
182182
newContainerImageManifests(d.name, "linux", ebpfProfilerArchs, containerImageOptions{}),
183183
)
184-
d.enableCgo = true
184+
d.env = append(d.env, "TARGET_ARCH={{ .Runtime.Goarch }}")
185185
d.ldFlags = "-extldflags=-static"
186186
d.goTags = "osusergo,netgo"
187187
}).WithDefaultArchives().
@@ -193,6 +193,7 @@ var (
193193
WithDefaultEnv().
194194
WithDefaultPartial().
195195
WithDefaultRelease().
196+
WithNightlyConfig().
196197
Build()
197198

198199
// OCB binary
@@ -499,8 +500,7 @@ func (b *distributionBuilder) WithDefaultEnv() *distributionBuilder {
499500
if !b.dist.enableCgo {
500501
env = append(env, "CGO_ENABLED=0")
501502
}
502-
503-
b.dist.env = env
503+
b.dist.env = append(b.dist.env, env...)
504504
})
505505
return b
506506
}

distributions/otelcol-ebpf-profiler/.goreleaser.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
version: 2
22
project_name: opentelemetry-collector-releases
33
env:
4+
- TARGET_ARCH={{ .Runtime.Goarch }}
45
- COSIGN_YES=true
56
- LD_FLAGS=-extldflags=-static
67
- BUILD_FLAGS=-trimpath
78
- CONTAINER_IMAGE_EPHEMERAL_TAG={{ if .IsNightly }}nightly{{ else }}latest{{ end }}
89
- GOPROXY=https://proxy.golang.org,direct
910
- GO_TAGS=osusergo,netgo
11+
- CGO_ENABLED=0
1012
release:
1113
replace_existing_artifacts: true
1214
builds:
@@ -15,6 +17,7 @@ builds:
1517
- linux
1618
goarch:
1719
- amd64
20+
- arm64
1821
dir: _build
1922
binary: otelcol-ebpf-profiler
2023
ldflags:
@@ -47,19 +50,41 @@ dockers:
4750
- --label=org.opencontainers.image.source={{.GitURL}}
4851
- --label=org.opencontainers.image.licenses=Apache-2.0
4952
use: buildx
53+
- goos: linux
54+
goarch: arm64
55+
dockerfile: Dockerfile
56+
image_templates:
57+
- otel/opentelemetry-collector-ebpf-profiler:{{ .Version }}-arm64
58+
- otel/opentelemetry-collector-ebpf-profiler:{{ .Env.CONTAINER_IMAGE_EPHEMERAL_TAG }}-arm64
59+
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:{{ .Version }}-arm64
60+
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:{{ .Env.CONTAINER_IMAGE_EPHEMERAL_TAG }}-arm64
61+
build_flag_templates:
62+
- --pull
63+
- --platform=linux/arm64
64+
- --label=org.opencontainers.image.created={{.Date}}
65+
- --label=org.opencontainers.image.name={{.ProjectName}}
66+
- --label=org.opencontainers.image.revision={{.FullCommit}}
67+
- --label=org.opencontainers.image.version={{.Version}}
68+
- --label=org.opencontainers.image.source={{.GitURL}}
69+
- --label=org.opencontainers.image.licenses=Apache-2.0
70+
use: buildx
5071
docker_manifests:
5172
- name_template: otel/opentelemetry-collector-ebpf-profiler:{{ .Version }}
5273
image_templates:
5374
- otel/opentelemetry-collector-ebpf-profiler:{{ .Version }}-amd64
75+
- otel/opentelemetry-collector-ebpf-profiler:{{ .Version }}-arm64
5476
- name_template: otel/opentelemetry-collector-ebpf-profiler:{{ .Env.CONTAINER_IMAGE_EPHEMERAL_TAG }}
5577
image_templates:
5678
- otel/opentelemetry-collector-ebpf-profiler:{{ .Env.CONTAINER_IMAGE_EPHEMERAL_TAG }}-amd64
79+
- otel/opentelemetry-collector-ebpf-profiler:{{ .Env.CONTAINER_IMAGE_EPHEMERAL_TAG }}-arm64
5780
- name_template: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:{{ .Version }}
5881
image_templates:
5982
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:{{ .Version }}-amd64
83+
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:{{ .Version }}-arm64
6084
- name_template: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:{{ .Env.CONTAINER_IMAGE_EPHEMERAL_TAG }}
6185
image_templates:
6286
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:{{ .Env.CONTAINER_IMAGE_EPHEMERAL_TAG }}-amd64
87+
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:{{ .Env.CONTAINER_IMAGE_EPHEMERAL_TAG }}-arm64
6388
signs:
6489
- cmd: cosign
6590
args:
@@ -86,3 +111,7 @@ monorepo:
86111
tag_prefix: v
87112
partial:
88113
by: target
114+
nightly:
115+
version_template: '{{ incpatch .Version}}-nightly.{{ .ShortCommit }}'
116+
tag_name: nightly-otelcol-ebpf-profiler
117+
keep_single_release: true
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.24.6@sha256:2c89c41fb9efc3807029b59af69645867cfe978d2b877d475be0d72f6c6ce6f6
1+
FROM golang:1.25.0@sha256:91e2cd436f7adbfad0a0cbb7bf8502fa863ed8461414ceebe36c6304731e0fd9
22

33
COPY --chmod=755 otelcol-ebpf-profiler /otelcol-ebpf-profiler
44
ENTRYPOINT ["/otelcol-ebpf-profiler"]

0 commit comments

Comments
 (0)