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

[chore] add fixes for otelcol-contrib to release pipeline #760

Closed
Closed
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
26 changes: 26 additions & 0 deletions .github/workflows/base-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,32 @@ jobs:
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV

# otelcol-contrib is built in a separate stage
- name: Build ${{ inputs.distribution }}
if: inputs.distribution == 'otelcol-contrib'
uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf # v6.1.0
with:
distribution: goreleaser-pro
version: ${{ env.GORELEASER_PRO_VERSION }}
workdir: distributions/${{ inputs.distribution }}
args: release --clean --split --timeout 2h --config .goreleaser-build.yaml --release-header-tmpl=../../.github/release-template.md
Copy link
Member

Choose a reason for hiding this comment

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

What happens when release --clean --split --timeout 2h --release-header-tmpl=../../.github/release-template.md is called again below?

Copy link
Member Author

@mowies mowies Dec 4, 2024

Choose a reason for hiding this comment

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

the build for otelcol-contrib is split between 2 different goreleaser config files as of #666. so the first call gets a different config than the second one. (.goreleaser-build.yaml and .goreleaser.yaml)
the first call will just build the binaries, the second one continues business as is, while importing the prebuilt binaries and it should then continue as usual

env:
GOOS: ${{ matrix.GOOS }}
GOARCH: ${{ matrix.GOARCH }}
GOARM: 7 # Default is 6
GOAMD64: v1
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
COSIGN_YES: true

- name: Move built artifacts
if: inputs.distribution == 'otelcol-contrib'
run: mv distributions/otelcol-contrib/dist/**/* distributions/otelcol-contrib/artifacts/

- name: Show built or downloaded content
if: inputs.distribution == 'otelcol-contrib'
run: ls -laR distributions/otelcol-contrib/artifacts

- uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf # v6.1.0
with:
distribution: goreleaser-pro
Expand Down
Loading