From e75054b4619b709167efd299639be8dffd2a3a4d Mon Sep 17 00:00:00 2001 From: Justin Kaseman Date: Mon, 16 Dec 2024 22:30:57 -0800 Subject: [PATCH 1/2] During build, add standard capability binaries to -plugins image --- .github/workflows/build-publish-develop-pr.yml | 18 +++++++++++++++++- tools/bin/goreleaser_utils | 10 ++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-publish-develop-pr.yml b/.github/workflows/build-publish-develop-pr.yml index 92d9e0445a6..92bfd54e4a2 100644 --- a/.github/workflows/build-publish-develop-pr.yml +++ b/.github/workflows/build-publish-develop-pr.yml @@ -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 # setup-github-token@0.2.1 + 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/checkout@v4.2.1 with: ref: ${{ env.CHECKOUT_REF }} fetch-depth: 0 + - name: Checkout capabilities repository + uses: actions/checkout@v4.2.1 + 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: diff --git a/tools/bin/goreleaser_utils b/tools/bin/goreleaser_utils index 0bf745d5a58..e38acf6494b 100755 --- a/tools/bin/goreleaser_utils +++ b/tools/bin/goreleaser_utils @@ -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) @@ -71,6 +72,15 @@ get_remote_plugin_paths() { done } +build_standard_capabilities() { + cd ./capabilities + npx nx@19.8.2 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)") From 3eab1124cab7de1a004514c9569d773ca4750704 Mon Sep 17 00:00:00 2001 From: Justin Kaseman Date: Thu, 19 Dec 2024 10:18:03 -0800 Subject: [PATCH 2/2] Shift down token step --- .github/workflows/build-publish-develop-pr.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-publish-develop-pr.yml b/.github/workflows/build-publish-develop-pr.yml index 92bfd54e4a2..72b70631e4d 100644 --- a/.github/workflows/build-publish-develop-pr.yml +++ b/.github/workflows/build-publish-develop-pr.yml @@ -83,6 +83,12 @@ jobs: goarch: arm64 dist_name: linux_arm64_v8.0 steps: + - name: Checkout chainlink repository + uses: actions/checkout@v4.2.1 + with: + ref: ${{ env.CHECKOUT_REF }} + fetch-depth: 0 + - name: Setup Github Token id: token uses: smartcontractkit/.github/actions/setup-github-token@ef78fa97bf3c77de6563db1175422703e9e6674f # setup-github-token@0.2.1 @@ -92,12 +98,6 @@ jobs: aws-region: ${{ secrets.AWS_REGION }} set-git-config: "true" - - name: Checkout chainlink repository - uses: actions/checkout@v4.2.1 - with: - ref: ${{ env.CHECKOUT_REF }} - fetch-depth: 0 - - name: Checkout capabilities repository uses: actions/checkout@v4.2.1 with: