-
Notifications
You must be signed in to change notification settings - Fork 1
/
.goreleaser.yaml
159 lines (148 loc) · 5.09 KB
/
.goreleaser.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
release:
prerelease: auto
builds:
- binary: anchore-ecs-inventory
id: generic
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64
# Set the modified timestamp on the output binary to the git timestamp (to ensure a reproducible build)
mod_timestamp: '{{ .CommitTimestamp }}'
ldflags: |
-w
-s
-extldflags '-static'
-X github.com/anchore/ecs-inventory/internal/version.version={{.Version}}
-X github.com/anchore/ecs-inventory/internal/version.gitCommit={{.Commit}}
-X github.com/anchore/ecs-inventory/internal/version.buildDate={{.Date}}
-X github.com/anchore/ecs-inventory/internal/version.gitDescription={{.Summary}}
- binary: anchore-ecs-inventory
id: fips
env:
- CGO_ENABLED=1
- GOEXPERIMENT=boringcrypto
goos:
- linux
goarch:
- amd64
# Set the modified timestamp on the output binary to the git timestamp (to ensure a reproducible build)
mod_timestamp: '{{ .CommitTimestamp }}'
ldflags: |
-w
-linkmode=external
-extldflags '-static'
-X github.com/anchore/ecs-inventory/internal/version.version={{.Version}}
-X github.com/anchore/ecs-inventory/internal/version.gitCommit={{.Commit}}
-X github.com/anchore/ecs-inventory/internal/version.buildDate={{.Date}}
-X github.com/anchore/ecs-inventory/internal/version.gitDescription={{.Summary}}
archives:
- id: archive-generic
format: tar.gz
builds:
- generic
name_template: 'anchore-ecs-inventory_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
- id: archive-fips
format: tar.gz
builds:
- fips
name_template: 'anchore-ecs-inventory-fips_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
dockers:
- image_templates:
- "anchore/ecs-inventory:latest"
- "anchore/ecs-inventory:v{{ .Major }}-amd64"
- "anchore/ecs-inventory:v{{ .Major }}.{{ .Minor }}-amd64"
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
- image_templates:
- "anchore/ecs-inventory:{{ .Tag }}-amd64"
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/ecs-inventory:v{{ .Major }}-arm64v8"
- "anchore/ecs-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/ecs-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/ecs-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}}"
docker_manifests:
- name_template: anchore/ecs-inventory:{{ .Tag }}
image_templates:
- anchore/ecs-inventory:{{ .Tag }}-amd64
- anchore/ecs-inventory:{{ .Tag }}-fips-amd64
- anchore/ecs-inventory:v{{ .Major }}-amd64
- anchore/ecs-inventory:v{{ .Major }}.{{ .Minor }}-amd64
- anchore/ecs-inventory:{{ .Tag }}-arm64v8
- anchore/ecs-inventory:v{{ .Major }}-arm64v8
- anchore/ecs-inventory:v{{ .Major }}.{{ .Minor }}-arm64v8
skip_push: auto
- name_template: anchore/ecs-inventory:latest
image_templates:
- anchore/ecs-inventory:{{ .Tag }}-amd64
- anchore/ecs-inventory:{{ .Tag }}-fips-amd64
- anchore/ecs-inventory:v{{ .Major }}-amd64
- anchore/ecs-inventory:v{{ .Major }}.{{ .Minor }}-amd64
- anchore/ecs-inventory:{{ .Tag }}-arm64v8
- anchore/ecs-inventory:v{{ .Major }}-arm64v8
- anchore/ecs-inventory:v{{ .Major }}.{{ .Minor }}-arm64v8
skip_push: auto