diff --git a/.github/workflows/base-ci-goreleaser.yaml b/.github/workflows/base-ci-goreleaser.yaml index b2eabf21..4f337f1c 100644 --- a/.github/workflows/base-ci-goreleaser.yaml +++ b/.github/workflows/base-ci-goreleaser.yaml @@ -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: @@ -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 @@ -148,11 +149,20 @@ 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 @@ -160,7 +170,7 @@ jobs: 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 diff --git a/.github/workflows/base-release.yaml b/.github/workflows/base-release.yaml index a2f6867b..4d4760af 100644 --- a/.github/workflows/base-release.yaml +++ b/.github/workflows/base-release.yaml @@ -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: @@ -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 diff --git a/.github/workflows/builder-release.yaml b/.github/workflows/builder-release.yaml index c7faf15e..d8832271 100644 --- a/.github/workflows/builder-release.yaml +++ b/.github/workflows/builder-release.yaml @@ -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: diff --git a/.github/workflows/builder-testbuild.yaml b/.github/workflows/builder-testbuild.yaml index 3550ecf9..1588d17a 100644 --- a/.github/workflows/builder-testbuild.yaml +++ b/.github/workflows/builder-testbuild.yaml @@ -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: diff --git a/cmd/builder/.goreleaser.yml b/cmd/builder/.goreleaser.yml index 0676967e..0f2f2a88 100644 --- a/cmd/builder/.goreleaser.yml +++ b/cmd/builder/.goreleaser.yml @@ -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: diff --git a/cmd/goreleaser/internal/configure.go b/cmd/goreleaser/internal/configure.go index 091fbffa..f756d249 100644 --- a/cmd/goreleaser/internal/configure.go +++ b/cmd/goreleaser/internal/configure.go @@ -59,6 +59,13 @@ func GenerateContribBuildOnly(dist string, buildOrRest bool) config.Project { TagPrefix: "v", }, Partial: Partial, + Archives: []config.Archive{ + { + Formats: []string{ + "binary", + }, + }, + }, } } @@ -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), } } @@ -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), } } @@ -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), @@ -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)), @@ -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", diff --git a/distributions/otelcol-contrib/.goreleaser-build.yaml b/distributions/otelcol-contrib/.goreleaser-build.yaml index 36d82931..d9210083 100644 --- a/distributions/otelcol-contrib/.goreleaser-build.yaml +++ b/distributions/otelcol-contrib/.goreleaser-build.yaml @@ -15,6 +15,8 @@ builds: - s390x goarm: - "7" + goppc64: + - power8 ignore: - goos: darwin goarch: "386" @@ -37,6 +39,9 @@ builds: - -trimpath env: - CGO_ENABLED=0 +archives: + - formats: + - binary monorepo: tag_prefix: v partial: diff --git a/distributions/otelcol-contrib/.goreleaser.yaml b/distributions/otelcol-contrib/.goreleaser.yaml index f3d520c9..ea5763f7 100644 --- a/distributions/otelcol-contrib/.goreleaser.yaml +++ b/distributions/otelcol-contrib/.goreleaser.yaml @@ -24,6 +24,8 @@ builds: - s390x goarm: - "7" + goppc64: + - power8 ignore: - goos: darwin goarch: "386" diff --git a/distributions/otelcol-k8s/.goreleaser.yaml b/distributions/otelcol-k8s/.goreleaser.yaml index bd0457bf..548aa225 100644 --- a/distributions/otelcol-k8s/.goreleaser.yaml +++ b/distributions/otelcol-k8s/.goreleaser.yaml @@ -11,6 +11,8 @@ builds: - arm64 - ppc64le - s390x + goppc64: + - power8 dir: _build binary: otelcol-k8s ldflags: diff --git a/distributions/otelcol-otlp/.goreleaser.yaml b/distributions/otelcol-otlp/.goreleaser.yaml index e4d91850..d61231df 100644 --- a/distributions/otelcol-otlp/.goreleaser.yaml +++ b/distributions/otelcol-otlp/.goreleaser.yaml @@ -23,6 +23,8 @@ builds: - s390x goarm: - "7" + goppc64: + - power8 ignore: - goos: darwin goarch: "386" diff --git a/distributions/otelcol/.goreleaser.yaml b/distributions/otelcol/.goreleaser.yaml index 8a73d0df..ecd17fc9 100644 --- a/distributions/otelcol/.goreleaser.yaml +++ b/distributions/otelcol/.goreleaser.yaml @@ -24,6 +24,8 @@ builds: - s390x goarm: - "7" + goppc64: + - power8 ignore: - goos: darwin goarch: "386" diff --git a/go.mod b/go.mod index 11d519a7..305b9759 100644 --- a/go.mod +++ b/go.mod @@ -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 ) diff --git a/go.sum b/go.sum index d2dbf057..31f4ceb2 100644 --- a/go.sum +++ b/go.sum @@ -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=