Add "source" property to Job
To track whether a job is initiated by Scan Execution Policy as part of an existing pipeline, an attribute on the job itself should be created, which will be set by the process that creates the SEP job.
Proposal:
- Create
ci_builds_sources
table joiningci_builds
to a string value - in this casescan_execution_policy
. - Add
source
attribute to Ci::Build that returns this value if present; otherwise, delegate to the job's pipeline
(Note) If we have a 1 to 1 relation with the p_ci_builds
table, then this new table will have to be partitioned as well: https://docs.gitlab.com/ee/development/cicd/cicd_tables.html
Edited by Aaron Huntsman