Skip to content

Commit

Permalink
adding docker and make tooling to run integ tests locally
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhuie19 committed Jul 11, 2024
1 parent f04e6cb commit 4d82f3e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ install-medianpoc: ## Build & install the chainlink-medianpoc binary.
install-ocr3-capability: ## Build & install the chainlink-ocr3-capability binary.
go install $(GOFLAGS) ./plugins/cmd/chainlink-ocr3-capability

.PHONY: install-ccip-exec
install-ccip-exec:
go install $(GOFLAGS) ./plugins/cmd/chainlink-ccip-exec

.PHONY: docker ## Build the chainlink docker image
docker:
docker buildx build \
Expand Down
3 changes: 3 additions & 0 deletions core/services/ocr2/plugins/ccip/ccipexec/initializers.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ func NewExecServices(ctx context.Context, lggr logger.Logger, cfg plugins.Regist
Cmd: loopCmd,
Env: envVars,
})
if err != nil {
return nil, fmt.Errorf("failed to register ccip exec plugin: %w", err)
}
// get reporting plugin factory from loop
factoryServer := loop.NewExecutionService(lggr, grpcOpts, cmdFn, srcProvider, dstProvider, uint32(srcChainID), uint32(dstChainID), sourceTokenAddress)
pluginFactory = factoryServer
Expand Down
4 changes: 4 additions & 0 deletions integration-tests/ccip-tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,7 @@ test_smoke_ccip_default: set_config
.PHONY: build_ccip_image
build_ccip_image:
docker build -f ../../core/chainlink.Dockerfile --build-arg COMMIT_SHA=$(git rev-parse HEAD) --build-arg CHAINLINK_USER=chainlink -t $(image):$(tag) ../../

.PHONY: build_ccip_plugin_image
build_ccip_plugin_image:
docker build -f ../../plugins/chainlink.Dockerfile --build-arg COMMIT_SHA=$(git rev-parse HEAD) --build-arg CHAINLINK_USER=chainlink -t $(image):$(tag) ../../
5 changes: 5 additions & 0 deletions plugins/chainlink.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ RUN make install-medianpoc
# Install ocr3-capability binary
RUN make install-ocr3-capability

# Install ccip-exec binary
RUN make install-ccip-exec

# Link LOOP Plugin source dirs with simple names
RUN go list -m -f "{{.Dir}}" github.com/smartcontractkit/chainlink-feeds | xargs -I % ln -s % /chainlink-feeds
RUN go list -m -f "{{.Dir}}" github.com/smartcontractkit/chainlink-data-streams | xargs -I % ln -s % /chainlink-data-streams
Expand Down Expand Up @@ -68,6 +71,7 @@ RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
COPY --from=buildgo /go/bin/chainlink /usr/local/bin/
COPY --from=buildgo /go/bin/chainlink-medianpoc /usr/local/bin/
COPY --from=buildgo /go/bin/chainlink-ocr3-capability /usr/local/bin/
COPY --from=buildgo /go/bin/chainlink-ccip-exec /usr/local/bin/

COPY --from=buildplugins /go/bin/chainlink-feeds /usr/local/bin/
ENV CL_MEDIAN_CMD chainlink-feeds
Expand All @@ -77,6 +81,7 @@ COPY --from=buildplugins /go/bin/chainlink-solana /usr/local/bin/
ENV CL_SOLANA_CMD chainlink-solana
COPY --from=buildplugins /go/bin/chainlink-starknet /usr/local/bin/
ENV CL_STARKNET_CMD chainlink-starknet
ENV CL_CCIP-EXEC_CMD chainlink-ccip-exec

# Dependency of CosmWasm/wasmd
COPY --from=buildgo /go/pkg/mod/github.com/\!cosm\!wasm/wasmvm@v*/internal/api/libwasmvm.*.so /usr/lib/
Expand Down

0 comments on commit 4d82f3e

Please sign in to comment.