You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix multiple -tags= flags occurances.
Correct the resulting docker image that's created when FIPS is used.
Add fips e2e test that verifies a binary.
(cherry picked from commit c83472b)
# Conflicts:
# Dockerfile.fips
# Makefile
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/d58dbde584c801091e74a00940e11ff18c6c68bd/install.sh | sh -s v1.61.0
191
+
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/d58dbde584c801091e74a00940e11ff18c6c68bd/install.sh | sh -s v1.64.5
126
192
@./bin/golangci-lint run -v
127
193
128
194
.PHONY: notice
@@ -161,11 +227,19 @@ test-release: ## - Check that all release binaries are created
161
227
162
228
.PHONY: test-unit
163
229
test-unit: prepare-test-context ## - Run unit tests only
230
+
<<<<<<< HEAD
164
231
set -o pipefail; go test ${GO_TEST_FLAG} -v -race -coverprofile=build/coverage-${OS_NAME}.out ./... | tee build/test-unit-${OS_NAME}.out
165
232
166
233
.PHONY: benchmark
167
234
benchmark: prepare-test-context install-benchstat ## - Run benchmark tests only
168
235
set -o pipefail; go test -bench=$(BENCHMARK_FILTER) -run=$(BENCHMARK_FILTER)$(BENCHMARK_ARGS)$(BENCHMARK_PACKAGE)| tee "build/$(BENCH_BASE)"
236
+
=======
237
+
set -o pipefail; go test ${GO_TEST_FLAG} -tags=$(GOBUILDTAGS) -v -race -coverprofile=build/coverage-${OS_NAME}.out ./... | tee build/test-unit-${OS_NAME}.out
238
+
239
+
.PHONY: benchmark
240
+
benchmark: prepare-test-context install-benchstat ## - Run benchmark tests only
241
+
set -o pipefail; go test -bench=$(BENCHMARK_FILTER) -tags=$(GOBUILDTAGS) -run=$(BENCHMARK_FILTER)$(BENCHMARK_ARGS)$(BENCHMARK_PACKAGE)| tee "build/$(BENCH_BASE)"
242
+
>>>>>>> c83472b (Fix docker image build for FIPS variants (#4472))
169
243
170
244
.PHONY: install-benchstat
171
245
install-benchstat: ## - Install the benchstat package
>>>>>>> c83472b (Fix docker image build for FIPS variants (#4472))
249
333
endif
250
334
251
335
build-releaser: ## - Build a Docker image to run make package including all build tools
@@ -262,8 +346,18 @@ docker-release: build-releaser ## - Builds a release for all platforms in a dock
262
346
263
347
.PHONY: docker-cover-e2e-binaries
264
348
docker-cover-e2e-binaries: build-releaser
349
+
<<<<<<< HEAD
265
350
## Build for local architecture and for linux/amd64 for docker images.
266
351
docker run --rm -u $(shell id -u):$(shell id -g) --volume $(PWD):/go/src/github.com/elastic/fleet-server -e SNAPSHOT=true $(BUILDER_IMAGE) cover-linux/$(shell go env GOARCH) cover-$(shell go env GOOS)/$(shell go env GOARCH)
352
+
=======
353
+
ifeq "${FIPS}" "true"
354
+
## non-linux is currently unsupported for FIPS
355
+
docker run --rm -u $(shell id -u):$(shell id -g) --volume $(PWD):/go/src/github.com/elastic/fleet-server -e SNAPSHOT=true -e DEV=$(DEV) -e FIPS=$(FIPS) $(BUILDER_IMAGE) cover-linux/$(shell go env GOARCH)
356
+
else
357
+
## Build for local architecture and for linux/$ARCH for docker images.
358
+
docker run --rm -u $(shell id -u):$(shell id -g) --volume $(PWD):/go/src/github.com/elastic/fleet-server -e SNAPSHOT=true -e DEV=$(DEV) -e FIPS=$(FIPS) $(BUILDER_IMAGE) cover-linux/$(shell go env GOARCH) cover-$(shell go env GOOS)/$(shell go env GOARCH)
359
+
endif
360
+
>>>>>>> c83472b (Fix docker image build for FIPS variants (#4472))
267
361
268
362
.PHONY: release
269
363
release: $(PLATFORM_TARGETS)## - Builds a release. Specify exact platform with PLATFORMS env.
@@ -342,7 +436,7 @@ test-int-set: ## - Run integration tests without setup
342
436
.PHONY: build-e2e-agent-image
343
437
build-e2e-agent-image: docker-cover-e2e-binaries ## - Build a custom elastic-agent image with fleet-server binaries with coverage enabled injected
344
438
@printf "${CMD_COLOR_ON} Creating test e2e agent image\n${CMD_COLOR_OFF}"
345
-
FLEET_VERSION=${DEFAULT_VERSION}-SNAPSHOT ./dev-tools/e2e/build.sh # force fleet version to be equal to VERSION-SNAPSHOT
439
+
FIPS=${FIPS}FLEET_VERSION=${DEFAULT_VERSION}-SNAPSHOT ./dev-tools/e2e/build.sh # force fleet version to be equal to VERSION-SNAPSHOT
346
440
347
441
.PHONY: e2e-certs
348
442
e2e-certs: ## - Use openssl to create a CA, encrypted private key, and signed fleet-server cert testing purposes
@@ -376,9 +470,9 @@ test-e2e-set: ## - Run the blackbox end to end tests without setup.
0 commit comments