debian-mirror-gitlab/lib/gitlab/verify/job_artifacts.rb

28 lines
469 B
Ruby
Raw Normal View History

2018-05-09 12:01:36 +05:30
module Gitlab
module Verify
class JobArtifacts < BatchVerifier
def name
'Job artifacts'
end
def describe(object)
"Job artifact: #{object.id}"
end
private
def relation
::Ci::JobArtifact.all
end
def expected_checksum(artifact)
artifact.file_sha256
end
def actual_checksum(artifact)
Digest::SHA256.file(artifact.file.path).hexdigest
end
end
end
end