-
Notifications
You must be signed in to change notification settings - Fork 53
/
.goreleaser.develop.yaml
207 lines (207 loc) · 9.44 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
version: 2
project_name: ccip
env:
- IMG_PRE={{ if index .Env "IMAGE_PREFIX" }}{{ .Env.IMAGE_PREFIX }}{{ else }}localhost:5001{{ end }}
- IMG_TAG={{ if index .Env "IMAGE_TAG" }}{{ .Env.IMAGE_TAG }}{{ else }}develop{{ end }}
- CGO_ENABLED=1
- VERSION={{ if index .Env "CHAINLINK_VERSION" }}{{ .Env.CHAINLINK_VERSION }}{{ else }}v0.0.0-local{{ end }}
release:
disable: "true"
builds:
- targets:
- go_first_class
binary: chainlink
hooks:
post:
- cmd: ./tools/bin/goreleaser_utils build_post_hook {{ dir .Path }}
no_unique_dist_dir: "true"
ldflags:
- -s -w -r=$ORIGIN/libs
- -X github.com/smartcontractkit/chainlink/v2/core/static.Sha={{ .FullCommit }}
- |-
-extldflags "-Wl,--dynamic-linker={{ if contains .Runtime.Goarch "amd64" -}}
/lib64/ld-linux-x86-64.so.2
{{- else if contains .Runtime.Goarch "arm64" -}}
/lib/ld-linux-aarch64.so.1
{{- end }}"
- -X github.com/smartcontractkit/chainlink/v2/core/static.Version={{ .Env.VERSION }}
flags:
- -trimpath
- -buildmode=pie
archives:
- format: binary
snapshot:
version_template: '{{ .Env.VERSION }}-{{ .ShortCommit }}'
checksum:
name_template: checksums.txt
dockers:
- id: linux-amd64-ccip
goos: linux
goarch: amd64
dockerfile: core/chainlink.goreleaser.Dockerfile
image_templates:
- '{{ .Env.IMG_PRE }}/ccip:{{ .Env.IMG_TAG }}'
- '{{ .Env.IMG_PRE }}/ccip:{{ .Env.IMG_TAG }}-amd64'
- '{{ .Env.IMG_PRE }}/ccip:sha-{{ .ShortCommit }}-amd64'
extra_files:
- tmp/libs
- ccip/config
build_flag_templates:
- --platform=linux/amd64
- --pull
- --build-arg=CHAINLINK_USER=chainlink
- --build-arg=COMMIT_SHA={{ .FullCommit }}
- --build-arg=CL_CHAIN_DEFAULTS=/chainlink/ccip-config
- --label=org.opencontainers.image.created={{ .Date }}
- --label=org.opencontainers.image.description="node of the decentralized oracle network, bridging on and off-chain computation"
- --label=org.opencontainers.image.licenses=MIT
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.source=https://github.com/smartcontractkit/chainlink
- --label=org.opencontainers.image.title=chainlink
- --label=org.opencontainers.image.url=https://github.com/smartcontractkit/chainlink
- --label=org.opencontainers.image.version={{ .Env.VERSION }}
use: buildx
- id: linux-amd64-ccip-plugins
goos: linux
goarch: amd64
dockerfile: core/chainlink.goreleaser.Dockerfile
image_templates:
- '{{ .Env.IMG_PRE }}/ccip:{{ .Env.IMG_TAG }}-plugins'
- '{{ .Env.IMG_PRE }}/ccip:{{ .Env.IMG_TAG }}-plugins-amd64'
- '{{ .Env.IMG_PRE }}/ccip:sha-{{ .ShortCommit }}-plugins-amd64'
extra_files:
- tmp/libs
- tmp/plugins
- ccip/config
build_flag_templates:
- --platform=linux/amd64
- --pull
- --build-arg=CHAINLINK_USER=chainlink
- --build-arg=COMMIT_SHA={{ .FullCommit }}
- --build-arg=CL_CHAIN_DEFAULTS=/chainlink/ccip-config
- --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="node of the decentralized oracle network, bridging on and off-chain computation"
- --label=org.opencontainers.image.licenses=MIT
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.source=https://github.com/smartcontractkit/chainlink
- --label=org.opencontainers.image.title=chainlink
- --label=org.opencontainers.image.url=https://github.com/smartcontractkit/chainlink
- --label=org.opencontainers.image.version={{ .Env.VERSION }}
use: buildx
- id: linux-arm64-ccip
goos: linux
goarch: arm64
dockerfile: core/chainlink.goreleaser.Dockerfile
image_templates:
- '{{ .Env.IMG_PRE }}/ccip:{{ .Env.IMG_TAG }}-arm64'
- '{{ .Env.IMG_PRE }}/ccip:sha-{{ .ShortCommit }}-arm64'
extra_files:
- tmp/libs
- ccip/config
build_flag_templates:
- --platform=linux/arm64
- --pull
- --build-arg=CHAINLINK_USER=chainlink
- --build-arg=COMMIT_SHA={{ .FullCommit }}
- --build-arg=CL_CHAIN_DEFAULTS=/chainlink/ccip-config
- --label=org.opencontainers.image.created={{ .Date }}
- --label=org.opencontainers.image.description="node of the decentralized oracle network, bridging on and off-chain computation"
- --label=org.opencontainers.image.licenses=MIT
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.source=https://github.com/smartcontractkit/chainlink
- --label=org.opencontainers.image.title=chainlink
- --label=org.opencontainers.image.url=https://github.com/smartcontractkit/chainlink
- --label=org.opencontainers.image.version={{ .Env.VERSION }}
use: buildx
- id: linux-arm64-ccip-plugins
goos: linux
goarch: arm64
dockerfile: core/chainlink.goreleaser.Dockerfile
image_templates:
- '{{ .Env.IMG_PRE }}/ccip:{{ .Env.IMG_TAG }}-plugins-arm64'
- '{{ .Env.IMG_PRE }}/ccip:sha-{{ .ShortCommit }}-plugins-arm64'
extra_files:
- tmp/libs
- tmp/plugins
- ccip/config
build_flag_templates:
- --platform=linux/arm64
- --pull
- --build-arg=CHAINLINK_USER=chainlink
- --build-arg=COMMIT_SHA={{ .FullCommit }}
- --build-arg=CL_CHAIN_DEFAULTS=/chainlink/ccip-config
- --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="node of the decentralized oracle network, bridging on and off-chain computation"
- --label=org.opencontainers.image.licenses=MIT
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.source=https://github.com/smartcontractkit/chainlink
- --label=org.opencontainers.image.title=chainlink
- --label=org.opencontainers.image.url=https://github.com/smartcontractkit/chainlink
- --label=org.opencontainers.image.version={{ .Env.VERSION }}
use: buildx
docker_manifests:
- id: tagged-chainlink
name_template: '{{ .Env.IMAGE_PREFIX }}/chainlink:{{ .Env.IMG_TAG }}'
image_templates:
- '{{ .Env.IMAGE_PREFIX }}/chainlink:{{ .Env.IMG_TAG }}'
- '{{ .Env.IMAGE_PREFIX }}/chainlink:{{ .Env.IMG_TAG }}-amd64'
- '{{ .Env.IMAGE_PREFIX }}/chainlink:{{ .Env.IMG_TAG }}-arm64'
- id: sha-chainlink
name_template: '{{ .Env.IMAGE_PREFIX }}/chainlink:sha-{{ .ShortCommit }}'
image_templates:
- '{{ .Env.IMAGE_PREFIX }}/chainlink:sha-{{ .ShortCommit }}-amd64'
- '{{ .Env.IMAGE_PREFIX }}/chainlink:sha-{{ .ShortCommit }}-arm64'
- id: tagged-plugins-chainlink
name_template: '{{ .Env.IMAGE_PREFIX }}/chainlink:{{ .Env.IMG_TAG }}-plugins'
image_templates:
- '{{ .Env.IMAGE_PREFIX }}/chainlink:{{ .Env.IMG_TAG }}-plugins'
- '{{ .Env.IMAGE_PREFIX }}/chainlink:{{ .Env.IMG_TAG }}-plugins-amd64'
- '{{ .Env.IMAGE_PREFIX }}/chainlink:{{ .Env.IMG_TAG }}-plugins-arm64'
- id: sha-plugins-chainlink
name_template: '{{ .Env.IMAGE_PREFIX }}/chainlink:sha-{{ .ShortCommit }}-plugins'
image_templates:
- '{{ .Env.IMAGE_PREFIX }}/chainlink:sha-{{ .ShortCommit }}-plugins-amd64'
- '{{ .Env.IMAGE_PREFIX }}/chainlink:sha-{{ .ShortCommit }}-plugins-arm64'
- id: tagged-ccip
name_template: '{{ .Env.IMAGE_PREFIX }}/ccip:{{ .Env.IMG_TAG }}'
image_templates:
- '{{ .Env.IMAGE_PREFIX }}/ccip:{{ .Env.IMG_TAG }}'
- '{{ .Env.IMAGE_PREFIX }}/ccip:{{ .Env.IMG_TAG }}-amd64'
- '{{ .Env.IMAGE_PREFIX }}/ccip:{{ .Env.IMG_TAG }}-arm64'
- id: sha-ccip
name_template: '{{ .Env.IMAGE_PREFIX }}/ccip:sha-{{ .ShortCommit }}'
image_templates:
- '{{ .Env.IMAGE_PREFIX }}/ccip:sha-{{ .ShortCommit }}-amd64'
- '{{ .Env.IMAGE_PREFIX }}/ccip:sha-{{ .ShortCommit }}-arm64'
- id: tagged-plugins-ccip
name_template: '{{ .Env.IMAGE_PREFIX }}/ccip:{{ .Env.IMG_TAG }}-plugins'
image_templates:
- '{{ .Env.IMAGE_PREFIX }}/ccip:{{ .Env.IMG_TAG }}-plugins'
- '{{ .Env.IMAGE_PREFIX }}/ccip:{{ .Env.IMG_TAG }}-plugins-amd64'
- '{{ .Env.IMAGE_PREFIX }}/ccip:{{ .Env.IMG_TAG }}-plugins-arm64'
- id: sha-plugins-ccip
name_template: '{{ .Env.IMAGE_PREFIX }}/ccip:sha-{{ .ShortCommit }}-plugins'
image_templates:
- '{{ .Env.IMAGE_PREFIX }}/ccip:sha-{{ .ShortCommit }}-plugins-amd64'
- '{{ .Env.IMAGE_PREFIX }}/ccip:sha-{{ .ShortCommit }}-plugins-arm64'
changelog:
disable: "true"
before:
hooks:
- cmd: go mod tidy
- cmd: ./tools/bin/goreleaser_utils before_hook
git:
ignore_tags:
- contracts-ccip/v1.5.0-beta.0
partial:
by: target
nightly:
version_template: '{{ .Env.VERSION }}-{{ .Env.IMG_TAG }}'