Skip to content

Switch Spring integration workflow from Maven to Bazel#4770

Merged
k8s-ci-robot merged 5 commits into
masterfrom
copilot/modify-spring-github-actions
May 20, 2026
Merged

Switch Spring integration workflow from Maven to Bazel#4770
k8s-ci-robot merged 5 commits into
masterfrom
copilot/modify-spring-github-actions

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 20, 2026

Spring integration CI was still using Maven, diverging from the repository’s Bazel-based build/test path. This updates the spring GitHub Actions workflow to run Spring + Spring AOT integration builds/tests via Bazel targets.

  • Workflow execution model

    • Replaced Maven test invocation with Bazel build/test steps scoped to Spring integration targets.
    • Added Bazel dependency pinning step (@maven//:pin) to keep external resolution aligned with MODULE.bazel.
  • Runner/tooling setup

    • Added Bazelisk installation in the workflow job.
    • Set BAZELISK_SKIP_VERSION_CHECK=1 in job env for consistent CI execution.
  • Caching strategy

    • Replaced Maven local-repo cache with Bazel disk/repository cache paths.
    • Updated cache keys to track Bazel-relevant inputs (MODULE.bazel, .bazelversion, maven_install.json) and Java matrix version.
- name: Build Spring integrations with Bazel
  run: >-
    bazel build --config=ci
    //spring:client-java-spring-integration
    //spring-aot:client-java-spring-aot-integration

- name: Test Spring integrations with Bazel
  run: >-
    bazel test --config=ci
    //spring:tests

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 20, 2026
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 20, 2026
@brendandburns
Copy link
Copy Markdown
Contributor

@copilot modify the cache key so it is the same as other CI/CD so that it re-uses builds from the main build/test runs.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 20, 2026

@copilot modify the cache key so it is the same as other CI/CD so that it re-uses builds from the main build/test runs.

Updated in 6c67e4b: the Spring workflow cache key and restore-key prefix now match the main Bazel CI format (bazel-${{ runner.os }}-java${{ matrix.java }}-...) so it can reuse the same cache entries.

@brendandburns
Copy link
Copy Markdown
Contributor

@copilot since bazel is building jars, can we cache them across OS versions?

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 20, 2026

@copilot since bazel is building jars, can we cache them across OS versions?

Implemented in 7c5212f: Spring workflow now uses a separate cross-OS cache for Bazel repository downloads (~/.cache/bazel/cache/repos/v1, enableCrossOsArchive: true) while keeping the Bazel disk action cache OS-scoped for safety/reuse with main CI.

@brendandburns
Copy link
Copy Markdown
Contributor

@copilot update the main CI to cache across OS also.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 20, 2026
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 20, 2026

@copilot update the main CI to cache across OS also.

Implemented in 94f531e: main bazel.yml now also uses split caching with a cross-OS repository cache (~/.cache/bazel/cache/repos/v1, enableCrossOsArchive: true) and keeps the Bazel disk cache OS-scoped.

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 20, 2026
@brendandburns brendandburns marked this pull request as ready for review May 20, 2026 17:26
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 20, 2026
@brendandburns
Copy link
Copy Markdown
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 20, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, Copilot

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

The pull request process is described 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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 20, 2026
@k8s-ci-robot k8s-ci-robot merged commit 06653ce into master May 20, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants