Merge branch 'X-GitlabCi-Patch-MR' into 'main'
Changed CI for better view See merge request Phil/goshorly!11
This commit is contained in:
commit
97fe8febfa
1 changed files with 7 additions and 9 deletions
|
@ -1,15 +1,11 @@
|
||||||
# You can override the included template(s) by including variable overrides
|
|
||||||
# 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/#customizing-settings
|
|
||||||
# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
|
|
||||||
# Note that environment variables can be set in several places
|
|
||||||
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
|
|
||||||
variables:
|
variables:
|
||||||
REPO_NAME: git.ucode.space/Phil/goshorly
|
REPO_NAME: git.ucode.space/Phil/goshorly
|
||||||
DOCKER_BUILDKIT: 1
|
DOCKER_BUILDKIT: 1
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
- build
|
- build
|
||||||
|
|
||||||
format:
|
format:
|
||||||
image: golang:latest
|
image: golang:latest
|
||||||
stage: test
|
stage: test
|
||||||
|
@ -21,6 +17,7 @@ format:
|
||||||
- go fmt $(go list ./... | grep -v /vendor/)
|
- go fmt $(go list ./... | grep -v /vendor/)
|
||||||
- go vet $(go list ./... | grep -v /vendor/)
|
- go vet $(go list ./... | grep -v /vendor/)
|
||||||
- go test -race $(go list ./... | grep -v /vendor/)
|
- go test -race $(go list ./... | grep -v /vendor/)
|
||||||
|
|
||||||
gosec:
|
gosec:
|
||||||
image: golang:latest
|
image: golang:latest
|
||||||
before_script:
|
before_script:
|
||||||
|
@ -31,6 +28,7 @@ gosec:
|
||||||
- go install github.com/securego/gosec/v2/cmd/gosec@latest
|
- go install github.com/securego/gosec/v2/cmd/gosec@latest
|
||||||
- go get -v -d .
|
- go get -v -d .
|
||||||
- gosec ./...
|
- gosec ./...
|
||||||
|
|
||||||
docker-build-prod-latest:
|
docker-build-prod-latest:
|
||||||
image: ezkrg/buildx
|
image: ezkrg/buildx
|
||||||
stage: build
|
stage: build
|
||||||
|
@ -48,7 +46,8 @@ docker-build-prod-latest:
|
||||||
.
|
.
|
||||||
only:
|
only:
|
||||||
- main
|
- main
|
||||||
docker-build-MR-dry-run:
|
|
||||||
|
docker-build-dry-run:
|
||||||
image: docker:latest
|
image: docker:latest
|
||||||
stage: build
|
stage: build
|
||||||
services:
|
services:
|
||||||
|
@ -65,8 +64,7 @@ docker-build-MR-dry-run:
|
||||||
- docker build --pull -t "$CI_REGISTRY_IMAGE${tag}" .
|
- docker build --pull -t "$CI_REGISTRY_IMAGE${tag}" .
|
||||||
only:
|
only:
|
||||||
- merge_requests
|
- merge_requests
|
||||||
sast:
|
|
||||||
stage: test
|
|
||||||
include:
|
include:
|
||||||
- template: Security/SAST.gitlab-ci.yml
|
- template: Security/SAST.gitlab-ci.yml
|
||||||
- template: Security/SAST-IaC.latest.gitlab-ci.yml
|
- template: Security/SAST-IaC.latest.gitlab-ci.yml
|
||||||
|
|
Loading…
Reference in a new issue