forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update metricbeat to use mage for all scenarios along with Makefile s…
…him (elastic#17799) * Update metricbeat to use mage and the mage make targets. * Run update and fmt. * Remove assets.go as its no longer used. * Split apart the metricbeat tests in travis into multiple jobs to take less time and not run over the timeline. * Add back in create-metricset with mage. * Re-add test_xpack_base.py. * Add kafka to requirements.txt. * Fix kafka to work with python 3.7. * Remove the extra kafka-python from rebase on master. * Fix issues from code review. * Add back in comment from merge. * Fix comment spacing. * Fix update target in generate metricbeat. * Update magefile in metricbeat generator. * Run fmt and update.
- Loading branch information
1 parent
29ecd72
commit 8786d05
Showing
62 changed files
with
252 additions
and
304 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
MAGE_VERSION ?= v1.9.0 | ||
MAGE_PRESENT := $(shell mage --version 2> /dev/null | grep $(MAGE_VERSION)) | ||
MAGE_IMPORT_PATH ?= github.com/magefile/mage | ||
export MAGE_IMPORT_PATH | ||
|
||
.PHONY: mage | ||
mage: | ||
ifndef MAGE_PRESENT | ||
@echo Installing mage $(MAGE_VERSION) from vendor dir. | ||
@go install -mod=vendor -ldflags="-X $(MAGE_IMPORT_PATH)/mage.gitTag=$(MAGE_VERSION)" ${MAGE_IMPORT_PATH}/... | ||
@-mage -clean | ||
endif | ||
@true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,69 @@ | ||
MAGE_VERSION ?= v1.9.0 | ||
MAGE_PRESENT := $(shell mage --version 2> /dev/null | grep $(MAGE_VERSION)) | ||
MAGE_IMPORT_PATH ?= github.com/magefile/mage | ||
export MAGE_IMPORT_PATH | ||
|
||
.PHONY: mage | ||
mage: | ||
ifndef MAGE_PRESENT | ||
@echo Installing mage $(MAGE_VERSION) from vendor dir. | ||
@go install -mod=vendor -ldflags="-X $(MAGE_IMPORT_PATH)/mage.gitTag=$(MAGE_VERSION)" ${MAGE_IMPORT_PATH}/... | ||
@-mage -clean | ||
endif | ||
@true | ||
# This is a minimal Makefile for Beats that are built with Mage. Its only | ||
# responsibility is to provide compatibility with existing Jenkins and Travis | ||
# setups. | ||
|
||
# | ||
# Variables | ||
# | ||
.DEFAULT_GOAL := help | ||
PWD := $(CURDIR) | ||
|
||
# | ||
# Includes | ||
# | ||
include $(ES_BEATS)/dev-tools/make/mage-install.mk | ||
|
||
# | ||
# Targets (alphabetically sorted). | ||
# | ||
.PHONY: check | ||
check: mage | ||
mage check | ||
|
||
.PHONY: clean | ||
clean: mage | ||
mage clean | ||
|
||
fix-permissions: | ||
|
||
.PHONY: fmt | ||
fmt: mage | ||
mage fmt | ||
|
||
# Default target. | ||
.PHONY: help | ||
help: | ||
@echo Use mage rather than make. Here are the available mage targets: | ||
@mage -l | ||
|
||
.PHONY: release | ||
release: mage | ||
mage package | ||
|
||
stop-environment: | ||
|
||
.PHONY: unit-tests | ||
unit-tests: mage | ||
mage unitTest | ||
|
||
.PHONY: integration-tests | ||
integration-tests: mage | ||
rm -f build/TEST-go-integration.out | ||
mage goIntegTest || ( cat build/TEST-go-integration.out && false ) | ||
|
||
.PHONY: system-tests | ||
system-tests: mage | ||
mage pythonIntegTest | ||
|
||
.PHONY: testsuite | ||
testsuite: mage | ||
rm -f build/TEST-go-integration.out | ||
mage update build unitTest integTest || ( cat build/TEST-go-integration.out && false ) | ||
|
||
.PHONY: update | ||
update: mage | ||
mage update | ||
|
||
.PHONY: crosscompile | ||
crosscompile: mage | ||
mage crossBuild |
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.