Add .gitlab-ci.yml file
This commit is contained in:
parent
9f78f7a655
commit
73704a8824
1 changed files with 41 additions and 0 deletions
41
.gitlab-ci.yml
Normal file
41
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,41 @@
|
|||
include:
|
||||
- template: Security/SAST.gitlab-ci.yml
|
||||
|
||||
image: golang:latest
|
||||
|
||||
variables:
|
||||
REPO_NAME: git.flifloo.fr/flifloo/crowdsec-notification-telegram
|
||||
|
||||
before_script:
|
||||
- mkdir -p $GOPATH/src/$(dirname $REPO_NAME)
|
||||
- ln -svf $CI_PROJECT_DIR $GOPATH/src/$REPO_NAME
|
||||
- cd $GOPATH/src/$REPO_NAME
|
||||
|
||||
stages:
|
||||
- test
|
||||
- build
|
||||
|
||||
format:
|
||||
stage: test
|
||||
script:
|
||||
- go fmt $(go list ./... | grep -v /vendor/)
|
||||
- go vet $(go list ./... | grep -v /vendor/)
|
||||
- go test -race $(go list ./... | grep -v /vendor/)
|
||||
|
||||
sast:
|
||||
stage: test
|
||||
artifacts:
|
||||
name: sast
|
||||
paths:
|
||||
- gl-sast-report.json
|
||||
reports:
|
||||
sast: gl-sast-report.json
|
||||
when: always
|
||||
|
||||
compile:
|
||||
stage: build
|
||||
script:
|
||||
- make build
|
||||
artifacts:
|
||||
paths:
|
||||
- notification-telegram
|
Loading…
Reference in a new issue