Ci improvements (#68)
This commit is contained in:
parent
64c5fa7360
commit
e3525f970b
8
.github/workflows/hub-ci.yml
vendored
8
.github/workflows/hub-ci.yml
vendored
|
@ -19,7 +19,7 @@ jobs:
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Build release
|
- name: Build release
|
||||||
run: make release
|
run: BUILD_VERSION=xxx make release
|
||||||
- name: clone and build hub CI tool
|
- name: clone and build hub CI tool
|
||||||
run: |
|
run: |
|
||||||
git clone https://github.com/crowdsecurity/hub-tests.git
|
git clone https://github.com/crowdsecurity/hub-tests.git
|
||||||
|
@ -27,19 +27,19 @@ jobs:
|
||||||
make
|
make
|
||||||
- name: Create crowdsec test env with all parsers from the release
|
- name: Create crowdsec test env with all parsers from the release
|
||||||
run: |
|
run: |
|
||||||
cd crowdsec-pull
|
cd crowdsec-xxx
|
||||||
./test_env.sh
|
./test_env.sh
|
||||||
cd tests
|
cd tests
|
||||||
for i in `./cscli -c dev.yaml list parsers -a -o json | jq -r ".[].name" ` ; do
|
for i in `./cscli -c dev.yaml list parsers -a -o json | jq -r ".[].name" ` ; do
|
||||||
./cscli -c dev.yaml install parser $i ;
|
./cscli -c dev.yaml install parser $i ;
|
||||||
done
|
done
|
||||||
- name: Setup hub ci in crowdsec
|
- name: Setup hub ci in crowdsec
|
||||||
working-directory: ./crowdsec-pull/tests/
|
working-directory: ./crowdsec-xxx/tests/
|
||||||
run: |
|
run: |
|
||||||
cp -R ../../hub-tests/tests .
|
cp -R ../../hub-tests/tests .
|
||||||
cp ../../hub-tests/main .
|
cp ../../hub-tests/main .
|
||||||
- name: Run the HUB CI
|
- name: Run the HUB CI
|
||||||
working-directory: ./crowdsec-pull/tests/
|
working-directory: ./crowdsec-xxx/tests/
|
||||||
run: |
|
run: |
|
||||||
for i in `find ./tests -mindepth 1 -maxdepth 1 -type d` ; do
|
for i in `find ./tests -mindepth 1 -maxdepth 1 -type d` ; do
|
||||||
echo "::group::Test-${i}" ;
|
echo "::group::Test-${i}" ;
|
||||||
|
|
10
Makefile
10
Makefile
|
@ -17,11 +17,11 @@ REQUIRE_GOVERSION="1.13"
|
||||||
|
|
||||||
|
|
||||||
#Current versioning information from env
|
#Current versioning information from env
|
||||||
export BUILD_VERSION="$(shell git for-each-ref --sort=-v:refname --count=1 --format '%(refname)' | cut -d '/' -f3)"
|
BUILD_VERSION?="$(shell git for-each-ref --sort=-v:refname --count=1 --format '%(refname)' | cut -d '/' -f3)"
|
||||||
export BUILD_GOVERSION="$(shell go version | cut -d " " -f3 | sed -r 's/[go]+//g')"
|
BUILD_GOVERSION="$(shell go version | cut -d " " -f3 | sed -r 's/[go]+//g')"
|
||||||
export BUILD_CODENAME=$(shell cat RELEASE.json | jq -r .CodeName)
|
BUILD_CODENAME=$(shell cat RELEASE.json | jq -r .CodeName)
|
||||||
export BUILD_TIMESTAMP=$(shell date +%F"_"%T)
|
BUILD_TIMESTAMP=$(shell date +%F"_"%T)
|
||||||
export BUILD_TAG="$(shell git rev-parse HEAD)"
|
BUILD_TAG="$(shell git rev-parse HEAD)"
|
||||||
export LD_OPTS=-ldflags "-X github.com/crowdsecurity/crowdsec/pkg/cwversion.Version=$(BUILD_VERSION) \
|
export LD_OPTS=-ldflags "-X github.com/crowdsecurity/crowdsec/pkg/cwversion.Version=$(BUILD_VERSION) \
|
||||||
-X github.com/crowdsecurity/crowdsec/pkg/cwversion.BuildDate=$(BUILD_TIMESTAMP) \
|
-X github.com/crowdsecurity/crowdsec/pkg/cwversion.BuildDate=$(BUILD_TIMESTAMP) \
|
||||||
-X github.com/crowdsecurity/crowdsec/pkg/cwversion.Codename=$(BUILD_CODENAME) \
|
-X github.com/crowdsecurity/crowdsec/pkg/cwversion.Codename=$(BUILD_CODENAME) \
|
||||||
|
|
Loading…
Reference in a new issue