mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-12 22:39:34 -05:00
ci: add govulncheck to ci
This commit is contained in:
+34
-1
@@ -318,7 +318,8 @@ def testOcisAndUploadResults(ctx):
|
||||
scan_result_upload = uploadScanResults(ctx)
|
||||
scan_result_upload["depends_on"] = getPipelineNames([pipeline])
|
||||
|
||||
return [pipeline, scan_result_upload]
|
||||
security_scan = scanOcis(ctx)
|
||||
return [pipeline, scan_result_upload, security_scan]
|
||||
|
||||
def testPipelines(ctx):
|
||||
pipelines = []
|
||||
@@ -505,6 +506,38 @@ def testOcis(ctx):
|
||||
"volumes": [pipelineVolumeGo],
|
||||
}
|
||||
|
||||
def scanOcis(ctx):
|
||||
steps = skipIfUnchanged(ctx, "unit-tests") + restoreGoBinCache() + makeGoGenerate("") + [
|
||||
{
|
||||
"name": "govulncheck",
|
||||
"image": OC_CI_GOLANG,
|
||||
"commands": [
|
||||
"make govulncheck",
|
||||
],
|
||||
"environment": DRONE_HTTP_PROXY_ENV,
|
||||
"volumes": [stepVolumeGo],
|
||||
},
|
||||
]
|
||||
|
||||
return {
|
||||
"kind": "pipeline",
|
||||
"type": "docker",
|
||||
"name": "go-vulnerability-scanning",
|
||||
"platform": {
|
||||
"os": "linux",
|
||||
"arch": "amd64",
|
||||
},
|
||||
"steps": steps,
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/heads/master",
|
||||
"refs/pull/**",
|
||||
],
|
||||
},
|
||||
"depends_on": getPipelineNames(getGoBinForTesting(ctx)),
|
||||
"volumes": [pipelineVolumeGo],
|
||||
}
|
||||
|
||||
def buildOcisBinaryForTesting(ctx):
|
||||
return {
|
||||
"kind": "pipeline",
|
||||
|
||||
Reference in New Issue
Block a user