Skip to content

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:

  1. Create ci_builds_sources table joining ci_builds to a string value - in this case scan_execution_policy.
  2. 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