Skip to content

Commit

Permalink
Build standard capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
justinkaseman committed Dec 17, 2024
1 parent d4f8496 commit b13d1e3
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 26 deletions.
41 changes: 19 additions & 22 deletions .github/workflows/build-publish-develop-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,14 @@ env:

jobs:
image-tag:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
outputs:
image-tag: ${{ steps.get-image-tag.outputs.image-tag }}
release-type: ${{ steps.get-image-tag.outputs.release-type }}
steps:
- 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 capabilities repository
uses: actions/[email protected]
with:
repository: smartcontractkit/capabilities
token: ${{ steps.token.outputs.access-token }}

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

- name: Get image tag
Expand Down Expand Up @@ -102,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 All @@ -125,6 +122,7 @@ jobs:
- name: Build images for ${{ matrix.goarch }}
uses: ./.github/actions/goreleaser-build-sign-publish
if: github.event_name == 'workflow_dispatch' || steps.cache.outputs.cache-hit != 'true'
working-directory: ./chainlink
with:
docker-registry: ${{ secrets.AWS_SDLC_ECR_HOSTNAME }}
docker-image-tag: ${{ needs.image-tag.outputs.image-tag }}
Expand All @@ -143,7 +141,6 @@ jobs:
- name: Checkout repository
uses: actions/[email protected]
with:
repository: smartcontractkit/chainlink
ref: ${{ env.CHECKOUT_REF }}

- name: Configure aws credentials
Expand Down
15 changes: 12 additions & 3 deletions tools/bin/goreleaser_utils
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ set -xe
before_hook() {
local -r lib_path=tmp

echo $(ls)
echo $(ls ..)

mkdir -p "$lib_path/libs"
# Copy over all platform versions of the wasmvm library
cp -f "$(go list -json -m github.com/CosmWasm/wasmvm | jq -r '.Dir')"/internal/api/libwasmvm.* "$lib_path/libs"
Expand Down Expand Up @@ -74,7 +71,19 @@ get_remote_plugin_paths() {
done
}

build_standard_capabilities() {
ls ../
ls ../..
ls ../../..
ls ../../../..
cd ../capabilities/cron
# go install "${ldflags[@]}" .
# cd ../chainlink
}

install_remote_plugins() {
build_standard_capabilities

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

for plugin in $(get_remote_plugin_paths); do
Expand Down
2 changes: 1 addition & 1 deletion tools/goreleaser-config/gen_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func Generate(environment string) config.Project {
Cmd: "go mod tidy",
},
{
Cmd: "./tools/bin/goreleaser_utils before_hook", // modify this to include capabilities
Cmd: "./tools/bin/goreleaser_utils before_hook",
},
},
},
Expand Down

0 comments on commit b13d1e3

Please sign in to comment.