Skip to content

Commit

Permalink
Slightly modify goreleaser configs for CCIP
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryNguyen5 committed Oct 28, 2024
1 parent d888177 commit c174457
Show file tree
Hide file tree
Showing 5 changed files with 423 additions and 80 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build-publish-develop-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ jobs:
fail-fast: false
matrix:
include:
- image-name: chainlink
goreleaser-config: .goreleaser.develop.yaml
- image-name: ccip
goreleaser-config: .goreleaser.ccip.develop.yaml
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -112,4 +110,4 @@ jobs:
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
this-job-name: goreleaser-build-publish-${{ matrix.image-name }}
continue-on-error: true
continue-on-error: true
4 changes: 1 addition & 3 deletions .goreleaser.develop.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
project_name: chainlink

version: 2

project_name: ccip
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 }}
Expand Down
83 changes: 9 additions & 74 deletions .goreleaser.devspace.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
## goreleaser <1.14.0
project_name: ccip

version: 2

project_name: ccip
env:
- ZIG_EXEC={{ if index .Env "ZIG_EXEC" }}{{ .Env.ZIG_EXEC }}{{ else }}zig{{ end }}
- IMAGE_LABEL_DESCRIPTION="node of the decentralized oracle network, bridging on and off-chain computation"
Expand All @@ -23,74 +20,12 @@ builds:
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 -Wno-error=unused-command-line-argument
- CCX=$ZIG_EXEC c++ -target x86_64-linux-gnu -Wno-error=unused-command-line-argument
flags:
- -trimpath
- -buildmode=pie
ldflags:
- -s -w -r=$ORIGIN/libs
- -X github.com/smartcontractkit/chainlink/v2/core/static.Version={{ .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
- 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={{ .Version }}"
- "--label=org.opencontainers.image.url={{ .Env.IMAGE_LABEL_SOURCE }}"
image_templates:
- "{{ .Env.IMAGE }}"

# See https://goreleaser.com/customization/docker_manifest/
docker_manifests:
- name_template: "{{ .Env.IMAGE }}"
image_templates:
- "{{ .Env.IMAGE }}"

checksum:
name_template: "checksums.txt"

snapshot:
version_template: '{{ .Env.CHAINLINK_VERSION }}-{{ .Runtime.Goarch }}-{{ .Now.Format "2006-01-02-15-04-05Z" }}'

changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"

# See https://goreleaser.com/customization/git/
- cmd: go mod tidy
- cmd: ./tools/bin/goreleaser_utils before_hook
git:
ignore_tags:
- contracts-ccip/v1.5.0-beta.0

# 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
ignore_tags:
- contracts-ccip/v1.5.0-beta.0
partial:
by: target
nightly:
version_template: v0.0.0-{{ .Runtime.Goarch }}-{{ .Now.Format "2006-01-02-15-04-05Z" }}
Loading

0 comments on commit c174457

Please sign in to comment.