diff --git a/deploy/.goreleaser.yaml b/deploy/.goreleaser.yaml index 140ccb6c..43854ad1 100644 --- a/deploy/.goreleaser.yaml +++ b/deploy/.goreleaser.yaml @@ -40,6 +40,24 @@ builds: flags: -tags netgo -tags containers_image_ostree_stub -tags exclude_graphdriver_devicemapper -tags exclude_graphdriver_btrfs -tags containers_image_openpgp -installsuffix netgo binary: support-bundle hooks: {} + - id: collect + goos: + - linux + - darwin + - windows + goarch: + - amd64 + env: + - CGO_ENABLED=0 + main: cmd/collect/main.go + ldflags: -s -w + -X github.com/replicatedhq/troubleshoot/pkg/version.version={{.Version}} + -X github.com/replicatedhq/troubleshoot/pkg/version.gitSHA={{.Commit}} + -X github.com/replicatedhq/troubleshoot/pkg/version.buildTime={{.Date}} + -extldflags "-static" + flags: -tags netgo -tags containers_image_ostree_stub -tags exclude_graphdriver_devicemapper -tags exclude_graphdriver_btrfs -tags containers_image_openpgp -installsuffix netgo + binary: collect + hooks: {} archives: - id: preflight builds: @@ -81,6 +99,26 @@ archives: - src: 'sbom/assets/*' dst: . strip_parent: true # this is needed to make up for the way unzips work in krew v0.4.1 + - id: collect + builds: + - collect + format: tar.gz + format_overrides: + - goos: windows + format: zip + name_template: 'collect_{{ .Os }}_{{ .Arch }}' + files: + - licence* + - LICENCE* + - license* + - LICENSE* + - readme* + - README* + - changelog* + - CHANGELOG* + - src: 'sbom/assets/*' + dst: . + strip_parent: true # this is needed to make up for the way unzips work in krew v0.4.1 dockers: - dockerfile: ./deploy/Dockerfile.troubleshoot image_templates: @@ -91,6 +129,7 @@ dockers: ids: - support-bundle - preflight + - collect - dockerfile: ./deploy/Dockerfile.troubleshoot image_templates: - "replicated/preflight:latest" @@ -100,3 +139,4 @@ dockers: ids: - support-bundle - preflight + - collect