provide makefile target for ci, and don't strip line when serializing Event
This commit is contained in:
parent
e6536a7265
commit
f4ba5e4425
3 changed files with 20 additions and 1 deletions
12
Makefile
12
Makefile
|
@ -39,6 +39,18 @@ goversion:
|
||||||
CURRENT_GOVERSION="$(shell go version | cut -d " " -f3 | sed -r 's/[go]+//g')"
|
CURRENT_GOVERSION="$(shell go version | cut -d " " -f3 | sed -r 's/[go]+//g')"
|
||||||
RESPECT_VERSION="$(shell echo "$(CURRENT_GOVERSION),$(REQUIRE_GOVERSION)" | tr ',' '\n' | sort -V)"
|
RESPECT_VERSION="$(shell echo "$(CURRENT_GOVERSION),$(REQUIRE_GOVERSION)" | tr ',' '\n' | sort -V)"
|
||||||
|
|
||||||
|
|
||||||
|
hubci:
|
||||||
|
@rm -rf crowdsec-xxx hub-tests
|
||||||
|
BUILD_VERSION=xxx make release
|
||||||
|
@git clone https://github.com/crowdsecurity/hub-tests.git
|
||||||
|
@cd hub-tests && make
|
||||||
|
@cd crowdsec-xxx && ./test_env.sh
|
||||||
|
@cd crowdsec-xxx/tests && bash ../../scripts/install_all.sh
|
||||||
|
@cp hub-tests/main ./crowdsec-xxx/tests/
|
||||||
|
@cp -R hub-tests/tests ./crowdsec-xxx/tests/
|
||||||
|
@cd ./crowdsec-xxx/tests/ && bash ../../hub-tests/run_tests.sh
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@make -C $(CROWDSEC_FOLDER) clean --no-print-directory
|
@make -C $(CROWDSEC_FOLDER) clean --no-print-directory
|
||||||
@make -C $(CSCLI_FOLDER) clean --no-print-directory
|
@make -C $(CSCLI_FOLDER) clean --no-print-directory
|
||||||
|
|
|
@ -19,7 +19,7 @@ type Event struct {
|
||||||
/* the current stage of the line being parsed */
|
/* the current stage of the line being parsed */
|
||||||
Stage string `yaml:"Stage,omitempty"`
|
Stage string `yaml:"Stage,omitempty"`
|
||||||
/* original line (produced by acquisition) */
|
/* original line (produced by acquisition) */
|
||||||
Line Line `json:"-" yaml:"Line,omitempty"`
|
Line Line `json:"Line" yaml:"Line,omitempty"`
|
||||||
/* output of groks */
|
/* output of groks */
|
||||||
Parsed map[string]string `json:"Parsed,omitempty" yaml:"Parsed,omitempty"`
|
Parsed map[string]string `json:"Parsed,omitempty" yaml:"Parsed,omitempty"`
|
||||||
/* output of enrichment */
|
/* output of enrichment */
|
||||||
|
|
7
scripts/install_all.sh
Normal file
7
scripts/install_all.sh
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
./cscli -c dev.yaml list parsers -a -o json | jq -r ".[].name" > installed_parsers.txt
|
||||||
|
cat installed_parsers.txt | while read parser; do
|
||||||
|
echo "install ${parser}" ;
|
||||||
|
./cscli -c dev.yaml install parser ${parser} ;
|
||||||
|
done
|
Loading…
Add table
Reference in a new issue