Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 29 additions & 88 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,99 +66,40 @@ changelog:
- '^docs:'
- '^test:'

dockers:
- image_templates:
- "anchore/k8s-inventory:latest"
- "anchore/k8s-inventory:v{{ .Major }}-amd64"
- "anchore/k8s-inventory:v{{ .Major }}.{{ .Minor }}-amd64"
dockers_v2:
- id: generic
dockerfile: Dockerfile
use: buildx
ids:
- generic
build_flag_templates:
- "--platform=linux/amd64"
- "--build-arg=BUILD_DATE={{.Date}}"
- "--build-arg=BUILD_VERSION={{.Version}}"
- "--build-arg=VCS_REF={{.FullCommit}}"
- "--build-arg=VCS_URL={{.GitURL}}"
skip_push: auto
images:
- "anchore/k8s-inventory"
tags:
- "{{ .Tag }}"
- "{{ if not .Prerelease }}v{{ .Major }}{{ end }}"
- "{{ if not .Prerelease }}v{{ .Major }}.{{ .Minor }}{{ end }}"
- "{{ if not .Prerelease }}latest{{ end }}"
platforms:
- linux/amd64
- linux/arm64
build_args:
BUILD_DATE: "{{.Date}}"
BUILD_VERSION: "{{.Version}}"
VCS_REF: "{{.FullCommit}}"
VCS_URL: "{{.GitURL}}"

- image_templates:
- "anchore/k8s-inventory:{{ .Tag }}-amd64"
- id: fips
dockerfile: Dockerfile
use: buildx
ids:
- generic
build_flag_templates:
- "--platform=linux/amd64"
- "--build-arg=BUILD_DATE={{.Date}}"
- "--build-arg=BUILD_VERSION={{.Version}}"
- "--build-arg=VCS_REF={{.FullCommit}}"
- "--build-arg=VCS_URL={{.GitURL}}"

- image_templates:
- "anchore/k8s-inventory:v{{ .Major }}-arm64v8"
- "anchore/k8s-inventory:v{{ .Major }}.{{ .Minor }}-arm64v8"
goarch: arm64
dockerfile: Dockerfile
use: buildx
ids:
- generic
build_flag_templates:
- "--platform=linux/arm64/v8"
- "--build-arg=BUILD_DATE={{.Date}}"
- "--build-arg=BUILD_VERSION={{.Version}}"
- "--build-arg=VCS_REF={{.FullCommit}}"
- "--build-arg=VCS_URL={{.GitURL}}"
skip_push: auto

- image_templates:
- "anchore/k8s-inventory:{{ .Tag }}-arm64v8"
goarch: arm64
dockerfile: Dockerfile
use: buildx
ids:
- generic
build_flag_templates:
- "--platform=linux/arm64/v8"
- "--build-arg=BUILD_DATE={{.Date}}"
- "--build-arg=BUILD_VERSION={{.Version}}"
- "--build-arg=VCS_REF={{.FullCommit}}"
- "--build-arg=VCS_URL={{.GitURL}}"

- image_templates:
- "anchore/k8s-inventory:{{ .Tag }}-fips-amd64"
dockerfile: Dockerfile
use: buildx
ids:
- fips
build_flag_templates:
- "--platform=linux/amd64"
- "--build-arg=BUILD_DATE={{.Date}}"
- "--build-arg=BUILD_VERSION={{.Version}}"
- "--build-arg=VCS_REF={{.FullCommit}}"
- "--build-arg=VCS_URL={{.GitURL}}"
skip_push: auto
images:
- "anchore/k8s-inventory"
tags:
- "{{ .Tag }}-fips"
platforms:
- linux/amd64
build_args:
BUILD_DATE: "{{.Date}}"
BUILD_VERSION: "{{.Version}}"
VCS_REF: "{{.FullCommit}}"
VCS_URL: "{{.GitURL}}"

docker_manifests:
- name_template: anchore/k8s-inventory:{{ .Tag }}
image_templates:
- anchore/k8s-inventory:{{ .Tag }}-amd64
- anchore/k8s-inventory:{{ .Tag }}-fips-amd64
- anchore/k8s-inventory:v{{ .Major }}-amd64
- anchore/k8s-inventory:v{{ .Major }}.{{ .Minor }}-amd64
- anchore/k8s-inventory:{{ .Tag }}-arm64v8
- anchore/k8s-inventory:v{{ .Major }}-arm64v8
- anchore/k8s-inventory:v{{ .Major }}.{{ .Minor }}-arm64v8
skip_push: auto
- name_template: anchore/k8s-inventory:latest
image_templates:
- anchore/k8s-inventory:{{ .Tag }}-amd64
- anchore/k8s-inventory:{{ .Tag }}-fips-amd64
- anchore/k8s-inventory:v{{ .Major }}-amd64
- anchore/k8s-inventory:v{{ .Major }}.{{ .Minor }}-amd64
- anchore/k8s-inventory:{{ .Tag }}-arm64v8
- anchore/k8s-inventory:v{{ .Major }}-arm64v8
- anchore/k8s-inventory:v{{ .Major }}.{{ .Minor }}-arm64v8
skip_push: auto

3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certifica

WORKDIR /tmp

COPY anchore-k8s-inventory /
ARG TARGETPLATFORM
COPY ${TARGETPLATFORM}/anchore-k8s-inventory /

ARG BUILD_DATE
ARG BUILD_VERSION
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/anchore/k8s-inventory

go 1.25.0
go 1.25.7

require (
github.com/adrg/xdg v0.5.3
Expand Down
Loading