From 9c2b91dc5dfcc38adec5cb017787f1b8a254ea6e Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Wed, 7 Jun 2023 19:11:01 -0700 Subject: [PATCH] Update GoReleaser config Changes: - Updates the configuration to remove '--rm-dist' deprecated flag - Changes extension of SBOM artifacts from .sbom to spdx.json to better represent the content of the file (.sbom is an extension that devs at GoReleaser came up with and not standard) - Adds section to override the version that is injected in the binary for snapshot builds. These are all the builds that are not an official release. --- .goreleaser.yml | 24 +++++++++++++----------- Makefile | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 8ecdbf5d60..eaac2c88bd 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -93,36 +93,38 @@ builds: tags: - aws -archives: - - id: kubernetes-ingress - builds: [kubernetes-ingress] - changelog: skip: true -checksum: - name_template: 'checksums.txt' +archives: + - id: kubernetes-ingress + builds: [kubernetes-ingress] sboms: - artifacts: archive ids: [kubernetes-ingress] + documents: + - "${artifact}.spdx.json" release: ids: [kubernetes-ingress] extra_files: - - glob: ./dist/**.sbom + - glob: ./dist/**.spdx.json blobs: - provider: azblob bucket: '{{.Env.AZURE_BUCKET_NAME}}' extra_files: - - glob: ./dist/**.sbom - -milestones: - - close: true + - glob: ./dist/**.spdx.json announce: slack: enabled: true channel: '#announcements' message_template: 'NGINX Ingress Controller {{ .Tag }} is out! Check it out: {{ .ReleaseURL }}' + +milestones: + - close: true + +snapshot: + name_template: 'edge' diff --git a/Makefile b/Makefile index b9b72a2dd7..393798dcdb 100644 --- a/Makefile +++ b/Makefile @@ -95,7 +95,7 @@ endif .PHONY: build-goreleaser build-goreleaser: ## Build Ingress Controller binary using GoReleaser @goreleaser -v || (code=$$?; printf "\033[0;31mError\033[0m: there was a problem with GoReleaser. Follow the docs to install it https://goreleaser.com/install\n"; exit $$code) - GOOS=linux GOPATH=$(shell go env GOPATH) GOARCH=$(ARCH) goreleaser build --rm-dist --debug --snapshot --id kubernetes-ingress --single-target + GOOS=linux GOPATH=$(shell go env GOPATH) GOARCH=$(ARCH) goreleaser build --clean --debug --snapshot --id kubernetes-ingress --single-target .PHONY: debian-image debian-image: build ## Create Docker image for Ingress Controller (Debian)