Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converting generator.py to mage #13610

Merged
merged 34 commits into from
Oct 18, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f2b4d8b
WiP: converting generator.py to mage
fearful-symmetry Sep 11, 2019
def9e61
quick cleanup, add type check
fearful-symmetry Sep 11, 2019
4540368
more work on moving generator setup
fearful-symmetry Sep 16, 2019
1d9e6ae
port setup over to mage
fearful-symmetry Sep 17, 2019
7dd3d38
more work on copy vendor, clean up
fearful-symmetry Sep 17, 2019
a2985d3
add lic headers
fearful-symmetry Sep 17, 2019
140e032
update and clean up beat template files
fearful-symmetry Sep 18, 2019
762061d
bugfixes
fearful-symmetry Sep 18, 2019
517f198
rebase
fearful-symmetry Sep 18, 2019
cf1a31e
exclude beat template dir
fearful-symmetry Sep 18, 2019
6e8fa67
fix PackageTest
fearful-symmetry Sep 19, 2019
45a456c
work on porting test
fearful-symmetry Sep 19, 2019
492047e
still trying to get CI to work
fearful-symmetry Sep 24, 2019
92f8d1d
add install for mage
fearful-symmetry Sep 24, 2019
4dbd341
I forgot how make targets work
fearful-symmetry Sep 24, 2019
45f7faf
remove old python setup role
fearful-symmetry Sep 24, 2019
4aae953
clean up test makefiles
fearful-symmetry Sep 25, 2019
083fde4
remove old script
fearful-symmetry Sep 25, 2019
c0efb4a
update devguide
fearful-symmetry Sep 25, 2019
5a64748
fix example in Newbeat guide
fearful-symmetry Sep 25, 2019
8a39807
remove lic header in template magefile
fearful-symmetry Sep 25, 2019
b6774b4
code cleanup
fearful-symmetry Sep 25, 2019
b82d74f
error and doc cleanup
fearful-symmetry Oct 9, 2019
de7fd1f
run the imports helper link when we update vendor
fearful-symmetry Oct 9, 2019
48bcaae
print message with newbeat path
fearful-symmetry Oct 10, 2019
5784861
restore old script, move prefix to const
fearful-symmetry Oct 11, 2019
e29c38b
change logic that decides how we copy vendor
fearful-symmetry Oct 14, 2019
e41a523
add deprecation message to old python script
fearful-symmetry Oct 14, 2019
a77cd5b
remove unused make targets
fearful-symmetry Oct 14, 2019
f0d1e7b
add newline to python script
fearful-symmetry Oct 14, 2019
fe7098a
change verbage for users
fearful-symmetry Oct 15, 2019
6c60e05
add legacy make roles to makefiles
fearful-symmetry Oct 15, 2019
e045970
add changelog entry
fearful-symmetry Oct 15, 2019
c7410e9
change changelog entry
fearful-symmetry Oct 16, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
work on porting test
  • Loading branch information
fearful-symmetry committed Oct 17, 2019
commit 45a456c1ad4adf7ef67639d7e0c84db3df289be2
23 changes: 12 additions & 11 deletions generator/common/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@ test: prepare-test
export GOPATH=${PWD}/build ; \
export PATH=$${GOPATH}/bin:${PATH}; \
cd ${BEAT_PATH} ; \
$(MAKE) copy-vendor || exit 1 ; \
${PREPARE_COMMAND} \
$(MAKE) git-init || exit 1 ; \
$(MAKE) update fmt || exit 1 ; \
git config user.email "[email protected]" || exit 1 ; \
git config user.name "beats-jenkins" || exit 1 ; \
$(MAKE) git-add || exit 1 ; \
$(MAKE) check CHECK_HEADERS_DISABLED=y || exit 1 ; \
$(MAKE) || exit 1 ; \
$(MAKE) unit
Expand All @@ -29,17 +26,21 @@ prepare-test:: python-env
# Makes sure to use current version of beats for testing
rm -fr ${BUILD_DIR}/src/github.com/elastic/beats/
git clone -s ${PWD}/../../ ${BUILD_DIR}/src/github.com/elastic/beats/

rm -fr ${BEAT_PATH}
mkdir -p ${BEAT_PATH}
cd ${PWD}/${BUILD_DIR}/src/github.com/elastic/beats/ ; \
export MODULE=elastic ; \
export METRICSET=test ; \
export GO111MODULE=off; \
export GOPATH=${PWD}/build ; \
. ${PYTHON_ENV}/bin/activate && \
python ${PWD}/build/src/github.com/elastic/beats/script/generate.py \
--type=${BEAT_TYPE} \
--project_name=Testbeat \
--github_name=ruflin \
--beat_path=beatpath/testbeat \
--full_name="Nicolas Ruflin"
export NEWBEAT_PROJECT_NAME=Testbeat ; \
export NEWBEAT_GITHUB_NAME=ruflin ; \
export NEWBEAT_BEAT_PATH=beatpath/testbeat ; \
export NEWBEAT_FULL_NAME="Nicolas Ruflin" ; \
export NEWBEAT_TYPE=${BEAT_TYPE} ; \
export NEWBEAT_DEV=1 ; \
mage GenerateCustomBeat


# Runs test build for the created beat
.PHONY: test-build
Expand Down
1 change: 0 additions & 1 deletion generator/metricbeat/{beat}/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
_ "{beat_path}/include"
)


func main() {
if err := cmd.RootCmd.Execute(); err != nil {
os.Exit(1)
Expand Down