Skip to content

Commit

Permalink
fix(deps): update goreleaser pro (#779)
Browse files Browse the repository at this point in the history
* fix(deps): update goreleaser pro

* update config, add debug steps for future, add missing env vars

Signed-off-by: Moritz Wiesinger <[email protected]>

try out with new nightly build

Signed-off-by: Moritz Wiesinger <[email protected]>

add goppc64 goreleaser setting

Signed-off-by: Moritz Wiesinger <[email protected]>

try with goppc64 env var

Signed-off-by: Moritz Wiesinger <[email protected]>

add back goamd64 env var

Signed-off-by: Moritz Wiesinger <[email protected]>

add back GOARM variable

Signed-off-by: Moritz Wiesinger <[email protected]>

remove probably unneeded env vars

Signed-off-by: Moritz Wiesinger <[email protected]>

revert unneeded changes

Signed-off-by: Moritz Wiesinger <[email protected]>

try setting ppc64 variables

Signed-off-by: Moritz Wiesinger <[email protected]>

prettify debug cmds

Signed-off-by: Moritz Wiesinger <[email protected]>

add back v1 suffixes to upload tasks

Signed-off-by: Moritz Wiesinger <[email protected]>

enable everything

Signed-off-by: Moritz Wiesinger <[email protected]>

add back arm

Signed-off-by: Moritz Wiesinger <[email protected]>

go back to nightly, remove experimental arm setting

Signed-off-by: Moritz Wiesinger <[email protected]>

try with 2.6.1

Signed-off-by: Moritz Wiesinger <[email protected]>

try with all default settings

Signed-off-by: Moritz Wiesinger <[email protected]>

again

Signed-off-by: Moritz Wiesinger <[email protected]>

try agin

Signed-off-by: Moritz Wiesinger <[email protected]>

try power9

Signed-off-by: Moritz Wiesinger <[email protected]>

just build ppc64le

Signed-off-by: Moritz Wiesinger <[email protected]>

just run arm

Signed-off-by: Moritz Wiesinger <[email protected]>

remove target setting

Signed-off-by: Moritz Wiesinger <[email protected]>

try with env var

Signed-off-by: Moritz Wiesinger <[email protected]>

try again

Signed-off-by: Moritz Wiesinger <[email protected]>

explicitely set power8 and power9

Signed-off-by: Moritz Wiesinger <[email protected]>

add back ppc64le and see what happens

Signed-off-by: Moritz Wiesinger <[email protected]>

go back to default arm v7 through experimental env var

Signed-off-by: Moritz Wiesinger <[email protected]>

try setting completely wrong env var for GOARM

Signed-off-by: Moritz Wiesinger <[email protected]>

revert

Signed-off-by: Moritz Wiesinger <[email protected]>

try to update default arm version with experimental variable

Signed-off-by: Moritz Wiesinger <[email protected]>

try with integer instead of string for arm version

Signed-off-by: Moritz Wiesinger <[email protected]>

add arm to core, remove others for faster build times

Signed-off-by: Moritz Wiesinger <[email protected]>

add back more architectures

Signed-off-by: Moritz Wiesinger <[email protected]>

remove archive from contrib build-only config

Signed-off-by: Moritz Wiesinger <[email protected]>

add arm64 builds

Signed-off-by: Moritz Wiesinger <[email protected]>

fix msi upload task

Signed-off-by: Moritz Wiesinger <[email protected]>

back to just amd64...

Signed-off-by: Moritz Wiesinger <[email protected]>

remove ppc64le again

Signed-off-by: Moritz Wiesinger <[email protected]>

add back systems and architectures

Signed-off-by: Moritz Wiesinger <[email protected]>

correct artifacts.json name

Signed-off-by: Moritz Wiesinger <[email protected]>

change dist folder name

Signed-off-by: Moritz Wiesinger <[email protected]>

debug artifacts json file

Signed-off-by: Moritz Wiesinger <[email protected]>

just show relevant folders

Signed-off-by: Moritz Wiesinger <[email protected]>

update go mods

Signed-off-by: Moritz Wiesinger <[email protected]>

just run amd64 again

Signed-off-by: Moritz Wiesinger <[email protected]>

dockerfile from/as casing

Signed-off-by: Moritz Wiesinger <[email protected]>

try with new goreleaser nightly build

Signed-off-by: Moritz Wiesinger <[email protected]>

try setting target manually

Signed-off-by: Moritz Wiesinger <[email protected]>

try to set goamd64 in goreleaser file directly

Signed-off-by: Moritz Wiesinger <[email protected]>

remove windows from otelcol-contrib

Signed-off-by: Moritz Wiesinger <[email protected]>

add back most arches to otelcol-core

Signed-off-by: Moritz Wiesinger <[email protected]>

add back windows builds

Signed-off-by: Moritz Wiesinger <[email protected]>

fix goamd64 setting

Signed-off-by: Moritz Wiesinger <[email protected]>

fix path to upload artifacts

Signed-off-by: Moritz Wiesinger <[email protected]>

cut down arches to just linux amd64

Signed-off-by: Moritz Wiesinger <[email protected]>

fix package upload

Signed-off-by: Moritz Wiesinger <[email protected]>

go back to 2.6.1

Signed-off-by: Moritz Wiesinger <[email protected]>

less architectures

Signed-off-by: Moritz Wiesinger <[email protected]>

more debugging - 2.6.0

Signed-off-by: Moritz Wiesinger <[email protected]>

more debugging - revert to 2.5.0

Signed-off-by: Moritz Wiesinger <[email protected]>

more debugging - revert to 2.5.1

Signed-off-by: Moritz Wiesinger <[email protected]>

debugging

Signed-off-by: Moritz Wiesinger <[email protected]>

try to fix otlp build

Signed-off-by: Moritz Wiesinger <[email protected]>

update nfpm config to new config object

Signed-off-by: Moritz Wiesinger <[email protected]>

update deprecated field in builder config

Signed-off-by: Moritz Wiesinger <[email protected]>

go mod tidy

Signed-off-by: Moritz Wiesinger <[email protected]>

* update to gereleaser-pro v2.7.0

Signed-off-by: Moritz Wiesinger <[email protected]>

---------

Signed-off-by: Moritz Wiesinger <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Moritz Wiesinger <[email protected]>
  • Loading branch information
renovate[bot] and mowies authored Feb 11, 2025
1 parent 587f765 commit 00024a9
Show file tree
Hide file tree
Showing 13 changed files with 63 additions and 25 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/base-ci-goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:

env:
# renovate: datasource=github-tags depName=goreleaser-pro packageName=goreleaser/goreleaser-pro
GORELEASER_PRO_VERSION: v2.4.8
GORELEASER_PRO_VERSION: v2.7.0

jobs:
check-goreleaser:
Expand Down Expand Up @@ -126,8 +126,9 @@ jobs:
env:
GOOS: ${{ matrix.GOOS }}
GOARCH: ${{ matrix.GOARCH }}
GOARM: 7 # Default is 6
GOARM: "7" # Default is 6
GOAMD64: v1
GOPPC64: power8
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

- name: Move built artifacts
Expand All @@ -148,19 +149,28 @@ jobs:
env:
GOOS: ${{ matrix.GOOS }}
GOARCH: ${{ matrix.GOARCH }}
GOARM: 7 # Default is 6
GOARM: "7" # Default is 6
GOAMD64: v1
GOPPC64: power8
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

- name: Print built artifacts
run: cat ./distributions/${{ inputs.distribution }}/dist/**/artifacts.json

- name: Print dist folder contents
if: always()
run: ls -laR ./distributions/${{ inputs.distribution }}/dist

- name: Upload linux service packages
if: ${{ matrix.GOOS == 'linux' && matrix.GOARCH == 'amd64' }}
if: ${{ matrix.GOOS == 'linux' && matrix.GOARCH == 'amd64' && (inputs.distribution == 'otelcol-contrib' || inputs.distribution == 'otelcol') }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: linux-packages
path: distributions/${{ inputs.distribution }}/dist/linux_amd64_v1/*
if-no-files-found: error

- name: Upload MSI packages
if: matrix.GOOS == 'windows' && matrix.GOARCH == 'amd64'
if: matrix.GOOS == 'windows' && matrix.GOARCH == 'amd64' && (inputs.distribution == 'otelcol-contrib' || inputs.distribution == 'otelcol')
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: msi-packages
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/base-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

env:
# renovate: datasource=github-tags depName=goreleaser-pro packageName=goreleaser/goreleaser-pro
GORELEASER_PRO_VERSION: v2.4.8
GORELEASER_PRO_VERSION: v2.7.0

jobs:
prepare:
Expand Down Expand Up @@ -100,8 +100,9 @@ jobs:
env:
GOOS: ${{ matrix.GOOS }}
GOARCH: ${{ matrix.GOARCH }}
GOARM: 7 # Default is 6
GOARM: "7" # Default is 6
GOAMD64: v1
GOPPC64: power8
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
COSIGN_YES: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/builder-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

env:
# renovate: datasource=github-tags depName=goreleaser-pro packageName=goreleaser/goreleaser-pro
GORELEASER_PRO_VERSION: v2.4.8
GORELEASER_PRO_VERSION: v2.7.0

jobs:
goreleaser:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/builder-testbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:

env:
# renovate: datasource=github-tags depName=goreleaser-pro packageName=goreleaser/goreleaser-pro
GORELEASER_PRO_VERSION: v2.4.8
GORELEASER_PRO_VERSION: v2.7.0

jobs:
check-goreleaser:
Expand Down
3 changes: 2 additions & 1 deletion cmd/builder/.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ release:
header: |
### Images and binaries for collector distributions here: https://github.com/open-telemetry/opentelemetry-collector-releases/releases/tag/{{ .Tag }}
archives:
- format: binary
- formats:
- binary
checksum:
name_template: "checksums.txt"
snapshot:
Expand Down
37 changes: 25 additions & 12 deletions cmd/goreleaser/internal/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ func GenerateContribBuildOnly(dist string, buildOrRest bool) config.Project {
TagPrefix: "v",
},
Partial: Partial,
Archives: []config.Archive{
{
Formats: []string{
"binary",
},
},
},
}
}

Expand Down Expand Up @@ -107,12 +114,13 @@ func Build(dist string, buildOrRest bool) config.Build {
Path: "artifacts/otelcol-contrib_{{ .Target }}" +
"/otelcol-contrib{{- if eq .Os \"windows\" }}.exe{{ end }}",
},
Goos: goos,
Goarch: archs,
Goarm: ArmVersions(dist),
Dir: "_build",
Binary: dist,
Ignore: IgnoreBuildCombinations(dist),
Goos: goos,
Goarch: archs,
Goarm: ArmVersions(dist),
Goppc64: Ppc64Versions(dist),
Dir: "_build",
Binary: dist,
Ignore: IgnoreBuildCombinations(dist),
}
}

Expand All @@ -130,10 +138,11 @@ func Build(dist string, buildOrRest bool) config.Build {
Flags: []string{"-trimpath"},
Ldflags: []string{"-s", "-w"},
},
Goos: goos,
Goarch: archs,
Goarm: ArmVersions(dist),
Ignore: IgnoreBuildCombinations(dist),
Goos: goos,
Goarch: archs,
Goarm: ArmVersions(dist),
Goppc64: Ppc64Versions(dist),
Ignore: IgnoreBuildCombinations(dist),
}
}

Expand All @@ -158,6 +167,10 @@ func ArmVersions(dist string) []string {
return []string{"7"}
}

func Ppc64Versions(dist string) []string {
return []string{"power8"}
}

func Archives(dist string) []config.Archive {
return []config.Archive{
Archive(dist),
Expand Down Expand Up @@ -210,7 +223,7 @@ func Packages(dist string) []config.NFPM {
// Package configures goreleaser to build a system package.
// https://goreleaser.com/customization/nfpm/
func Package(dist string) config.NFPM {
nfpmContents := config.NFPMContents{
nfpmContents := []config.NFPMContent{
{
Source: fmt.Sprintf("%s.service", dist),
Destination: path.Join("/lib", "systemd", "system", fmt.Sprintf("%s.service", dist)),
Expand All @@ -222,7 +235,7 @@ func Package(dist string) config.NFPM {
},
}
if _, ok := DefaultConfigDists[dist]; ok {
nfpmContents = append(nfpmContents, &config.NFPMContent{
nfpmContents = append(nfpmContents, config.NFPMContent{
Source: "config.yaml",
Destination: path.Join("/etc", dist, "config.yaml"),
Type: "config|noreplace",
Expand Down
5 changes: 5 additions & 0 deletions distributions/otelcol-contrib/.goreleaser-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ builds:
- s390x
goarm:
- "7"
goppc64:
- power8
ignore:
- goos: darwin
goarch: "386"
Expand All @@ -37,6 +39,9 @@ builds:
- -trimpath
env:
- CGO_ENABLED=0
archives:
- formats:
- binary
monorepo:
tag_prefix: v
partial:
Expand Down
2 changes: 2 additions & 0 deletions distributions/otelcol-contrib/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ builds:
- s390x
goarm:
- "7"
goppc64:
- power8
ignore:
- goos: darwin
goarch: "386"
Expand Down
2 changes: 2 additions & 0 deletions distributions/otelcol-k8s/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ builds:
- arm64
- ppc64le
- s390x
goppc64:
- power8
dir: _build
binary: otelcol-k8s
ldflags:
Expand Down
2 changes: 2 additions & 0 deletions distributions/otelcol-otlp/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ builds:
- s390x
goarm:
- "7"
goppc64:
- power8
ignore:
- goos: darwin
goarch: "386"
Expand Down
2 changes: 2 additions & 0 deletions distributions/otelcol/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ builds:
- s390x
goarm:
- "7"
goppc64:
- power8
ignore:
- goos: darwin
goarch: "386"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-releases
go 1.23

require (
github.com/goreleaser/goreleaser-pro/v2 v2.4.8-pro
github.com/goreleaser/goreleaser-pro/v2 v2.7.0
gopkg.in/yaml.v3 v3.0.1
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/goreleaser/goreleaser-pro/v2 v2.4.8-pro h1:crnjm84+p9HnuVGkq12T4fkKJQddR5bdu6kA5KoiNq8=
github.com/goreleaser/goreleaser-pro/v2 v2.4.8-pro/go.mod h1:GA7Uzk7qKA3efeDmgfWwcMTrDJe+V7D6H5RMqXlFvuc=
github.com/goreleaser/goreleaser-pro/v2 v2.7.0 h1:07p7y2N3chwz1MIs5HwnkTE/OUo63asEQeuPyVP6eag=
github.com/goreleaser/goreleaser-pro/v2 v2.7.0/go.mod h1:GA7Uzk7qKA3efeDmgfWwcMTrDJe+V7D6H5RMqXlFvuc=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
Expand Down

0 comments on commit 00024a9

Please sign in to comment.