Sha256: 9b73ea5104f512e6c728e49f819c13e94f7e027fc82e5eb1363e196124c6bde1
Contents?: true
Size: 1.86 KB
Versions: 31
Compression:
Stored size: 1.86 KB
Contents
#!/usr/bin/env ruby require 'hybrid_platforms_conductor/executable' git_from = 'master' git_to = nil smallest_set = false platform = nil platforms_handler = nil executable = HybridPlatformsConductor::Executable.new(nodes_selection_options: false) do |opts| opts.on('-f', '--from-commit COMMIT_ID', "Specify the GIT commit from which we look for diffs. Defaults to #{git_from}.") do |commit_id| git_from = commit_id end opts.on('-p', '--platform PLATFORM_NAME', "Specify the repository on which to perform the diff. Possible values are #{platforms_handler.known_platforms.map(&:name).join(', ')}") do |platform_name| platform = platform_name end opts.on('-s', '--smallest-test-sample', 'Display the minimal set of nodes to check that would validate all modifications.') do smallest_set = true end opts.on('-t', '--to-commit COMMIT_ID', 'Specify the GIT commit to which we look for diffs. Defaults to current checked out files.') do |commit_id| git_to = commit_id end end nodes_handler = executable.nodes_handler platforms_handler = executable.platforms_handler executable.parse_options! raise 'No platform specified. Please use --platform option' if platform.nil? all_impacted_nodes, impacted_nodes, impacted_services, impact_global = nodes_handler.impacted_nodes_from_git_diff( platform, from_commit: git_from, to_commit: git_to, smallest_set: smallest_set ) executable.out '* Potentially all nodes of this platform are impacted.' if impact_global executable.out '' executable.out "* #{impacted_services.size} impacted services:\n#{impacted_services.join("\n")}" executable.out '' executable.out "* #{impacted_nodes.size} impacted nodes (directly):\n#{impacted_nodes.join("\n")}" executable.out '' executable.out "* #{all_impacted_nodes.size} impacted nodes (total#{smallest_set ? ' smallest set' : ''}):\n#{all_impacted_nodes.join("\n")}" executable.out ''
Version data entries
31 entries across 31 versions & 1 rubygems