Skip to content

Commit b755ac1

Browse files
committed
BUILD/MINOR: ci: add govulncheck to the ci
1 parent 03cecfd commit b755ac1

File tree

3 files changed

+386
-0
lines changed

3 files changed

+386
-0
lines changed

.aspell.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ allowed:
2626
- crd
2727
- linter
2828
- linters
29+
- govulncheck

.gitlab-ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
stages:
22
- lint
3+
- checks
34
- build
45
- test
56
- e2e
@@ -144,6 +145,28 @@ test:
144145
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
145146
- if: $CI_PIPELINE_SOURCE == 'push'
146147

148+
govulncheck:
149+
stage: checks
150+
needs: []
151+
image:
152+
name: $CI_REGISTRY_GO/docker:$DOCKER_VERSION-go$GO_VERSION
153+
entrypoint: [ "" ]
154+
rules:
155+
- if: $CI_PIPELINE_SOURCE == 'schedule' && $SCHEDULE_TYPE == 'daily'
156+
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
157+
changes:
158+
- go.mod
159+
- if: "$CI_PROJECT_NAMESPACE == 'haproxy-controller' && $CI_PIPELINE_SOURCE == 'push'"
160+
changes:
161+
- go.mod
162+
tags:
163+
- go
164+
script:
165+
- go install golang.org/x/vuln/cmd/govulncheck@latest
166+
- govulncheck -version
167+
- go mod tidy
168+
- go run cmd/govulncheck-report/main.go
169+
147170
HAProxy_2_2:
148171
extends: .e2e
149172
parallel:

0 commit comments

Comments
 (0)