Skip to content

Commit

Permalink
Remove unused skopeo related logics
Browse files Browse the repository at this point in the history
Signed-off-by: Cédric Ollivier <[email protected]>
  • Loading branch information
collivier committed Jan 15, 2025
1 parent 8b0d52f commit 3a4a00a
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions src/tasks/platform/observability.cr
Original file line number Diff line number Diff line change
Expand Up @@ -85,34 +85,6 @@ namespace "platform" do
end
end

def skopeo_sha_list(repo)
tags = skopeo_tags(repo)
Log.info { "sha_list tags: #{tags}" }

if tags
tags.as_a.reduce([] of Hash(String, String)) do |acc, i|
acc << {"name" => i.not_nil!.as_s, "manifest_digest" => skopeo_digest("#{repo}:#{i}").as_s}
end
end
end

def skopeo_digest(image)
ClusterTools.install
resp = ClusterTools.exec("skopeo inspect docker://#{image}")
Log.info { resp[:output] }
parsed_json = JSON.parse(resp[:output])
parsed_json["Digest"]
end

def skopeo_tags(repo)
ClusterTools.install
resp = ClusterTools.exec("skopeo list-tags docker://#{repo}")
Log.info { resp[:output] }
parsed_json = JSON.parse(resp[:output])
parsed_json["Tags"]
end


def named_sha_list(resp_json)
Log.debug { "sha_list resp_json: #{resp_json}" }
parsed_json = JSON.parse(resp_json)
Expand Down

0 comments on commit 3a4a00a

Please sign in to comment.