Use hashrelease e2e binary in CI pipeline#12507
Closed
caseydavenport wants to merge 2 commits intoprojectcalico:masterfrom
Closed
Use hashrelease e2e binary in CI pipeline#12507caseydavenport wants to merge 2 commits intoprojectcalico:masterfrom
caseydavenport wants to merge 2 commits intoprojectcalico:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates Calico’s CI e2e execution flow to run an explicit e2e test binary (preferably downloaded from hashrelease artifacts) and execute it via the Ginkgo CLI in a calico/go-build container, instead of using the opaque bz tests entrypoint.
Changes:
- Add a release build step to produce and publish multi-arch e2e test binaries into the hashrelease output (
files/e2e/). - Extend
e2e/Makefilewith multi-arch build targets and abuild-allaggregator. - Update Semaphore e2e job script to either build the binary locally or download it from hashrelease, then run it via
ginkgo.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| release/pkg/manager/calico/manager.go | Adds e2e binary build+copy into release/hashrelease output during Build(). |
| e2e/Makefile | Introduces multi-arch e2e binary targets and a build-all entrypoint. |
| .semaphore/end-to-end/scripts/body_standard.sh | Switches CI to download/run the hashrelease e2e binary (or build locally) and runs via ginkgo in Docker. |
Comment on lines
+22
to
+37
| # Multi-arch e2e binary targets. Each architecture gets its own binary, built | ||
| # via cross-compilation inside the calico/go-build container. | ||
| bin/k8s/e2e-linux-amd64.test: $(SRC_FILES) | ||
| mkdir -p bin/k8s | ||
| $(MAKE) build-e2e-binary ARCH=amd64 | ||
|
|
||
| bin/k8s/e2e-linux-arm64.test: $(SRC_FILES) | ||
| mkdir -p bin/k8s | ||
| $(MAKE) build-e2e-binary ARCH=arm64 | ||
|
|
||
| .PHONY: build-e2e-binary | ||
| build-e2e-binary: | ||
| $(DOCKER_RUN) $(CALICO_BUILD) go test ./cmd/k8s -c -o bin/k8s/e2e-linux-$(ARCH).test | ||
|
|
||
| .PHONY: build-all | ||
| build-all: $(addprefix bin/k8s/e2e-linux-,$(addsuffix .test,$(VALIDARCHES))) |
| dst := filepath.Join(e2eOutputDir, entry.Name()) | ||
| if err := utils.CopyFile(src, dst); err != nil { | ||
| return fmt.Errorf("copying e2e binary %s: %w", entry.Name(), err) | ||
| } |
Comment on lines
+313
to
+317
| } | ||
|
|
||
| // Build multi-arch e2e test binaries and copy them into the output directory. | ||
| if err = r.buildE2EBinaries(); err != nil { | ||
| return err |
feb18b4 to
be5f37f
Compare
Download the pre-built e2e test binary from the hashrelease instead of calling bz tests. The RUN_LOCAL_TESTS path still builds from source. Both paths share a unified docker run execution step.
be5f37f to
f1ab502
Compare
Add --junit-report and --output-dir flags back to the ginkgo invocation so the epilogue can publish test results. Use the e2e_rc pattern to capture the test exit code and propagate it after copying the JUnit XML. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
3f5f2a3 to
399e009
Compare
caseydavenport
added a commit
to caseydavenport/calico
that referenced
this pull request
Apr 17, 2026
Replace run_tests_local.sh with run_tests.sh that supports three modes: 1. RUN_LOCAL_TESTS set: build from local source (per-PR CI) 2. TEST_TYPE == k8s-e2e: download pre-built binary from hashrelease (scheduled CI) 3. Otherwise: fall back to bz tests (benchmarks, certification, etc.) This consolidates the work from projectcalico#12507 into the phase-script structure, and addresses lwr20's review feedback about bz tests handling non-e2e test types. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
Author
|
Incorporated into #12452 |
caseydavenport
added a commit
to caseydavenport/calico
that referenced
this pull request
Apr 17, 2026
Replace run_tests_local.sh with run_tests.sh that supports three modes: 1. RUN_LOCAL_TESTS set: build from local source (per-PR CI) 2. TEST_TYPE == k8s-e2e: download pre-built binary from hashrelease (scheduled CI) 3. Otherwise: fall back to bz tests (benchmarks, certification, etc.) This consolidates the work from projectcalico#12507 into the phase-script structure, and addresses lwr20's review feedback about bz tests handling non-e2e test types. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
caseydavenport
added a commit
to caseydavenport/calico
that referenced
this pull request
Apr 17, 2026
Replace run_tests_local.sh with run_tests.sh that supports three modes: 1. RUN_LOCAL_TESTS set: build from local source (per-PR CI) 2. TEST_TYPE == k8s-e2e: download pre-built binary from hashrelease (scheduled CI) 3. Otherwise: fall back to bz tests (benchmarks, certification, etc.) This consolidates the work from projectcalico#12507 into the phase-script structure, and addresses lwr20's review feedback about bz tests handling non-e2e test types. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #12506 - merge that first.
Updates the CI pipeline script to download the pre-built e2e binary from the hashrelease instead of calling
bz tests. TheRUN_LOCAL_TESTSpath (used by the GCP e2e block) still builds from source. Both paths now share a unified execution step using the ginkgo CLI in acalico/go-buildDocker container.This replaces the opaque
bz testscall with direct binary execution, which makes test selection visible in the pipeline config (viaK8S_E2E_FLAGS) and ensures the test binary matches the installed Calico version.Part 2 of splitting #12351.