parent
6b5f272c0a
commit
f5e54083c7
2 changed files with 23 additions and 53 deletions
51
.github/workflows/ci_hub-tests.yml
vendored
51
.github/workflows/ci_hub-tests.yml
vendored
|
@ -1,51 +0,0 @@
|
|||
name: Hub-CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- 'mkdocs.yml'
|
||||
- 'README.md'
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- 'mkdocs.yml'
|
||||
- 'README.md'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Hub Parser/Scenario tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Go 1.16
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.16
|
||||
id: go
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Build release
|
||||
run: make release
|
||||
- name: clone and build hub CI tool
|
||||
run: |
|
||||
git clone https://github.com/crowdsecurity/hub-tests.git
|
||||
cd hub-tests
|
||||
make
|
||||
- id: keydb
|
||||
uses: pozetroninc/github-action-get-latest-release@master
|
||||
with:
|
||||
owner: crowdsecurity
|
||||
repo: crowdsec
|
||||
excludes: draft
|
||||
- name: Create crowdsec test env with all parsers from the release
|
||||
run: |
|
||||
cd crowdsec-${{ steps.keydb.outputs.release }}
|
||||
./test_env.sh
|
||||
cd tests
|
||||
for i in `./cscli -c dev.yaml parsers list -a -o json | jq -r ".[].name" ` ; do
|
||||
./cscli -c dev.yaml parsers install $i ;
|
||||
done
|
25
Makefile
25
Makefile
|
@ -142,7 +142,28 @@ package:
|
|||
@cp -R ./config/ $(RELDIR)
|
||||
@cp wizard.sh $(RELDIR)
|
||||
@cp scripts/test_env.sh $(RELDIR)
|
||||
@tar cvzf crowdsec-release.tgz $(RELDIR)
|
||||
@tar cvzf crowdsec-release.tgz $(RELDIR)
|
||||
|
||||
package_static:
|
||||
@echo Building Release to dir $(RELDIR)
|
||||
@mkdir -p $(RELDIR)/cmd/crowdsec
|
||||
@mkdir -p $(RELDIR)/cmd/crowdsec-cli
|
||||
@mkdir -p $(RELDIR)/$(subst ./,,$(HTTP_PLUGIN_FOLDER))
|
||||
@mkdir -p $(RELDIR)/$(subst ./,,$(SLACK_PLUGIN_FOLDER))
|
||||
@mkdir -p $(RELDIR)/$(subst ./,,$(SPLUNK_PLUGIN_FOLDER))
|
||||
|
||||
@cp $(CROWDSEC_FOLDER)/$(CROWDSEC_BIN) $(RELDIR)/cmd/crowdsec
|
||||
@cp $(CSCLI_FOLDER)/$(CSCLI_BIN) $(RELDIR)/cmd/crowdsec-cli
|
||||
@cp $(HTTP_PLUGIN_FOLDER)/$(HTTP_PLUGIN_BIN) $(RELDIR)/$(subst ./,,$(HTTP_PLUGIN_FOLDER))
|
||||
@cp $(SLACK_PLUGIN_FOLDER)/$(SLACK_PLUGIN_BIN) $(RELDIR)/$(subst ./,,$(SLACK_PLUGIN_FOLDER))
|
||||
@cp $(SPLUNK_PLUGIN_FOLDER)/$(SPLUNK_PLUGIN_BIN) $(RELDIR)/$(subst ./,,$(SPLUNK_PLUGIN_FOLDER))
|
||||
@cp $(HTTP_PLUGIN_FOLDER)/$(HTTP_PLUGIN_CONFIG) $(RELDIR)/$(subst ./,,$(HTTP_PLUGIN_FOLDER))
|
||||
@cp $(SLACK_PLUGIN_FOLDER)/$(SLACK_PLUGIN_CONFIG) $(RELDIR)/$(subst ./,,$(SLACK_PLUGIN_FOLDER))
|
||||
@cp $(SPLUNK_PLUGIN_FOLDER)/$(SPLUNK_PLUGIN_CONFIG) $(RELDIR)/$(subst ./,,$(SPLUNK_PLUGIN_FOLDER))
|
||||
@cp -R ./config/ $(RELDIR)
|
||||
@cp wizard.sh $(RELDIR)
|
||||
@cp scripts/test_env.sh $(RELDIR)
|
||||
@tar cvzf crowdsec-release-static.tgz $(RELDIR)
|
||||
|
||||
.PHONY: check_release
|
||||
check_release:
|
||||
|
@ -152,4 +173,4 @@ check_release:
|
|||
release: check_release build package
|
||||
|
||||
.PHONY:
|
||||
release_static: check_release static package
|
||||
release_static: check_release static package_static
|
Loading…
Reference in a new issue