@@ -12,6 +12,7 @@ COVERAGE_DIR ?= $(CURDIR)/cov
1212REPORT_DIR ?= $(CURDIR ) /reports
1313RUN_ID ?= $(GITHUB_RUN_ID )
1414RUN_ATTEMPT ?= $(GITHUB_RUN_ATTEMPT )
15+ FINCH_CORE_DIR := $(CURDIR ) /deps/finch-core
1516
1617OUTPUT_DIRECTORIES := $(OUTDIR ) $(OS_OUTDIR )
1718$(OUTPUT_DIRECTORIES ) :
@@ -34,9 +35,21 @@ GITCOMMIT ?= $(shell git rev-parse HEAD)$(shell test -z "$(git status --porcelai
3435VERSION_INJECTION := -X $(PACKAGE ) /pkg/version.Version=$(VERSION )
3536VERSION_INJECTION += -X $(PACKAGE ) /pkg/version.GitCommit=$(GITCOMMIT )
3637VERSION_INJECTION += -X $(PACKAGE ) /pkg/version.GitCommit=$(GITCOMMIT )
37- LDFLAGS = "-w $(VERSION_INJECTION ) "
3838MIN_MACOS_VERSION ?= 11.0
3939
40+ # Inject soci version
41+ -include $(FINCH_CORE_DIR ) /deps/soci.conf
42+ VERSION_INJECTION += -X $(PACKAGE ) /pkg/config.SociVersion=$(SOCI_VERSION )
43+ VERSION_INJECTION += -X $(PACKAGE ) /pkg/config.SociAMD64Sha256Sum=$(SOCI_AMD64_SHA256_DIGEST )
44+ VERSION_INJECTION += -X $(PACKAGE ) /pkg/config.SociARM64Sha256Sum=$(SOCI_ARM64_SHA256_DIGEST )
45+
46+ # Inject ecr-cred-helper version
47+ -include $(FINCH_CORE_DIR ) /deps/ecr-cred-helper.conf
48+ VERSION_INJECTION += -X $(PACKAGE ) /pkg/dependency/credhelper.EcrVersion=$(ECR_CRED_HELPER_VERSION )
49+ VERSION_INJECTION += -X $(PACKAGE ) /pkg/dependency/credhelper.EcrAMD64Hash=$(ECR_CRED_HELPER_AMD64_DIGEST )
50+ VERSION_INJECTION += -X $(PACKAGE ) /pkg/dependency/credhelper.EcrARM64Hash=$(ECR_CRED_HELPER_ARM64_DIGEST )
51+ LDFLAGS = "-w $(VERSION_INJECTION ) "
52+
4053FINCH_DAEMON_LOCATION_ROOT ?= $(FINCH_OS_IMAGE_LOCATION_ROOT ) /finch-daemon
4154FINCH_DAEMON_LOCATION ?= $(FINCH_DAEMON_LOCATION_ROOT ) /finch-daemon
4255FINCH_DAEMON_CREDHELPER_LOCATION ?= $(FINCH_DAEMON_LOCATION_ROOT ) /docker-credential-finch
@@ -81,9 +94,7 @@ ifeq ($(BUILD_OS),)
8194BUILD_OS = $(shell uname -s)
8295endif
8396
84- FINCH_CORE_DIR := $(CURDIR ) /deps/finch-core
85-
86- remote-all : arch-test install.finch-core-dependencies finch finch.yaml networks.yaml config.yaml $(OUTDIR ) /finch-daemon/finch@.service
97+ remote-all : arch-test finch install.finch-core-dependencies finch.yaml networks.yaml config.yaml $(OUTDIR ) /finch-daemon/finch@.service
8798
8899ifeq ($(BUILD_OS ) , Windows_NT)
89100include Makefile.windows
@@ -108,13 +119,13 @@ CONTAINER_RUNTIME_ARCHIVE_AARCH64_DIGEST ?= "sha256:$(AARCH64_256_DIGEST)"
108119CONTAINER_RUNTIME_ARCHIVE_X86_64_LOCATION ?= "$(ARTIFACT_BASE_URL ) /$(X86_64_ARTIFACT ) "
109120CONTAINER_RUNTIME_ARCHIVE_X86_64_DIGEST ?= "sha256:$(X86_64_256_DIGEST ) "
110121
111- # For Finch on macOS and Windows, the runc override locations and digests are set
112- # based on the values set in deps/finch-core/deps/runc-override.conf
113- -include $(FINCH_CORE_DIR ) /deps/runc-override.conf
114- RUNC_OVERRIDE_AARCH64_LOCATION ?= " $( RUNC_ARTIFACT_BASE_URL ) / $( RUNC_AARCH64_ARTIFACT ) "
115- RUNC_OVERRIDE_AARCH64_DIGEST ?= "sha256: $( RUNC_AARCH64_256_DIGEST ) "
116- RUNC_OVERRIDE_X86_64_LOCATION ?= " $( RUNC_ARTIFACT_BASE_URL ) / $( RUNC_X86_64_ARTIFACT ) "
117- RUNC_OVERRIDE_X86_64_DIGEST ?= "sha256: $( RUNC_X86_64_256_DIGEST ) "
122+ # Inject dependency versions for E2E VM serial tests
123+ E2E_VM_VERSION_INJECTION := $( VERSION_INJECTION )
124+ E2E_VM_VERSION_INJECTION += -X $(PACKAGE ) /e2e/vm.NerdctlVersion=v $( NERDCTL_VERSION )
125+ E2E_VM_VERSION_INJECTION += -X $( PACKAGE ) /e2e/vm.ContainerdVersion=v $( CONTAINERD_VERSION )
126+ E2E_VM_VERSION_INJECTION += -X $( PACKAGE ) /e2e/vm.BuildKitVersion=v $( BUILDKIT_VERSION )
127+ E2E_VM_VERSION_INJECTION += -X $( PACKAGE ) /e2e/vm.RuncVersion= $( RUNC_VERSION )
128+ E2E_VM_LDFLAGS := -w $( E2E_VM_VERSION_INJECTION )
118129
119130.PHONY : finch.yaml
120131finch.yaml : $(OS_OUTDIR ) /finch.yaml
@@ -349,15 +360,15 @@ test-e2e: test-e2e-vm-serial test-e2e-container
349360
350361.PHONY : test-e2e-vm-serial
351362test-e2e-vm-serial : create-report-dir create-coverage-dir add-credhelper-to-path
352- FINCH_GOCOVERDIR=$(COVERAGE_DIR ) go test -coverpkg=./... -ldflags $( LDFLAGS ) -timeout 2h ./e2e/vm -test.v -test.gocoverdir=$(COVERAGE_DIR ) -ginkgo.v -ginkgo.timeout=2h -ginkgo.flake-attempts=3 -ginkgo.json-report=$(REPORT_DIR ) /$(RUN_ID ) -$(RUN_ATTEMPT ) -e2e-vm-serial-report.json --installed=" $( INSTALLED) "
363+ FINCH_GOCOVERDIR=$(COVERAGE_DIR ) go test -coverpkg=./... -ldflags " $( E2E_VM_LDFLAGS ) " -timeout 2h ./e2e/vm -test.v -test.gocoverdir=$(COVERAGE_DIR ) -ginkgo.v -ginkgo.timeout=2h -ginkgo.flake-attempts=3 -ginkgo.json-report=$(REPORT_DIR ) /$(RUN_ID ) -$(RUN_ATTEMPT ) -e2e-vm-serial-report.json --installed=" $( INSTALLED) "
353364
354365.PHONY : test-e2e-container
355366test-e2e-container : create-report-dir create-coverage-dir add-credhelper-to-path
356367 FINCH_GOCOVERDIR=$(COVERAGE_DIR ) go test -coverpkg=./... -ldflags $(LDFLAGS ) -timeout 2h ./e2e/container -test.v -test.gocoverdir=$(COVERAGE_DIR ) -ginkgo.v -ginkgo.timeout=2h -ginkgo.flake-attempts=3 -ginkgo.json-report=$(REPORT_DIR ) /$(RUN_ID ) -$(RUN_ATTEMPT ) -e2e-container-report.json --installed=" $( INSTALLED) "
357368
358369.PHONY : test-e2e-vm
359370test-e2e-vm : create-report-dir create-coverage-dir
360- FINCH_GOCOVERDIR=$(COVERAGE_DIR ) go test -coverpkg=./... -ldflags $( LDFLAGS ) -timeout 2h ./e2e/vm -test.v -test.gocoverdir=$(COVERAGE_DIR ) -ginkgo.v -ginkgo.timeout=2h -ginkgo.focus " updates init-only config values when values are changed after init " -ginkgo.flake-attempts=3 -ginkgo.json-report=$(REPORT_DIR ) /$(RUN_ID ) -$(RUN_ATTEMPT ) -e2e-vm-report.json --installed=" $( INSTALLED) " --registry=" $( REGISTRY) "
371+ FINCH_GOCOVERDIR=$(COVERAGE_DIR ) go test -coverpkg=./... -ldflags " $( E2E_VM_LDFLAGS ) " -timeout 2h ./e2e/vm -test.v -test.gocoverdir=$(COVERAGE_DIR ) -ginkgo.v -ginkgo.timeout=2h -ginkgo.flake-attempts=3 -ginkgo.json-report=$(REPORT_DIR ) /$(RUN_ID ) -$(RUN_ATTEMPT ) -e2e-vm-report.json --installed=" $( INSTALLED) " --registry=" $( REGISTRY) "
361372
362373.PHONY : test-e2e-cov
363374test-e2e-cov :
@@ -386,7 +397,9 @@ test-e2e-daemon:
386397 DOCKER_HOST=$(DAEMON_DOCKER_HOST) \
387398 DOCKER_API_VERSION="v1.41" \
388399 TEST_E2E=1 \
389- go test ./e2e -timeout 15m -test.v -ginkgo.v -ginkgo.randomize-all -ginkgo.json-report=$(REPORT_DIR)/$(RUN_ID)-$(RUN_ATTEMPT)-e2e-daemon-report.json \
400+ go test ./e2e -timeout 30m -test.v -ginkgo.v \
401+ -ginkgo.randomize-all -ginkgo.flake-attempts=3 \
402+ -ginkgo.json-report=$(REPORT_DIR)/$(RUN_ID)-$(RUN_ATTEMPT)-e2e-daemon-report.json \
390403 --subject="$(OUTDIR)/bin/$(BINARYNAME)" \
391404 --daemon-context-subject-prefix="$(OUTDIR)/lima/bin/limactl shell finch sudo" \
392405 --daemon-context-subject-env="LIMA_HOME=$(OUTDIR)/lima/data"
0 commit comments