-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c13341
commit d76dd1a
Showing
2 changed files
with
251 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,229 @@ | ||
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 | ||
- 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={{ .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 }}-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 | ||
- 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={{ .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 | ||
- ccip/config | ||
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" | ||
- "--build-arg=CL_CHAIN_DEFAULTS=/chainlink/ccip-config" | ||
- "--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-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 | ||
- ccip/config | ||
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" | ||
- "--build-arg=CL_CHAIN_DEFAULTS=/chainlink/ccip-config" | ||
- "--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 }}-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-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 | ||
args: | ||
- "sign" | ||
- "${artifact}" | ||
- "--yes" | ||
|
||
checksum: | ||
name_template: "checksums.txt" | ||
|
||
# See https://goreleaser.com/customization/sbom | ||
sboms: | ||
- artifacts: archive | ||
|
||
snapshot: | ||
version_template: "{{ .Env.CHAINLINK_VERSION }}-{{ .ShortCommit }}" | ||
|
||
partial: | ||
by: target | ||
|
||
# See https://goreleaser.com/customization/release/ | ||
release: | ||
disable: true | ||
|
||
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 |