Skip to content

Commit

Permalink
[chore] Refactor goreleaser config generation for distributions (#797)
Browse files Browse the repository at this point in the history
* Start building new configuration logic

* Build the core distribution with the new logic

* Build the otlp distribution with the new logic

* Build the k8s distribution with the new logic

* Coalesce vars

* Use distribution builder

* Try to make lines smaller

* Build contrib distro

* Add contrib build-only config

* Rename vars

* Add windows build for core distro

* Simplify container manifest generation

* Add windows container images for all other distros

* Fix windows manifests

* Prepare to get rid of old config logic

* Fix contrib build only

* Refactor entrypoint for goreleaser build cmd

* Rename file with new logic

* Reorganize functions and methods

* Add Windows 2019 and 2022 dockerfiles

* Remove windows/arm64

* Rename fullDistBuildCOnfig

* Rename distBuildConfig

* Fix build flag templates

* Append build arg instead of inserting at 0

* Generate goreleaser config for all dists

* Update prebuilt artifacts path

* Another attempt at fixing build-arg passign to win build

* Fix win dockerfiles

* Another fix for the prebuilt path

* Use windows dockerfile on windows builds

* Proper windows dockerfile path

* Fix ARG in Windows.dockerfile

* Remove windows from the dist build system

* Use const instead of explicit slice

* Fix NFPMs build

* Move inclusion of default config in builds to its own function

Move WithDefaultConfigIncluded

* Move ldflags, build flags, and cgo setting to top level env vars

* Only calculate checksum when needed

* Fix arm/v7 arch image tag in image manifest

* Move interfaces up in the file, functions down

So now the order should be:

- consts
- global vars
- interfaces
- structs and their methods
- loose funcs

* Fix typo in usage of LD_FLAGS env var

* Remove quotes wrap from env vars

* Do not export consts that don't need it

* Move k8s arch list together with other global vars

* Upgrade goreleaser pro

Also added the ppc64/power8 arch.

* Fix ppc64 in otel-k8s distro

* Remove commented function

---------

Co-authored-by: Moritz Wiesinger <[email protected]>
  • Loading branch information
douglascamata and mowies authored Feb 14, 2025
1 parent d31bf94 commit 9b51357
Show file tree
Hide file tree
Showing 7 changed files with 623 additions and 389 deletions.
Loading

0 comments on commit 9b51357

Please sign in to comment.