Skip to content

Commit

Permalink
Add targets to crosscompile auditbeat and test on OS X (#5785)
Browse files Browse the repository at this point in the history
* Add targets to crosscompile auditbeat and test on OS X

For travis tests were added to run the testsuite also on OS X on travis and a crosscompile target was added for auditbeat. Having auditbeat built on OS X should prevent issues like #5783.

In addition a global crosscompile target was added which should be used in Jenkins in the future. It does not use the BEATS array because packetbeat cannot be just crosscompiled on each machine for the different platforms because of the pcap dependencies. Currently the list of beats is hardcoded.

* Remove darwin because it uses cgo
  • Loading branch information
ruflin authored and andrewkroh committed Dec 7, 2017
1 parent 69b318a commit 6073d61
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ jobs:
env: TARGETS="-C auditbeat testsuite"
go: $GO_VERSION
stage: test
- os: osx
env: TARGETS="-C auditbeat testsuite"
go: $GO_VERSION
stage: test
- os: linux
env: TARGETS="-C auditbeat crosscompile"
go: $GO_VERSION
stage: test

# Libbeat
- os: linux
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ test:
unit:
@$(foreach var,$(PROJECTS),$(MAKE) -C $(var) unit || exit 1;)

# Crosscompile all beats.
.PHONY: crosscompile
crosscompile:
@$(foreach var,filebeat winlogbeat metricbeat heartbeat auditbeat,$(MAKE) -C $(var) crosscompile || exit 1;)

.PHONY: coverage-report
coverage-report:
@mkdir -p $(COVERAGE_DIR)
Expand Down
1 change: 1 addition & 0 deletions auditbeat/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ BEAT_TITLE=Auditbeat
BEAT_DESCRIPTION=Audit the activities of users and processes on your system.
SYSTEM_TESTS=false
TEST_ENVIRONMENT=false
GOX_OS?=linux windows ## @Building List of all OS to be supported by "make crosscompile".

# Path to the libbeat Makefile
-include ../libbeat/scripts/Makefile
Expand Down

0 comments on commit 6073d61

Please sign in to comment.