Add .gitlab-ci.yml file

This commit is contained in:
Ethanell 2022-02-13 09:08:28 +00:00
parent 9f78f7a655
commit 73704a8824

41
.gitlab-ci.yml Normal file
View 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