mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Build: Refactor cron_job_pipeline to take the cron name as a parameter (#54899)
This commit is contained in:
parent
933ec4817f
commit
bdd0af0645
@ -10,18 +10,18 @@ def cronjobs(edition):
|
|||||||
scan_docker_image_pipeline(edition, 'main-ubuntu'),
|
scan_docker_image_pipeline(edition, 'main-ubuntu'),
|
||||||
]
|
]
|
||||||
|
|
||||||
def cron_job_pipeline(name, steps):
|
def cron_job_pipeline(cronName, name, steps):
|
||||||
return {
|
return {
|
||||||
'kind': 'pipeline',
|
'kind': 'pipeline',
|
||||||
'type': 'docker',
|
'type': 'docker',
|
||||||
'platform': {
|
'platform': {
|
||||||
'os': 'linux',
|
'os': 'linux',
|
||||||
'arch': 'amd64',
|
'arch': 'amd64',
|
||||||
},
|
},
|
||||||
'name': name,
|
'name': name,
|
||||||
'trigger': {
|
'trigger': {
|
||||||
'event': 'cron',
|
'event': 'cron',
|
||||||
'cron': 'nightly',
|
'cron': cronName,
|
||||||
},
|
},
|
||||||
'clone': {
|
'clone': {
|
||||||
'retries': 3,
|
'retries': 3,
|
||||||
@ -38,6 +38,7 @@ def scan_docker_image_pipeline(edition, tag):
|
|||||||
dockerImage='grafana/{}:{}'.format(edition, tag)
|
dockerImage='grafana/{}:{}'.format(edition, tag)
|
||||||
|
|
||||||
return cron_job_pipeline(
|
return cron_job_pipeline(
|
||||||
|
cronName='nightly',
|
||||||
name='scan-' + dockerImage + '-image',
|
name='scan-' + dockerImage + '-image',
|
||||||
steps=[
|
steps=[
|
||||||
scan_docker_image_unkown_low_medium_vulnerabilities_step(dockerImage),
|
scan_docker_image_unkown_low_medium_vulnerabilities_step(dockerImage),
|
||||||
|
Loading…
Reference in New Issue
Block a user