[chore] Add goleak tests for jaeger receiver (#31687) #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: telemetrygen | |
on: | |
push: | |
branches: [ main ] | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+*' | |
merge_group: | |
pull_request: | |
env: | |
# Make sure to exit early if cache segment download times out after 2 minutes. | |
# We limit cache download as a whole to 5 minutes. | |
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2 | |
# Do not cancel this workflow on main. See https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/16616 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build-dev: | |
runs-on: ubuntu-latest | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.21.8" | |
cache: false | |
- name: Cache Go | |
id: go-cache | |
timeout-minutes: 5 | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/go/bin | |
~/go/pkg/mod | |
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build binaries | |
run: | | |
GOOS=linux GOARCH=ppc64le make telemetrygen | |
GOOS=linux GOARCH=arm64 make telemetrygen | |
GOOS=linux GOARCH=amd64 make telemetrygen | |
GOOS=linux GOARCH=s390x make telemetrygen | |
cp bin/telemetrygen_* cmd/telemetrygen/ | |
- name: Build telemetrygen | |
uses: docker/build-push-action@v5 | |
with: | |
context: cmd/telemetrygen | |
push: false | |
tags: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:dev | |
platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le | |
publish-latest: | |
runs-on: ubuntu-latest | |
if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) && github.repository == 'open-telemetry/opentelemetry-collector-contrib' | |
permissions: | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.21.8" | |
cache: false | |
- name: Cache Go | |
id: go-cache | |
timeout-minutes: 5 | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/go/bin | |
~/go/pkg/mod | |
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }} | |
- 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 | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build binaries | |
run: | | |
GOOS=linux GOARCH=ppc64le make telemetrygen | |
GOOS=linux GOARCH=arm64 make telemetrygen | |
GOOS=linux GOARCH=amd64 make telemetrygen | |
GOOS=linux GOARCH=s390x make telemetrygen | |
cp bin/telemetrygen_* cmd/telemetrygen/ | |
- name: Push telemetrygen to Github packages | |
uses: docker/build-push-action@v5 | |
with: | |
context: cmd/telemetrygen | |
push: true | |
tags: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest | |
platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le | |
publish-stable: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'open-telemetry/opentelemetry-collector-contrib' | |
permissions: | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.21.8" | |
cache: false | |
- name: Cache Go | |
id: go-cache | |
timeout-minutes: 5 | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/go/bin | |
~/go/pkg/mod | |
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Set Release Tag | |
id: github_tag | |
run: ./.github/workflows/scripts/set_release_tag.sh | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build binaries | |
run: | | |
GOOS=linux GOARCH=ppc64le make telemetrygen | |
GOOS=linux GOARCH=arm64 make telemetrygen | |
GOOS=linux GOARCH=amd64 make telemetrygen | |
GOOS=linux GOARCH=s390x make telemetrygen | |
cp bin/telemetrygen_* cmd/telemetrygen/ | |
- name: Push telemetrygen to Github packages | |
uses: docker/build-push-action@v5 | |
with: | |
context: cmd/telemetrygen | |
push: true | |
tags: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:${{ steps.github_tag.outputs.tag }} | |
platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le |