Class: SupplyChain::Slsa::ProvenanceStatement::ExternalParameters
- Inherits:
-
Object
- Object
- SupplyChain::Slsa::ProvenanceStatement::ExternalParameters
- Includes:
- ActiveModel::Model
- Defined in:
- app/models/supply_chain/slsa/provenance_statement.rb
Instance Attribute Summary collapse
-
#entry_point ⇒ Object
Returns the value of attribute entry_point.
-
#source ⇒ Object
Returns the value of attribute source.
-
#variables ⇒ Object
Returns the value of attribute variables.
Class Method Summary collapse
Instance Attribute Details
#entry_point ⇒ Object
Returns the value of attribute entry_point.
108 109 110 |
# File 'app/models/supply_chain/slsa/provenance_statement.rb', line 108 def entry_point @entry_point end |
#source ⇒ Object
Returns the value of attribute source.
108 109 110 |
# File 'app/models/supply_chain/slsa/provenance_statement.rb', line 108 def source @source end |
#variables ⇒ Object
Returns the value of attribute variables.
108 109 110 |
# File 'app/models/supply_chain/slsa/provenance_statement.rb', line 108 def variables @variables end |
Class Method Details
.from_build(build) ⇒ Object
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'app/models/supply_chain/slsa/provenance_statement.rb', line 110 def self.from_build(build) source = Gitlab::Routing.url_helpers.project_url(build.project) entry_point = build.name variables = {} build.variables.each do |variable| variables[variable.key] = if variable.masked? '[MASKED]' else variable.value end end ExternalParameters.new(source: source, entry_point: entry_point, variables: variables) end |