Update conditions for publishing SLSA provenance

What does this MR do and why?

Updates the conditions for publishing provenance in Ci::BuildFinishedWorker as suggested in #571182:

Modify Ci::BuildFinishedWorker#should_publish_provenance to return true when the following conditions are met:

  • ATTEST_BUILD_ARTIFACTS = true
  • stage = build
  • artifacts exist
  • project.public? is true

Also moves condition checks for publishing provenance from Ci::BuildFinishedWorker to SupplyChain.publish_provenance_for_build?; updates associated specs.

Related to #571182

Edited by Aaron Huntsman

Merge request reports

Loading