-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
.goreleaser.develop.yaml
214 lines (203 loc) · 9.18 KB
/
.goreleaser.develop.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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
project_name: chainlink
version: 2
env:
- ZIG_EXEC={{ if index .Env "ZIG_EXEC" }}{{ .Env.ZIG_EXEC }}{{ else }}zig{{ end }}
- IMAGE_PREFIX={{ if index .Env "IMAGE_PREFIX" }}{{ .Env.IMAGE_PREFIX }}{{ else }}localhost:5001{{ end }}
- IMAGE_NAME={{ if index .Env "IMAGE_NAME" }}{{ .Env.IMAGE_NAME }}{{ else }}chainlink{{ end }}
- IMAGE_TAG={{ if index .Env "IMAGE_TAG" }}{{ .Env.IMAGE_TAG }}{{ else }}develop{{ end }}
- IMAGE_LABEL_DESCRIPTION="node of the decentralized oracle network, bridging on and off-chain computation"
- IMAGE_LABEL_LICENSES="MIT"
- IMAGE_LABEL_SOURCE="https://github.com/smartcontractkit/{{ .ProjectName }}"
before:
hooks:
- go mod tidy
- ./tools/bin/goreleaser_utils before_hook
# See https://goreleaser.com/customization/build/
builds:
- binary: chainlink
id: linux-arm64
goos:
- linux
goarch:
- arm64
hooks:
post: ./tools/bin/goreleaser_utils build_post_hook {{ dir .Path }} {{ .Os }} {{ .Arch }}
env:
- CGO_ENABLED=1
- CC=$ZIG_EXEC cc -target aarch64-linux-gnu
- CCX=$ZIG_EXEC c++ -target aarch64-linux-gnu
flags:
- -trimpath
- -buildmode=pie
ldflags:
- -s -w -r=$ORIGIN/libs
- -X github.com/smartcontractkit/chainlink/v2/core/static.Version={{ .Env.CHAINLINK_VERSION }}
- -X github.com/smartcontractkit/chainlink/v2/core/static.Sha={{ .FullCommit }}
- binary: chainlink
id: linux-amd64
goos:
- linux
goarch:
- amd64
hooks:
post: ./tools/bin/goreleaser_utils build_post_hook {{ dir .Path }} {{ .Os }} {{ .Arch }}
env:
- CGO_ENABLED=1
- CC=$ZIG_EXEC cc -target x86_64-linux-gnu
- CCX=$ZIG_EXEC c++ -target x86_64-linux-gnu
flags:
- -trimpath
- -buildmode=pie
ldflags:
- -s -w -r=$ORIGIN/libs
- -X github.com/smartcontractkit/chainlink/v2/core/static.Version={{ .Env.CHAINLINK_VERSION }}
- -X github.com/smartcontractkit/chainlink/v2/core/static.Sha={{ .FullCommit }}
# See https://goreleaser.com/customization/docker/
dockers:
- id: linux-amd64
dockerfile: core/chainlink.goreleaser.Dockerfile
use: buildx
goos: linux
goarch: amd64
extra_files:
- tmp/linux_amd64/libs
- tools/bin/ldd_fix
build_flag_templates:
- "--platform=linux/amd64"
- "--pull"
- "--build-arg=CHAINLINK_USER=chainlink"
- "--build-arg=COMMIT_SHA={{ .FullCommit }}"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.description={{ .Env.IMAGE_LABEL_DESCRIPTION }}"
- "--label=org.opencontainers.image.licenses={{ .Env.IMAGE_LABEL_LICENSES }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.source={{ .Env.IMAGE_LABEL_SOURCE }}"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.version={{ .Env.CHAINLINK_VERSION }}"
- "--label=org.opencontainers.image.url={{ .Env.IMAGE_LABEL_SOURCE }}"
image_templates:
- "{{ .Env.IMAGE_PREFIX }}/{{ .Env.IMAGE_NAME }}:{{ .Env.IMAGE_TAG }}"
- "{{ .Env.IMAGE_PREFIX }}/{{ .Env.IMAGE_NAME }}:{{ .Env.IMAGE_TAG }}-amd64"
- "{{ .Env.IMAGE_PREFIX }}/{{ .Env.IMAGE_NAME }}:sha-{{ .ShortCommit }}-amd64"
- id: linux-arm64
dockerfile: core/chainlink.goreleaser.Dockerfile
use: buildx
goos: linux
goarch: arm64
extra_files:
- tmp/linux_arm64/libs
- tools/bin/ldd_fix
build_flag_templates:
- "--platform=linux/arm64"
- "--pull"
- "--build-arg=CHAINLINK_USER=chainlink"
- "--build-arg=COMMIT_SHA={{ .FullCommit }}"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.description={{ .Env.IMAGE_LABEL_DESCRIPTION }}"
- "--label=org.opencontainers.image.licenses={{ .Env.IMAGE_LABEL_LICENSES }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.source={{ .Env.IMAGE_LABEL_SOURCE }}"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.version={{ .Env.CHAINLINK_VERSION }}"
- "--label=org.opencontainers.image.url={{ .Env.IMAGE_LABEL_SOURCE }}"
image_templates:
- "{{ .Env.IMAGE_PREFIX }}/{{ .Env.IMAGE_NAME }}:{{ .Env.IMAGE_TAG }}-arm64"
- "{{ .Env.IMAGE_PREFIX }}/{{ .Env.IMAGE_NAME }}:sha-{{ .ShortCommit }}-arm64"
- id: linux-amd64-plugins
dockerfile: core/chainlink.goreleaser.Dockerfile
use: buildx
goos: linux
goarch: amd64
extra_files:
- tmp/linux_amd64/libs
- tmp/linux_amd64/plugins
- tools/bin/ldd_fix
build_flag_templates:
- "--platform=linux/amd64"
- "--pull"
- "--build-arg=CHAINLINK_USER=chainlink"
- "--build-arg=COMMIT_SHA={{ .FullCommit }}"
- "--build-arg=CL_MEDIAN_CMD=chainlink-feeds"
- "--build-arg=CL_MERCURY_CMD=chainlink-mercury"
- "--build-arg=CL_SOLANA_CMD=chainlink-solana"
- "--build-arg=CL_STARKNET_CMD=chainlink-starknet"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.description={{ .Env.IMAGE_LABEL_DESCRIPTION }}"
- "--label=org.opencontainers.image.licenses={{ .Env.IMAGE_LABEL_LICENSES }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.source={{ .Env.IMAGE_LABEL_SOURCE }}"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.version={{ .Env.CHAINLINK_VERSION }}"
- "--label=org.opencontainers.image.url={{ .Env.IMAGE_LABEL_SOURCE }}"
image_templates:
- "{{ .Env.IMAGE_PREFIX }}/{{ .Env.IMAGE_NAME }}:{{ .Env.IMAGE_TAG }}-plugins"
- "{{ .Env.IMAGE_PREFIX }}/{{ .Env.IMAGE_NAME }}:{{ .Env.IMAGE_TAG }}-plugins-amd64"
- "{{ .Env.IMAGE_PREFIX }}/{{ .Env.IMAGE_NAME }}:sha-{{ .ShortCommit }}-plugins-amd64"
- id: linux-arm64-plugins
dockerfile: core/chainlink.goreleaser.Dockerfile
use: buildx
goos: linux
goarch: arm64
extra_files:
- tmp/linux_arm64/libs
- tmp/linux_arm64/plugins
- tools/bin/ldd_fix
build_flag_templates:
- "--platform=linux/arm64"
- "--pull"
- "--build-arg=CHAINLINK_USER=chainlink"
- "--build-arg=COMMIT_SHA={{ .FullCommit }}"
- "--build-arg=CL_MEDIAN_CMD=chainlink-feeds"
- "--build-arg=CL_MERCURY_CMD=chainlink-mercury"
- "--build-arg=CL_SOLANA_CMD=chainlink-solana"
- "--build-arg=CL_STARKNET_CMD=chainlink-starknet"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.description={{ .Env.IMAGE_LABEL_DESCRIPTION }}"
- "--label=org.opencontainers.image.licenses={{ .Env.IMAGE_LABEL_LICENSES }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.source={{ .Env.IMAGE_LABEL_SOURCE }}"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.version={{ .Env.CHAINLINK_VERSION }}"
- "--label=org.opencontainers.image.url={{ .Env.IMAGE_LABEL_SOURCE }}"
image_templates:
- "{{ .Env.IMAGE_PREFIX }}/{{ .Env.IMAGE_NAME }}:{{ .Env.IMAGE_TAG }}-plugins-arm64"
- "{{ .Env.IMAGE_PREFIX }}/{{ .Env.IMAGE_NAME }}:sha-{{ .ShortCommit }}-plugins-arm64"
# See https://goreleaser.com/customization/docker_manifest/
docker_manifests:
- name_template: "{{ .Env.IMAGE_PREFIX }}/{{ .Env.IMAGE_NAME }}:{{ .Env.IMAGE_TAG }}"
image_templates:
- "{{ .Env.IMAGE_PREFIX }}/{{ .Env.IMAGE_NAME }}:{{ .Env.IMAGE_TAG }}"
- "{{ .Env.IMAGE_PREFIX }}/{{ .Env.IMAGE_NAME }}:{{ .Env.IMAGE_TAG }}-amd64"
- "{{ .Env.IMAGE_PREFIX }}/{{ .Env.IMAGE_NAME }}:{{ .Env.IMAGE_TAG }}-arm64"
- name_template: "{{ .Env.IMAGE_PREFIX }}/{{ .Env.IMAGE_NAME }}:sha-{{ .ShortCommit }}"
image_templates:
- "{{ .Env.IMAGE_PREFIX }}/{{ .Env.IMAGE_NAME }}:sha-{{ .ShortCommit }}-amd64"
- "{{ .Env.IMAGE_PREFIX }}/{{ .Env.IMAGE_NAME }}:sha-{{ .ShortCommit }}-arm64"
- name_template: "{{ .Env.IMAGE_PREFIX }}/{{ .Env.IMAGE_NAME }}:{{ .Env.IMAGE_TAG }}-plugins"
image_templates:
- "{{ .Env.IMAGE_PREFIX }}/{{ .Env.IMAGE_NAME }}:{{ .Env.IMAGE_TAG }}-plugins"
- "{{ .Env.IMAGE_PREFIX }}/{{ .Env.IMAGE_NAME }}:{{ .Env.IMAGE_TAG }}-plugins-amd64"
- "{{ .Env.IMAGE_PREFIX }}/{{ .Env.IMAGE_NAME }}:{{ .Env.IMAGE_TAG }}-plugins-arm64"
- name_template: "{{ .Env.IMAGE_PREFIX }}/{{ .Env.IMAGE_NAME }}:sha-{{ .ShortCommit }}-plugins"
image_templates:
- "{{ .Env.IMAGE_PREFIX }}/{{ .Env.IMAGE_NAME }}:sha-{{ .ShortCommit }}-plugins-amd64"
- "{{ .Env.IMAGE_PREFIX }}/{{ .Env.IMAGE_NAME }}:sha-{{ .ShortCommit }}-plugins-arm64"
# See https://goreleaser.com/customization/docker_sign/
docker_signs:
- artifacts: all
stdin: "{{ .Env.COSIGN_PASSWORD }}"
checksum:
name_template: "checksums.txt"
snapshot:
version_template: "{{ .Env.CHAINLINK_VERSION }}-{{ .ShortCommit }}"
partial:
by: target
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
# modelines, feel free to remove those if you don't want/use them:
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj