Build: Refactor cron_job_pipeline to take the cron name as a parameter (#54899)

This commit is contained in:
Shirley
2022-09-08 13:36:36 +02:00
committed by GitHub
parent 933ec4817f
commit bdd0af0645

View File

@@ -10,7 +10,7 @@ def cronjobs(edition):
scan_docker_image_pipeline(edition, 'main-ubuntu'),
]
def cron_job_pipeline(name, steps):
def cron_job_pipeline(cronName, name, steps):
return {
'kind': 'pipeline',
'type': 'docker',
@@ -21,7 +21,7 @@ def cron_job_pipeline(name, steps):
'name': name,
'trigger': {
'event': 'cron',
'cron': 'nightly',
'cron': cronName,
},
'clone': {
'retries': 3,
@@ -38,6 +38,7 @@ def scan_docker_image_pipeline(edition, tag):
dockerImage='grafana/{}:{}'.format(edition, tag)
return cron_job_pipeline(
cronName='nightly',
name='scan-' + dockerImage + '-image',
steps=[
scan_docker_image_unkown_low_medium_vulnerabilities_step(dockerImage),