Skip to content

Commit

Permalink
During build, add standard capability binaries to -plugins image
Browse files Browse the repository at this point in the history
  • Loading branch information
justinkaseman committed Dec 17, 2024
1 parent 52c2db4 commit e75054b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/build-publish-develop-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,28 @@ jobs:
goarch: arm64
dist_name: linux_arm64_v8.0
steps:
- name: Checkout repository
- name: Setup Github Token
id: token
uses: smartcontractkit/.github/actions/setup-github-token@ef78fa97bf3c77de6563db1175422703e9e6674f # [email protected]
with:
aws-role-arn: ${{ secrets.AWS_OIDC_GLOBAL_READ_ONLY_TOKEN_ISSUER_ROLE_ARN }}
aws-lambda-url: ${{ secrets.AWS_INFRA_RELENG_TOKEN_ISSUER_LAMBDA_URL }}
aws-region: ${{ secrets.AWS_REGION }}
set-git-config: "true"

- name: Checkout chainlink repository
uses: actions/[email protected]
with:
ref: ${{ env.CHECKOUT_REF }}
fetch-depth: 0

- name: Checkout capabilities repository
uses: actions/[email protected]
with:
repository: smartcontractkit/capabilities
token: ${{ steps.token.outputs.access-token }}
path: capabilities

- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
Expand Down
10 changes: 10 additions & 0 deletions tools/bin/goreleaser_utils
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ before_hook() {
install_local_plugins
install_remote_plugins
mkdir -p "$lib_path/plugins"
build_standard_capabilities

# Retrieve GOPATH
GOPATH=$(go env GOPATH)
Expand Down Expand Up @@ -71,6 +72,15 @@ get_remote_plugin_paths() {
done
}

build_standard_capabilities() {
cd ./capabilities
npx [email protected] init
./nx run-many -t build
# binaries get put into /bin under /bin/amd64/ and /bin/arm64/
cp "./bin/$(go env GOARCH)"/* "../$lib_path/plugins"
cd ../
}

install_remote_plugins() {
ldflags=(-ldflags "$(./tools/bin/ldflags)")

Expand Down

0 comments on commit e75054b

Please sign in to comment.