41 lines
767 B
YAML
41 lines
767 B
YAML
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
|