Skip to content

feat(ci): add container build matrix check. Fixes #119#127

Open
prachimaskar wants to merge 4 commits intokubeflow:mainfrom
prachimaskar:add-container-build-matrix-check
Open

feat(ci): add container build matrix check. Fixes #119#127
prachimaskar wants to merge 4 commits intokubeflow:mainfrom
prachimaskar:add-container-build-matrix-check

Conversation

@prachimaskar
Copy link
Copy Markdown

Description of your changes

Implements the CI check proposed in #119.

  • Added .github/scripts/check_container_build_matrix/ script that
    recursively discovers all Containerfile/Dockerfile paths under
    components/, pipelines/, and docs/examples/, and validates
    each has a matching context entry in container-build.yml
  • Added .container-build-ignore file at repo root for excluding
    paths not intended to be built by CI (e.g. local-dev only)
  • Added .github/workflows/container-build-matrix-check.yml workflow
    that triggers on PRs touching **/Containerfile, **/Dockerfile,
    or container-build.yml
  • Added 18 unit tests following .github/scripts/ conventions

Checklist

  • All tests and CI checks pass
  • Pre-commit hooks pass without errors
  • You have signed off your commits

Signed-off-by: prachimaskar <prachimaskar184@gmail.com>
Signed-off-by: prachimaskar <prachimaskar184@gmail.com>
Signed-off-by: prachimaskar <prachimaskar184@gmail.com>
Copilot AI review requested due to automatic review settings March 19, 2026 11:44
@google-oss-prow
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign humairak for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a CI safeguard to ensure any Containerfile/Dockerfile introduced under the repo’s build roots is represented in the container-build.yml matrix, preventing CI from silently skipping new container builds.

Changes:

  • Introduces a Python checker script to discover Containerfile/Dockerfile paths and validate they have matching context entries in .github/workflows/container-build.yml.
  • Adds a repo-root .container-build-ignore mechanism to exclude intentionally unbuilt contexts.
  • Adds a dedicated GitHub Actions workflow plus unit tests under .github/scripts/.

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 7 comments.

File Description
.github/workflows/container-build-matrix-check.yml New workflow to run the matrix validation and script unit tests on relevant PR changes.
.github/scripts/check_container_build_matrix/check_container_build_matrix.py Core discovery/parsing/checking logic + CLI and output formatting.
.github/scripts/check_container_build_matrix/tests/test_check_container_build_matrix.py Unit/integration tests for discovery, parsing, ignore handling, and check results.
.container-build-ignore New ignore file (initially documented, empty).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hbelmiro
Copy link
Copy Markdown
Contributor

/ok-to-test

Signed-off-by: prachimaskar <prachimaskar184@gmail.com>
@prachimaskar
Copy link
Copy Markdown
Author

Hi @HumairAK,
I've addressed the comments. Could you please review when you get a chance?
Thanks !😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants