Class: CodeBuildNotifier::BuildHistory
Instance Attribute Summary
Attributes inherited from DynamoBase
#config, #current_build
Instance Method Summary
collapse
Methods inherited from DynamoBase
#initialize
Instance Method Details
#last_entry ⇒ Object
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/codebuild-notifier/build_history.rb', line 22
def last_entry
return @last_entry if defined?(@last_entry)
item = launched_by_retry? ? find_by_commit : find_by_id
@last_entry = item && Hashie::Mash.new(item)
end
|
#write_entry(source_id) {|updates| ... } ⇒ Object
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/codebuild-notifier/build_history.rb', line 33
def write_entry(source_id)
updates = hash_to_dynamo_update(new_entry).merge(
key: { source_id: source_id, version_key: version_key }
)
yield updates if block_given?
update_item(updates)
ProjectSummary.new(config, current_build).update
BranchEntry.new(config, current_build).update
end
|