-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Setup an independent build for x-pack/winlogbeat #11679
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skimmed through it and so far looks good to me. But I think me or someone else should go through it again in more detail.
If I understand this correctly quite a few of the changes are actual cleanups of the existing code and not directly related to the x-pack/winlogbeat? I wonder if we should split it up in more PR's? ;-)
eca9fca
to
8990542
Compare
This is the split up version of the massive #9842. 😅 |
I'm pretty sure I asked there the same question 🤦♂️ |
eba6935
to
0002d0e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, great job.
Would be great to have a deep dive session for beats contributors on all the mage magic at one time in the future ;-)
|
||
"github.com/elastic/beats/dev-tools/mage" | ||
|
||
// mage:import | ||
_ "github.com/elastic/beats/dev-tools/mage/target/common" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mage:import
is great and will simplify things a lot.
@@ -0,0 +1,60 @@ | |||
// Licensed to Elasticsearch B.V. under one or more contributor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels quite a bit hidden in scripts
package but not something to address for this PR, more a general comment.
|
||
// Dashboards collects all the dashboards and generates index patterns. | ||
func (Update) Dashboards() error { | ||
mg.Deps(fb.FieldsYML) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Had to search for the definition of this. Would probably be nicer to have a more descriptive name or defined directly in here.
Put the infrastructure in place to give x-pack/winlogbeat its own independent build. This adds some utility code that can be used by other beats to reduce duplication. cd winlogbeat && mage -l Targets: goTestUnit is an alias for goUnitTest. update is an alias for update:all. check formats code, updates generated content, check for common errors, and checks for any modified files. clean cleans all generated files and build artifacts. dumpVariables writes the template variables and values to stdout. fmt formats source code (.go and .py) and adds license headers. build builds the Beat binary. buildGoDaemon builds the go-daemon binary (use crossBuildGoDaemon). crossBuild cross-builds the beat for all target platforms. crossBuildGoDaemon cross-builds the go-daemon binary using Docker. golangCrossBuild build the Beat binary inside of the golang-builder. packageTest tests the generated packages in build/distributions. dashboards:export exports a dashboard from Kibana and writes it into the correct directory. dashboards:import imports dashboards to Kibana using the Beat setup command. docs generates the documentation for the Beat. test runs all available tests (unitTest + integTest). goUnitTest executes the Go unit tests. pythonUnitTest executes the python system tests. unitTest executes the unit tests (Go and Python). update:all updates all generated content. update:config updates the Beat's config files. update:dashboards collects all the dashboards and generates index patterns. update:fieldDocs updates the field documentation. update:fields updates all fields files (.go, .yml). package packages the Beat for distribution.
0002d0e
to
d650124
Compare
Put the infrastructure in place to give x-pack/winlogbeat its own independent build.
This adds some utility code that can be used by other beats to reduce duplication.