Skip to content

Commit ef938db

Browse files
committed
BUILD/MINOR: ci: add govulncheck to the ci
1 parent fd5b18d commit ef938db

File tree

3 files changed

+386
-0
lines changed

3 files changed

+386
-0
lines changed

.aspell.yml

+1
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ allowed:
2626
- crd
2727
- linter
2828
- linters
29+
- govulncheck

.gitlab-ci.yml

+23
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
stages:
22
- lint
3+
- checks
34
- build
45
- e2e
56
variables:
@@ -112,6 +113,28 @@ build:
112113
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
113114
- if: $CI_PIPELINE_SOURCE == 'push'
114115

116+
govulncheck:
117+
stage: checks
118+
needs: []
119+
image:
120+
name: $CI_REGISTRY_GO/docker:$DOCKER_VERSION-go$GO_VERSION
121+
entrypoint: [ "" ]
122+
rules:
123+
- if: $CI_PIPELINE_SOURCE == 'schedule' && $SCHEDULE_TYPE == 'daily'
124+
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
125+
changes:
126+
- go.mod
127+
- if: "$CI_PROJECT_NAMESPACE == 'haproxy-controller' && $CI_PIPELINE_SOURCE == 'push'"
128+
changes:
129+
- go.mod
130+
tags:
131+
- go
132+
script:
133+
- go install golang.org/x/vuln/cmd/govulncheck@latest
134+
- govulncheck -version
135+
- go mod tidy
136+
- go run cmd/govulncheck-report/main.go
137+
115138
HAProxy_2_2:
116139
extends: .e2e
117140
parallel:

0 commit comments

Comments
 (0)