chore(ci): split out amd64 and arm64 docker builds into native runners#7206
Conversation
|
""" WalkthroughThe Docker build workflows were updated to introduce network targeting, add a new scheduled MainNet nightly build, and modularize environment setup. A new script generates build matrices from JSON definitions. Multi-architecture manifest creation was added, and versioning, tagging, and metadata logic were refined. Minor dependency updates were made to the Tor Dockerfile. Changes
Sequence Diagram(s)sequenceDiagram
participant Scheduler/Manual Trigger
participant base_builds_envs_setup
participant build-matrix.sh
participant builds_run/docker_builds
participant multi-arch-create-manifest
Scheduler/Manual Trigger->>base_builds_envs_setup: Start workflow (with tari_network input)
base_builds_envs_setup->>build-matrix.sh: Generate build matrix (using network, version, platforms)
base_builds_envs_setup-->>builds_run/docker_builds: Output build matrix, network, version
builds_run/docker_builds->>builds_run/docker_builds: Build Docker images (multi-arch, tagging, metadata)
builds_run/docker_builds-->>multi-arch-create-manifest: Built images (per arch)
multi-arch-create-manifest->>multi-arch-create-manifest: Create & push multi-arch manifests
Possibly related PRs
Suggested reviewers
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Test Results (CI) 3 files 126 suites 41m 8s ⏱️ Results for commit 1624d0f. ♻️ This comment has been updated with latest results. |
Test Results (Integration tests) 2 files 1 errors 1 suites 24m 26s ⏱️ For more details on these parsing errors and failures, see this check. Results for commit 1624d0f. ♻️ This comment has been updated with latest results. |
…nd labels, targeted mainNet ci build, misc other improvements.
85a771b to
fe05554
Compare
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (13)
buildtools/docker_rig/build-matrix.sh (8)
11-19: DRY up image selection logic
The repeatedjqselection for Minotari vs. specific images can be consolidated to reduce duplication and potential drift in selection criteria. Consider extracting a helper function or unifying the filters.
20-29: Clarify merging of JSON arrays
Usingjq -c '. += input'is cryptic and may not merge arrays reliably. A clearer approach is:matrix_selection=$(jq -s -c '.[0] + .[1]' tarisuite.json 3rdparty.json)This explicitly concatenates the two arrays.
39-49: Reduce verbose debug output behind a flag
Unconditionalechoof every item can clutter logs on large matrices. Consider adding a--verboseflag or gating these prints on an environment variable.
50-58: Simplify version extraction from Dockerfile
Theawkcommand is brittle if the ARG line formatting changes. A more resilient alternative is:version=$(grep -m1 "^ARG ${uppername}_VERSION=" "${image_name}.Dockerfile" \ | cut -d= -f2 | tr -d '"')
79-87: Avoid manual comma-trimming
Building JSON by string concatenation and trimming commas is error-prone. You can generate the array with:matrix_details=$(jq -s -c '.[]' <<< "$enriched_items")and skip the manual
%,handling.
92-95: Streamline platform splitting
Parsing platforms viatrandawkworks, but you can simplify with:IFS=',' read -ra platform_list <<< "${build_platforms}"This avoids external tooling for trimming.
96-105: Externalize runner/arch mapping
Hard-coding runner labels and arch detection injqcan be extracted to a config or helper. This improves maintainability if you add new platforms.
116-120: Quote matrix variable on echo
Using unquotedecho ${matrix_platforms}can lead to word splitting or globbing. Prefer:echo "$matrix" echo "$matrix" | jq ..github/workflows/build_dockers.yml (1)
30-32: Normalize comma-separated defaults
The defaultplatformsvalue includes a space after the comma, but the choices do not. For consistency, remove the space:-default: linux/arm64, linux/amd64 +default: linux/arm64,linux/amd64.github/workflows/build_dockers_workflow.yml (4)
62-69: Enable strict mode or ensure pipefail
The# set -xuo pipefailis commented out. For deterministic failures in the matrix step, consider enabling it.
84-101: Harden TestNet declaration logic
The dual use of[and&&can be simplified to a single[[ ]]block and better quoting. For example:if [[ "$GITHUB_EVENT_NAME" != "workflow_dispatch" && -z "${{ inputs.tari_network }}" ]]; then … fi
174-176: Clean up commented registry entry
Remove the commented# name/${{ matrix.builds.image_name }}to avoid confusion inimages:list.
341-353: Add newline at end of file
YAML requires a trailing newline.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/build_dockers.yml(4 hunks).github/workflows/build_dockers_workflow.yml(5 hunks)buildtools/docker_rig/build-matrix.sh(1 hunks)buildtools/docker_rig/tor.Dockerfile(2 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/build_dockers_workflow.yml
61-61: shellcheck reported issue in this script: SC2034:warning:2:1: build_items appears unused. Verify use (or export if used externally)
(shellcheck)
61-61: shellcheck reported issue in this script: SC2086:info:19:6: Double quote to prevent globbing and word splitting
(shellcheck)
61-61: shellcheck reported issue in this script: SC2086:info:20:6: Double quote to prevent globbing and word splitting
(shellcheck)
61-61: shellcheck reported issue in this script: SC2086:info:21:28: Double quote to prevent globbing and word splitting
(shellcheck)
87-87: shellcheck reported issue in this script: SC2086:info:11:40: Double quote to prevent globbing and word splitting
(shellcheck)
87-87: shellcheck reported issue in this script: SC2086:info:13:54: Double quote to prevent globbing and word splitting
(shellcheck)
128-128: shellcheck reported issue in this script: SC2086:info:5:51: Double quote to prevent globbing and word splitting
(shellcheck)
138-138: shellcheck reported issue in this script: SC2086:info:4:52: Double quote to prevent globbing and word splitting
(shellcheck)
138-138: shellcheck reported issue in this script: SC2086:info:5:52: Double quote to prevent globbing and word splitting
(shellcheck)
138-138: shellcheck reported issue in this script: SC2236:style:7:8: Use -n instead of ! -z
(shellcheck)
138-138: shellcheck reported issue in this script: SC2086:info:9:190: Double quote to prevent globbing and word splitting
(shellcheck)
138-138: shellcheck reported issue in this script: SC2086:info:10:171: Double quote to prevent globbing and word splitting
(shellcheck)
138-138: shellcheck reported issue in this script: SC2086:info:12:72: Double quote to prevent globbing and word splitting
(shellcheck)
138-138: shellcheck reported issue in this script: SC2086:info:15:59: Double quote to prevent globbing and word splitting
(shellcheck)
138-138: shellcheck reported issue in this script: SC2086:info:16:48: Double quote to prevent globbing and word splitting
(shellcheck)
138-138: shellcheck reported issue in this script: SC2086:info:20:31: Double quote to prevent globbing and word splitting
(shellcheck)
138-138: shellcheck reported issue in this script: SC2086:info:22:32: Double quote to prevent globbing and word splitting
(shellcheck)
138-138: property "docker_repo" is not defined in object type {actions_runner_debug: string; actions_step_debug: string; docker_password: string; docker_provider: string; docker_username: string; github_token: string}
(expression)
234-234: property "docker_repo" is not defined in object type {actions_runner_debug: string; actions_step_debug: string; docker_password: string; docker_provider: string; docker_username: string; github_token: string}
(expression)
266-266: shellcheck reported issue in this script: SC2076:warning:22:47: Remove quotes from right-hand side of =~ to match as a regex rather than literally
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:48:30: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:48:39: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:49:40: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:49:49: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:50:40: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:50:49: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:53:52: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:53:61: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:56:49: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:56:58: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:61:32: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:62:42: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:62:51: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:63:42: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:63:51: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:64:51: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:70:32: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:70:41: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:71:42: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:71:51: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:72:42: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:72:51: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:73:51: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:73:60: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:79:32: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:80:42: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:80:51: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:81:42: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:81:51: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:83:51: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: property "docker_repo" is not defined in object type {actions_runner_debug: string; actions_step_debug: string; docker_password: string; docker_provider: string; docker_username: string; github_token: string}
(expression)
🪛 YAMLlint (1.37.1)
.github/workflows/build_dockers_workflow.yml
[error] 353-353: no new line character at the end of file
(new-line-at-end-of-file)
🔇 Additional comments (22)
buildtools/docker_rig/build-matrix.sh (2)
32-37:MINOTARI_VERSIONdefault is acceptable
Providing"dev"as a fallback tag is reasonable for local and adhoc runs.
65-74: Using jq to enrich objects is solid
The approach of piping each item throughjq '. + {...}'is clear and maintainable.buildtools/docker_rig/tor.Dockerfile (2)
3-3: Bump Alpine base to 3.22
Upgrading the base image aligns with the latest security and package updates.
12-12: Update Tor to version 0.4.8.16-r0
This matches the desired security and feature patch level..github/workflows/build_dockers.yml (8)
14-16: Added MainNet debug nightly schedule
The newcron: '23 01 * * 0-5'entry supports a MainNet debug build Sunday–Friday.
20-27: Extendedworkflow_dispatchinputs
The added descriptions forversionandtag_aliasimprove clarity in the UI.
33-41: Introducetari_networkinput
Supporting multiple networks (esmeralda,nextnet,mainnet,igor) as a dispatch input enables flexible ad-hoc builds.
70-77: Exposetari_networkfrom setup job
Addingtari_networkto the outputs ensures downstream jobs can adapt per network.
83-85: Verify use ofgithub.event.schedulecontext
github.event.schedulemay not exist in the schedule event payload. Confirm that$SCHEDULEreliably reflects the cron expression.
113-120: Propagatetari_networkfor manual builds
Correctly readinggithub.event.inputs.tari_networkallows manual workflows to target the right network.
136-143: Confirm schedule matching logic
The comparisonif [[ "${SCHEDULE}" == "23 01 * * 0-5" ]]may never fire if$SCHEDULEis unset or differently formatted. Verify$SCHEDULEand adjust the condition as needed.
146-160: Consumetari_networkinbuilds_run
Passingtari_networkintobuild_dockers_workflow.ymlenables network-specific tagging..github/workflows/build_dockers_workflow.yml (10)
23-28: Add descriptions for new inputs
Providing descriptions forversion,tag_alias, andtari_networkclarifies their intent in the workflow call.
38-39: Documentplatformsinput
The added description forplatformsaligns with the dispatch UI schema.
47-53: Expose matrix and network outputs
Publishingmatrix,TARI_NETWORK, andTARI_TARGET_NETWORKallows downstream jobs to consume dynamic build parameters.
76-82: Invokebuild-matrix.shcorrectly
Changing intobuildtools/docker_rigbefore sourcing ensures the script finds its JSON definitions.
116-117: Matrix-driven runner selection
Using${{ matrix.builds.runner }}cleanly directs jobs to the correct host per architecture.
119-121: Propagate network env vars
SettingTARI_NETWORKandTARI_TARGET_NETWORKin the job environment is correct.
129-133: Retain expiration only for non-releases
The regex and logic correctly skip settingEXPIRATIONfor tags.
145-150: Construct per-image tag aliases
BuildingTAG_ALIASQandTAG_ALIASGwith network and arch suffixes ensures unique ad-hoc tags.
219-220: Use matrix-driven Dockerfile path
Referencing./buildtools/docker_rig/${{ matrix.builds.dockerfile }}is correct and maintains flexibility.
226-234: Pass full build arguments
IncludingTARI_NETWORKandTARI_TARGET_NETWORKhere ensures images are configured per network.
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (3)
.github/workflows/build_dockers.yml (1)
27-32: Unify platform option formatting
The option"linux/arm64,linux/amd64"(no space) conflicts with later output"linux/arm64, linux/amd64"(with space). Standardize on one format (prefer no space) to avoid parsing issues in downstream scripts..github/workflows/build_dockers_workflow.yml (2)
61-64: Suggest enabling strict mode in Set Matrix
Uncommentset -xuo pipefailto fail early on any script errors during matrix generation.
80-82: Quote matrix output
To handle multi-line JSON safely, consider:echo "matrix=${matrix}" >> $GITHUB_OUTPUTor use
printf '%s' "$matrix".
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/build_dockers.yml(4 hunks).github/workflows/build_dockers_workflow.yml(5 hunks)buildtools/docker_rig/build-matrix.sh(1 hunks)buildtools/docker_rig/tor.Dockerfile(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- buildtools/docker_rig/tor.Dockerfile
- buildtools/docker_rig/build-matrix.sh
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/build_dockers_workflow.yml
61-61: shellcheck reported issue in this script: SC2034:warning:2:1: build_items appears unused. Verify use (or export if used externally)
(shellcheck)
61-61: shellcheck reported issue in this script: SC2086:info:19:6: Double quote to prevent globbing and word splitting
(shellcheck)
61-61: shellcheck reported issue in this script: SC2086:info:20:6: Double quote to prevent globbing and word splitting
(shellcheck)
61-61: shellcheck reported issue in this script: SC2086:info:21:28: Double quote to prevent globbing and word splitting
(shellcheck)
87-87: shellcheck reported issue in this script: SC2086:info:11:40: Double quote to prevent globbing and word splitting
(shellcheck)
87-87: shellcheck reported issue in this script: SC2086:info:13:54: Double quote to prevent globbing and word splitting
(shellcheck)
128-128: shellcheck reported issue in this script: SC2086:info:5:51: Double quote to prevent globbing and word splitting
(shellcheck)
138-138: shellcheck reported issue in this script: SC2086:info:4:52: Double quote to prevent globbing and word splitting
(shellcheck)
138-138: shellcheck reported issue in this script: SC2086:info:5:52: Double quote to prevent globbing and word splitting
(shellcheck)
138-138: shellcheck reported issue in this script: SC2236:style:7:8: Use -n instead of ! -z
(shellcheck)
138-138: shellcheck reported issue in this script: SC2086:info:9:190: Double quote to prevent globbing and word splitting
(shellcheck)
138-138: shellcheck reported issue in this script: SC2086:info:10:171: Double quote to prevent globbing and word splitting
(shellcheck)
138-138: shellcheck reported issue in this script: SC2086:info:12:72: Double quote to prevent globbing and word splitting
(shellcheck)
138-138: shellcheck reported issue in this script: SC2086:info:15:59: Double quote to prevent globbing and word splitting
(shellcheck)
138-138: shellcheck reported issue in this script: SC2086:info:16:48: Double quote to prevent globbing and word splitting
(shellcheck)
138-138: shellcheck reported issue in this script: SC2086:info:20:31: Double quote to prevent globbing and word splitting
(shellcheck)
138-138: shellcheck reported issue in this script: SC2086:info:22:32: Double quote to prevent globbing and word splitting
(shellcheck)
138-138: property "docker_repo" is not defined in object type {actions_runner_debug: string; actions_step_debug: string; docker_password: string; docker_provider: string; docker_username: string; github_token: string}
(expression)
234-234: property "docker_repo" is not defined in object type {actions_runner_debug: string; actions_step_debug: string; docker_password: string; docker_provider: string; docker_username: string; github_token: string}
(expression)
266-266: shellcheck reported issue in this script: SC2076:warning:22:47: Remove quotes from right-hand side of =~ to match as a regex rather than literally
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:48:30: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:48:39: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:49:40: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:49:49: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:50:40: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:50:49: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:53:52: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:53:61: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:56:49: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:56:58: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:61:32: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:62:42: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:62:51: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:63:42: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:63:51: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:64:51: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:70:32: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:70:41: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:71:42: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:71:51: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:72:42: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:72:51: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:73:51: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:73:60: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:79:32: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:80:42: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:80:51: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:81:42: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:81:51: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: shellcheck reported issue in this script: SC2086:info:83:51: Double quote to prevent globbing and word splitting
(shellcheck)
266-266: property "docker_repo" is not defined in object type {actions_runner_debug: string; actions_step_debug: string; docker_password: string; docker_provider: string; docker_username: string; github_token: string}
(expression)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: test (mainnet, stagenet)
- GitHub Check: test (nextnet, nextnet)
- GitHub Check: ci
- GitHub Check: cargo check with stable
- GitHub Check: test (testnet, esmeralda)
🔇 Additional comments (29)
.github/workflows/build_dockers.yml (8)
14-15: Add MainNet debug nightly schedule
The new cron entry ('23 01 * * 0-5') complements the existing nightly build, targeting MainNet debug at 01:23 Sunday–Friday.
20-22: Define manual version override input
Theversioninput description and default (latest-adhoc) are clear and appropriate.
33-41: Approve newtari_networkinput
The addition of thetari_networkchoice (esmeralda, nextnet, mainnet, igor) with a default and description aligns with the network-targeting goal.
96-97: Simplify tagged-build version
Switching from timestamp+SHA suffix to raw tag (VERSION="${{ github.ref_name }}") matches the PR summary.
113-120: Inject network selection in manual builds
Echoingtari_network=${{ github.event.inputs.tari_network }}ensures manual dispatch honors the chosen network.
121-129: Weekly schedule sets alias correctly
The weekly cron block now emitstag_alias=latest-weeklyalongside platforms and network.
136-143: Special nightly CI build configured
The23 01 * * 0-5block correctly overrides tonightly-ci-nodeon MainNet with the appropriate platforms and items.
154-159: Consume new network output inbuilds_run
Passingtari_network(andbuild_items) into the downstream workflow ensures proper scoping..github/workflows/build_dockers_workflow.yml (21)
23-29: Approve new inputs for version, tag alias, and network targeting
Theworkflow_callinputs (version,tag_alias,tari_network) are well-documented and support the split-architecture build.
38-38: Document platforms input
The added description clarifies valid Docker target platforms.
50-52: Expose network outputs
AddingTARI_NETWORKandTARI_TARGET_NETWORKtobuilds_envs_setupoutputs propagates network context downstream.
64-75: Approve version fallback logic
Extracting version fromCargo.toml(with branch and date+SHA) when no input version is provided is robust.
86-100: Declare TestNet environment
The conditional sourcing ofmultinet_envs.shbased on event context correctly sets both network variables.
116-120: Inject network variables into Docker builds
MappingTARI_NETWORKandTARI_TARGET_NETWORKinto thedocker_buildsjob’s env block is essential for network-specific tagging.
174-177: Metadata images configuration
Expanding theimageslist to both GHCR and the provider registry covers all publish targets.
178-186: Approve tagging strategy
Thedocker/metadata-actiontags cover scheduled, branch, PR, semver, and raw patterns as expected.
189-192: Enrich OCI labels
Additional labels (vendor,title,description, etc.) improve image metadata and traceability.
219-221: Approve dynamic Dockerfile & platform reference
Referencingmatrix.builds.dockerfileandmatrix.builds.platformaligns with the matrix design.
226-233: Build arguments include network settings
PassingTARI_NETWORK,TARI_TARGET_NETWORK, and other build args ensures the container respects network context.
235-240: Tag aliases are pushed correctly
Using bothTAG_ALIASQandTAG_ALIASGensures alias tags land in both registries.
242-242: Preserve annotations
Passingannotations: ${{ steps.meta.outputs.annotations }}retains extra OCI metadata.
245-247: Log Docker digest
Printing the digest and image name aids in post-build verification.
259-261: Authenticate for multi-arch manifest
Logging in to both GHCR and the external provider is required before manifest operations.
267-281: Multi-arch image detection
Usingjqto filter for images built on bothamd64andarm64is precise.
293-302: Suffix logic for networked images
Appending-${TARI_NETWORK}only forminotari_*images is consistent with the tagging scheme.
313-321: Create multi-arch manifests
Thedocker manifest create --amendsequence is correct for each registry and architecture.
324-331: Alias manifest for latest tags
Conditional creation of alias manifests forlatest-*builds enhances user convenience.
333-340: Release tag manifests
Automated manifest creation for version tags ensures full multi-arch releases.
342-350: Latest release alias manifest
The final aliasing step (latest-${DSUFFIX}) covers the common “latest” channel for releases.
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (5)
.github/workflows/build_dockers.yml (2)
14-15: Add clarity on scheduled cron triggers
The new cron at23 01 * * 0-5enables the MainNet Debug nightly build. Consider documenting that GitHub Actions schedules run in UTC to avoid timezone confusion.
20-27: Refinetari_networkinput description
Thetari_networkdescription reads "target testNet" but includesmainnetandigor. Update it to "target network" for accuracy, and ensure the wording aligns with the reusable workflow’s input.Also applies to: 32-41
.github/workflows/build_dockers_workflow.yml (3)
23-29: Align input descriptions
Theversion,tag_alias, andtari_networkinputs now have descriptions, but wording differs from the dispatch workflow. Standardize phrasing (e.g., "target network" vs "target testNet") and ensure both workflows use identical language.Also applies to: 38-39
84-100: Clarify network detection logic
Theset-tari-networkstep picks between tag-based and manual inputs. Consider adding inline comments to explain the two cases and verifymultinet_envs.shreliably sets bothTARI_NETWORKandTARI_TARGET_NETWORK.
153-155: Simplify build args naming
The environment variableDOCKER_SUBTAGholds build args. For clarity, consider renaming it toDOCKER_BUILD_ARGSor document its intended use.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/build_dockers.yml(3 hunks).github/workflows/build_dockers_workflow.yml(4 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/build_dockers_workflow.yml
138-138: property "docker_repo" is not defined in object type {actions_runner_debug: string; actions_step_debug: string; docker_password: string; docker_provider: string; docker_username: string; github_token: string}
(expression)
234-234: property "docker_repo" is not defined in object type {actions_runner_debug: string; actions_step_debug: string; docker_password: string; docker_provider: string; docker_username: string; github_token: string}
(expression)
266-266: property "docker_repo" is not defined in object type {actions_runner_debug: string; actions_step_debug: string; docker_password: string; docker_provider: string; docker_username: string; github_token: string}
(expression)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: cargo check with stable
- GitHub Check: test (mainnet, stagenet)
- GitHub Check: test (nextnet, nextnet)
- GitHub Check: test (testnet, esmeralda)
🔇 Additional comments (17)
.github/workflows/build_dockers.yml (7)
70-77: Confirm job renaming and new output
Thebuilds_envs_setupjob was renamed tobase_builds_envs_setupand now outputstari_network. Verify that downstream jobs and the reusable workflow (builds_run) correctly reference this new job name and output.
83-84: ReviewSCHEDULEenv usage
Passinggithub.event.scheduleintoSCHEDULEdrives the schedule‐specific logic. Confirm thatgithub.event.scheduleexists on schedule events and carries the exact cron string you expect.
96-99: Simplify version tag logic
You’ve removed the date/commit suffix fromVERSION. Ensure uniqueness is still guaranteed for non‐tagged builds, or that version derivation is fully handled downstream.
104-112: Verify branch build network constraint
Branch builds now forcetari_network=esmeralda. Confirm that builds onbuild-dockers-*andbuild-all-*should always target Esmeralda, or consider allowing other networks if needed.
118-118: Ensure manual network override is effective
Manual dispatch now emitstari_network. Double‐check that this propagated input is honored in all downstream steps and that the default remains appropriate.
122-129: Review scheduled build distinctions
Weekly (Sunday) and nightly builds set distinctplatforms,tag_alias, andtari_network. Validate that thedate +%ucheck (7 → weekly) vs weekdays correctly partitions the schedules.
154-159: Propagate new output to reusable workflow
Thebuilds_runjob now passestari_networkinto the reusable workflow. Verify that the called workflow accepts and correctly uses this input..github/workflows/build_dockers_workflow.yml (10)
47-52: New outputs for network routing
You’ve exposedTARI_NETWORKandTARI_TARGET_NETWORKfrombuilds_envs_setup. Confirm both outputs are needed and document their distinction to aid future maintainers.
77-83: Verify build-matrix script integration
Sourcingbuild-matrix.shdynamically sets the matrix. Ensure the script exists atbuildtools/docker_rig/, is executable, and always emits valid JSON in thematrixvariable.
102-104: Dynamic matrix consumption
Thedocker_buildsjob uses the matrix frombuilds_envs_setup. Verify thatfromJson(needs.builds_envs_setup.outputs.matrix)yields the expected structure and thatmatrix.buildsfields (e.g.,arch,image_name,dockerfile) align downstream.Also applies to: 110-112
116-120: Propagate network environment
Injecting bothTARI_NETWORKandTARI_TARGET_NETWORKintodocker_buildsis critical. Confirm that build arguments reference the correct variable where needed (e.g.,TARI_NETWORKvsTARI_TARGET_NETWORK).
129-134: Retention policy correctness
Expiration is skipped for semver tags via regex. Ensure the pattern^refs\/tags\/v[0-9]+\.[0-9]+\.[0-9]+.*$covers all your release tag formats, including prereleases if intended.
142-150: Review tag alias environment variables
TAG_ALIASQandTAG_ALIASGare composed usingsecrets.DOCKER_REPO. IfDOCKER_REPOisn’t defined in the repo settings, this will fail at runtime. Confirm the secret exists or adjust toDOCKER_PROVIDERsettings.
174-198: Validate metadata-action configuration
You’ve added conditional tag types for schedule, branch, PR, and semver. Test locally or via a dry run to confirm that only the desired tags are emitted for each event type.
218-233: Reviewdocker/build-push-actionparameters
Confirm that${{ matrix.builds.dockerfile }}exists underbuildtools/docker_rig/, and thatTAG_ALIASQ/TAG_ALIASGare always set (even for non-minotari images). Validate that files, platforms, and build‐args resolve as intended.Also applies to: 235-239
248-254: Approve multi-arch manifest job addition
The newmulti-arch-create-manifestjob correctly logs in and prepares for manifest creation. The approach to grouping images by arch and merging them is well-structured.
264-272: Check multi-arch image detection
The jq filter selects images that have bothamd64andarm64. When new build items are added, ensure this logic still correctly identifies multi-arch candidates.
|
Build feature for cron, tags, branch and ad-hoc working as expected for all I believe this is ready for review and merge. |
* development: chore: new release v4.5.0-pre.0 (tari-project#7228) chore: better logging (tari-project#7226) feat!: ensure payref persists during recovery (tari-project#7225) chore(ci): split out amd64 and arm64 docker builds into native runners (tari-project#7206) fix: fix scanner service when connectivity offline (tari-project#7223) feat: add payref to grpc outputs (tari-project#7216)


Description
Motivation and Context
How Has This Been Tested?
Built in local fork and tested via images from fork registries
Summary by CodeRabbit
New Features
Improvements
Chores