Updated workflow
This commit is contained in:
@@ -1,13 +1,26 @@
|
|||||||
# You can override the included template(s) by including variable overrides
|
image: golang:1.23
|
||||||
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
|
|
||||||
# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/pipeline/#customization
|
|
||||||
# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
|
|
||||||
# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings
|
|
||||||
# Note that environment variables can be set in several places
|
|
||||||
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
|
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
sast:
|
- build
|
||||||
|
|
||||||
|
format:
|
||||||
stage: test
|
stage: test
|
||||||
include:
|
script:
|
||||||
- template: Security/SAST.gitlab-ci.yml
|
# - go fmt $(go list ./... | grep -v /vendor/)
|
||||||
|
# - go vet $(go list ./... | grep -v /vendor/)
|
||||||
|
# - go test -race $(go list ./... | grep -v /vendor/)
|
||||||
|
gofmt -l -d *.go
|
||||||
|
|
||||||
|
compile:
|
||||||
|
stage: build
|
||||||
|
before_script:
|
||||||
|
- git config --global url.https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}.insteadOf https://${CI_SERVER_HOST}
|
||||||
|
- export GOPRIVATE=${CI_SERVER_HOST}
|
||||||
|
script:
|
||||||
|
- mkdir -p mybinaries
|
||||||
|
- go build -o mybinaries ./...
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- mybinaries
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user