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.
Merge pull request #2 from ruflin/travis
Update Makefile and add Travis
- Loading branch information
Showing
10 changed files
with
122 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
/.idea | ||
/build | ||
|
||
.DS_Store |
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 +1,17 @@ | ||
# TODO: Run the full setup and check if a running beat is created. | ||
language: go | ||
|
||
go: | ||
- 1.5.3 | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- python-virtualenv | ||
|
||
before_script: | ||
- wget https://github.com/Masterminds/glide/releases/download/0.8.3/glide-0.8.3-linux-386.tar.gz -O /tmp/glide.tar.gz | ||
- tar -xvf /tmp/glide.tar.gz | ||
- export PATH=$PATH:$PWD/linux-386/ | ||
|
||
script: | ||
- make test |
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,2 +1,28 @@ | ||
setup: | ||
pip install cookiecutter | ||
BUILD_DIR?=build | ||
PWD=$(shell pwd) | ||
PYTHON_ENV=${BUILD_DIR}/python-env/ | ||
|
||
.PHONY: test | ||
test: python-env | ||
mkdir -p build/src | ||
cp -r \{\{cookiecutter.beat\}\} build | ||
cp tests/cookiecutter.json build/ | ||
. build/python-env/bin/activate; cookiecutter --no-input -o build/src -f build | ||
|
||
cd build/src/testbeat; \ | ||
export GOPATH=${PWD}/build; \ | ||
export GO15VENDOREXPERIMENT=1; \ | ||
glide init; \ | ||
glide update --no-recursive ; \ | ||
make update; \ | ||
make | ||
|
||
# Sets up the virtual python environment | ||
.PHONY: python-env | ||
python-env: | ||
test -d ${PYTHON_ENV} || virtualenv ${PYTHON_ENV} | ||
. ${PYTHON_ENV}/bin/activate && pip install cookiecutter PyYAML | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf build |
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,7 @@ | ||
{ | ||
"project_name": "Testbeat", | ||
"github_name": "ruflin", | ||
"beat": "{{ cookiecutter.project_name|lower }}", | ||
"beat_path": "", | ||
"full_name": "Nicolas Ruflin" | ||
} |
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,43 @@ | ||
sudo: required | ||
dist: trusty | ||
services: | ||
- docker | ||
|
||
language: go | ||
|
||
go: | ||
- 1.5.3 | ||
|
||
os: | ||
- linux | ||
- osx | ||
|
||
env: | ||
matrix: | ||
- TARGETS="check" | ||
- TARGETS="-C {{cookiecutter.beat}} testsuite" | ||
|
||
global: | ||
# Cross-compile for amd64 only to speed up testing. | ||
- GOX_FLAGS="-arch amd64" | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- python-virtualenv | ||
|
||
before_install: | ||
# Redo the travis setup but with the elastic/libbeat path. This is needed so the package path is correct | ||
- mkdir -p $HOME/gopath/src/github.com/elastic/beats/ | ||
- rsync -az ${TRAVIS_BUILD_DIR}/ $HOME/gopath/src/github.com/elastic/beats/ | ||
- export TRAVIS_BUILD_DIR=$HOME/gopath/src/github.com/elastic/beats/ | ||
- cd $HOME/gopath/src/github.com/elastic/beats/ | ||
|
||
install: | ||
- true | ||
|
||
script: | ||
- make $TARGETS | ||
|
||
after_success: | ||
# Copy full.cov to coverage.txt because codecov.io requires this file |
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