open-telemetry / opentelemetry-collector-releases

OpenTelemetry Collector Official Releases
https://opentelemetry.io
Apache License 2.0
252 stars 162 forks source link

Update GoReleaser templating to support all collector distros #708

Closed jackgopack4 closed 2 weeks ago

jackgopack4 commented 1 month ago

Per https://github.com/open-telemetry/opentelemetry-collector-releases/issues/716 we do not currently generate the Goreleaser configurations for otelcol-otlp and otelcol-k8s due to different requirements in default files, configurations, builds, etc. This PR adds conditional logic to successfully generate these goreleaser templates.

Anyone can verify this change by downloading "main" branch, applying my changes to Makefile and cmd/goreleaser/internal/configure.go, running $ make generate-goreleaser and see the minute formatting changes that get applied to the goreleaser templates.

The pipeline tests should ensure that these binaries still build and release successfully but of course it should be verified after merge with v0.113.0 or v0.114.0

Updates to the goreleaser template will also likely be required to close https://github.com/open-telemetry/opentelemetry-collector-releases/issues/618 so I figured it was a good idea to get all four distros templated first

jackgopack4 commented 2 weeks ago

@TylerHelmuth I think you've worked with the goreleaser templating recently; would you or someone else mind taking a look? Thanks.

jackgopack4 commented 2 weeks ago

@open-telemetry/helm-approvers @open-telemetry/operator-approvers appreciate some eyes on this change, thank you

swiatekm commented 2 weeks ago

The templating changes look fine to me, but having them mixed with the PIE changes makes them harder to review. I'd prefer to merge #726 first. I also don't think we should proceed without @TylerHelmuth's review here.

jackgopack4 commented 2 weeks ago

The templating changes look fine to me, but having them mixed with the PIE changes makes them harder to review. I'd prefer to merge #726 first.

Agreed, removed those changes.