Skip to content

Commit b0dc7f0

Browse files
feat: emit node platform build info event (#21606)
* feat: emit node platform build info event * fix: update node-platform dependency versions across modules * feat: emit docker image tag in node platform build info * fix: update node-platform dependency versions across all modules * test: update health response fixtures for node platform build info * test: update health testscripts for node platform build info * refactor: read node platform docker tag from runtime env * refactor: tighten node platform build info service wiring * fix: resolve node platform CSA key at service start * refactor: consume auto-injected docker tag from shared github workflows * chore: align github workflow refs with upstream shared actions
1 parent f6ec944 commit b0dc7f0

36 files changed

Lines changed: 338 additions & 47 deletions

File tree

.github/workflows/build-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
permissions:
9797
contents: read
9898
id-token: write
99-
uses: smartcontractkit/.github/.github/workflows/reusable-docker-build-publish.yml@a89ebdd9d9cabda77c5f7ea7523af5707afb7786 # 2025-08-25
99+
uses: smartcontractkit/.github/.github/workflows/reusable-docker-build-publish.yml@f4ff50d0f4713ed7b247dbd8a58316484907f958 # 2026-01-13
100100
with:
101101
aws-ecr-name: chainlink
102102
aws-region-ecr: us-east-1
@@ -131,7 +131,7 @@ jobs:
131131
permissions:
132132
contents: read
133133
id-token: write
134-
uses: smartcontractkit/.github/.github/workflows/reusable-docker-build-publish.yml@a89ebdd9d9cabda77c5f7ea7523af5707afb7786 # 2025-08-25
134+
uses: smartcontractkit/.github/.github/workflows/reusable-docker-build-publish.yml@f4ff50d0f4713ed7b247dbd8a58316484907f958 # 2026-01-13
135135
with:
136136
aws-ecr-name: ccip
137137
aws-region-ecr: us-east-1

.github/workflows/client-compatibility-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ jobs:
349349
persist-credentials: false
350350
ref: ${{ needs.select-versions.outputs.chainlink_version }}
351351
- name: Build Chainlink Image
352-
uses: smartcontractkit/.github/actions/ctf-build-image@b7be49d6f54ce0990354931ee1e4c8624f3f406e # v1.4.0 (not released yet)
352+
uses: smartcontractkit/.github/actions/ctf-build-image@ctf-build-image/v1
353353
with:
354354
image-tag: ${{ inputs.chainlinkVersion || needs.select-versions.outputs.chainlink_image_version || github.sha }}
355355
dockerfile: core/chainlink.Dockerfile

.github/workflows/docker-build.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
}}
3535
runner-arm64: ${{ steps.runner-labels.outputs.runner-arm64 }}
3636
runner-amd64: ${{ steps.runner-labels.outputs.runner-amd64 }}
37+
checked-out-sha: ${{ steps.checkout-sha.outputs.checked-out-sha }}
3738
version-tag: ${{ steps.version-info.outputs.version-tag }}
3839
steps:
3940
- name: Get PR Labels
@@ -65,6 +66,12 @@ jobs:
6566
uses: actions/checkout@v4
6667
with:
6768
fetch-depth: 0
69+
ref: ${{ inputs.git-ref || github.sha }}
70+
71+
- name: Resolve checked out SHA
72+
id: checkout-sha
73+
shell: bash
74+
run: echo "checked-out-sha=$(git rev-parse HEAD)" | tee -a "$GITHUB_OUTPUT"
6875

6976
- name: Version Info
7077
id: version-info
@@ -88,10 +95,10 @@ jobs:
8895
docker-build-context: .
8996
docker-build-args: |
9097
CHAINLINK_USER=chainlink
91-
COMMIT_SHA=${{ github.sha }}
98+
COMMIT_SHA=${{ needs.init.outputs.checked-out-sha }}
9299
VERSION_TAG=${{ needs.init.outputs.version-tag }}
93100
docker-manifest-sign: true
94-
git-sha: ${{ inputs.git-ref || github.sha }}
101+
git-sha: ${{ needs.init.outputs.checked-out-sha }}
95102
github-event-name: ${{ github.event_name }}
96103
github-ref-name: ${{ github.ref_name }}
97104
github-ref-type: ${{ github.ref_type}}
@@ -120,12 +127,12 @@ jobs:
120127
docker-build-context: .
121128
docker-build-args: |
122129
CHAINLINK_USER=chainlink
123-
COMMIT_SHA=${{ github.sha }}
130+
COMMIT_SHA=${{ needs.init.outputs.checked-out-sha }}
124131
VERSION_TAG=${{ needs.init.outputs.version-tag }}
125132
CL_INSTALL_PRIVATE_PLUGINS=true
126133
docker-manifest-sign: true
127134
docker-tag-custom-suffix: "-plugins"
128-
git-sha: ${{ inputs.git-ref || github.sha }}
135+
git-sha: ${{ needs.init.outputs.checked-out-sha }}
129136
github-event-name: ${{ github.event_name }}
130137
github-ref-name: ${{ github.ref_name }}
131138
github-ref-type: ${{ github.ref_type}}
@@ -154,13 +161,13 @@ jobs:
154161
docker-build-context: .
155162
docker-build-args: |
156163
CHAINLINK_USER=chainlink
157-
COMMIT_SHA=${{ github.sha }}
164+
COMMIT_SHA=${{ needs.init.outputs.checked-out-sha }}
158165
VERSION_TAG=${{ needs.init.outputs.version-tag }}
159166
CL_INSTALL_PRIVATE_PLUGINS=true
160167
CL_INSTALL_TESTING_PLUGINS=true
161168
docker-manifest-sign: true
162169
docker-tag-custom-suffix: "-plugins-testing"
163-
git-sha: ${{ inputs.git-ref || github.sha }}
170+
git-sha: ${{ needs.init.outputs.checked-out-sha }}
164171
github-event-name: ${{ github.event_name }}
165172
github-ref-name: ${{ github.ref_name }}
166173
github-ref-type: ${{ github.ref_type}}
@@ -189,13 +196,13 @@ jobs:
189196
docker-build-context: .
190197
docker-build-args: |
191198
CHAINLINK_USER=chainlink
192-
COMMIT_SHA=${{ github.sha }}
199+
COMMIT_SHA=${{ needs.init.outputs.checked-out-sha }}
193200
VERSION_TAG=${{ needs.init.outputs.version-tag }}
194201
CL_INSTALL_PRIVATE_PLUGINS=true
195202
CL_CHAIN_DEFAULTS=/ccip-config
196203
CL_SOLANA_CMD=
197204
docker-manifest-sign: true
198-
git-sha: ${{ inputs.git-ref || github.sha }}
205+
git-sha: ${{ needs.init.outputs.checked-out-sha }}
199206
github-event-name: ${{ github.event_name }}
200207
github-ref-name: ${{ github.ref_name }}
201208
github-ref-type: ${{ github.ref_type}}
@@ -224,13 +231,13 @@ jobs:
224231
docker-build-context: .
225232
docker-build-args: |
226233
CHAINLINK_USER=chainlink
227-
COMMIT_SHA=${{ github.sha }}
234+
COMMIT_SHA=${{ needs.init.outputs.checked-out-sha }}
228235
VERSION_TAG=${{ needs.init.outputs.version-tag }}
229236
CL_INSTALL_PRIVATE_PLUGINS=true
230237
CL_CHAIN_DEFAULTS=/ccip-config
231238
docker-manifest-sign: true
232239
docker-tag-custom-suffix: "-plugins"
233-
git-sha: ${{ inputs.git-ref || github.sha }}
240+
git-sha: ${{ needs.init.outputs.checked-out-sha }}
234241
github-event-name: ${{ github.event_name }}
235242
github-ref-name: ${{ github.ref_name }}
236243
github-ref-type: ${{ github.ref_type}}

GNUmakefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ install-plugins-local: ## Build & install local plugins
115115
install-plugins: install-plugins-local install-plugins-public ## Build and install local and public plugins via loopinstall
116116

117117
.PHONY: docker ## Build the chainlink docker image
118+
docker: DOCKER_TAG=develop
118119
docker:
119120
@if ([ "$(CL_INSTALL_PRIVATE_PLUGINS)" = "true" ] || [ "$(CL_INSTALL_TESTING_PLUGINS)" = "true" ]) && [ -z "$(GITHUB_TOKEN)" ]; then \
120121
echo "Error: GITHUB_TOKEN environment variable is required when CL_INSTALL_PRIVATE_PLUGINS=true or CL_INSTALL_TESTING_PLUGINS=true"; \
@@ -124,19 +125,22 @@ docker:
124125
docker buildx build \
125126
--build-arg COMMIT_SHA=$(COMMIT_SHA) \
126127
--build-arg VERSION_TAG=$(VERSION_TAG) \
128+
--build-arg CL_AUTO_DOCKER_TAG=$(DOCKER_TAG) \
127129
--build-arg CL_INSTALL_PRIVATE_PLUGINS=$(CL_INSTALL_PRIVATE_PLUGINS) \
128130
--build-arg CL_IS_PROD_BUILD=$(CL_IS_PROD_BUILD) \
129131
$(PRIVATE_PLUGIN_ARGS) \
130132
-f core/chainlink.Dockerfile . \
131-
-t chainlink:develop \
133+
-t chainlink:$(DOCKER_TAG) \
132134
--load
133135

134136
.PHONY: docker-ccip ## Build the chainlink docker image
137+
docker-ccip: DOCKER_TAG=latest
135138
docker-ccip:
136139
docker buildx build \
137140
--build-arg COMMIT_SHA=$(COMMIT_SHA) \
138141
--build-arg VERSION_TAG=$(VERSION_TAG) \
139-
-f core/chainlink.Dockerfile . -t chainlink-ccip:latest
142+
--build-arg CL_AUTO_DOCKER_TAG=$(DOCKER_TAG) \
143+
-f core/chainlink.Dockerfile . -t chainlink-ccip:$(DOCKER_TAG)
140144

141145
docker buildx build \
142146
--build-arg COMMIT_SHA=$(COMMIT_SHA) \
@@ -146,6 +150,7 @@ docker-ccip:
146150
# Define a comma variable for use in $(eval) (needed for the PRIVATE_PLUGIN_ARGS)
147151
comma := ,
148152
.PHONY: docker-plugins ## Build the EXPERIMENTAL chainlink-plugins docker image
153+
docker-plugins: DOCKER_TAG=latest
149154
docker-plugins:
150155
@if ([ "$(CL_INSTALL_PRIVATE_PLUGINS)" = "true" ] || [ "$(CL_INSTALL_TESTING_PLUGINS)" = "true" ]) && [ -z "$(GITHUB_TOKEN)" ]; then \
151156
echo "Error: GITHUB_TOKEN environment variable is required when CL_INSTALL_PRIVATE_PLUGINS=true or CL_INSTALL_TESTING_PLUGINS=true"; \
@@ -155,11 +160,12 @@ docker-plugins:
155160
docker buildx build \
156161
--build-arg COMMIT_SHA=$(COMMIT_SHA) \
157162
--build-arg VERSION_TAG=$(VERSION_TAG) \
163+
--build-arg CL_AUTO_DOCKER_TAG=$(DOCKER_TAG) \
158164
--build-arg CL_INSTALL_TESTING_PLUGINS=$(CL_INSTALL_TESTING_PLUGINS) \
159165
--build-arg CL_INSTALL_PRIVATE_PLUGINS=$(CL_INSTALL_PRIVATE_PLUGINS) \
160166
$(PRIVATE_PLUGIN_ARGS) \
161167
-f plugins/chainlink.Dockerfile . \
162-
-t chainlink-plugins:latest
168+
-t chainlink-plugins:$(DOCKER_TAG)
163169

164170
.PHONY: operator-ui
165171
operator-ui: ## Fetch the frontend

core/chainlink.Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
8181
RUN if [ ${CHAINLINK_USER} != root ]; then useradd --uid 14933 --create-home ${CHAINLINK_USER}; fi
8282
USER ${CHAINLINK_USER}
8383

84+
# Expose image metadata to the running node.
85+
ARG CL_AUTO_DOCKER_TAG=unset
86+
ENV CL_DOCKER_TAG=${CL_AUTO_DOCKER_TAG}
87+
8488
# Set plugin environment variable configuration.
8589
ENV CL_SOLANA_CMD=chainlink-solana
8690

core/cmd/shell.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,12 @@ func (n ChainlinkAppFactory) NewApplication(ctx context.Context, cfg chainlink.G
246246
return nil, fmt.Errorf("failed to create workflow fetcher: %w", err)
247247
}
248248
}
249+
250+
dockerTag := static.Unset
251+
if envTag, ok := env.DockerTag.Lookup(); ok && envTag != "" {
252+
dockerTag = envTag
253+
}
254+
249255
return chainlink.NewApplication(ctx, chainlink.ApplicationOpts{
250256
Opts: creOpts,
251257
Config: cfg,
@@ -257,6 +263,7 @@ func (n ChainlinkAppFactory) NewApplication(ctx context.Context, cfg chainlink.G
257263
ExternalInitiatorManager: webhook.NewExternalInitiatorManager(ds, unrestrictedClient),
258264
Version: static.Version,
259265
VersionTag: static.VersionTag,
266+
DockerTag: dockerTag,
260267
RestrictedHTTPClient: clhttp.NewRestrictedClient(cfg.Database(), appLggr),
261268
UnrestrictedHTTPClient: unrestrictedClient,
262269
SecretGenerator: chainlink.FilePersistedSecretGenerator{},

core/config/env/env.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010

1111
var (
1212
Config = Var("CL_CONFIG")
13+
DockerTag = Var("CL_DOCKER_TAG")
1314
DatabaseAllowSimplePasswords = Var("CL_DATABASE_ALLOW_SIMPLE_PASSWORDS")
1415
IgnorePrereleaseVersionCheck = Var("CL_IGNORE_PRE_RELEASE_VERSION_CHECK")
1516
SkipAppVersionCheck = Var("CL_SKIP_APP_VERSION_CHECK")

core/scripts/chaincli/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ to your wallet ahead of executing the next steps
2222
Build a local copy of the chainlink docker image by running this command in the root directory of the chainlink repo:
2323

2424
```bash
25-
docker build -t chainlink:local -f ./core/chainlink.Dockerfile .
25+
docker build -t chainlink:local -f ./core/chainlink.Dockerfile --build-arg CL_AUTO_DOCKER_TAG=local .
2626
```
2727

2828
Next, from the root directory again, `cd` into the chaincli directory:
@@ -123,4 +123,4 @@ You can use the `grep` and `grepv` flags to filter log lines, e.g. to only show
123123
./chaincli keeper logs --grep keepers-plugin
124124
```
125125

126-
---
126+
---

core/scripts/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ require (
505505
github.com/smartcontractkit/chainlink-protos/chainlink-ccv/message-discovery v0.0.0-20251211142334-5c3421fe2c8d // indirect
506506
github.com/smartcontractkit/chainlink-protos/chainlink-ccv/verifier v0.0.0-20251211142334-5c3421fe2c8d // indirect
507507
github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20251002192024-d2ad9222409b // indirect
508-
github.com/smartcontractkit/chainlink-protos/node-platform v0.0.0-20260211172625-dff40e83b3c9 // indirect
508+
github.com/smartcontractkit/chainlink-protos/node-platform v0.0.0-20260319180422-b5808c964785 // indirect
509509
github.com/smartcontractkit/chainlink-protos/orchestrator v0.10.0 // indirect
510510
github.com/smartcontractkit/chainlink-protos/ring/go v0.0.0-20260128151123-605e9540b706 // indirect
511511
github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6 // indirect

core/scripts/go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)