class ChefCLI::Policyfile::DeliverySupermarketSource
constraints.
of continuously integrating at the cookbook level without imposing those
In the future, alternative approaches may be persued to achieve the goal
increase over time (so that largest version number == newest)
* Version numbers for cookbooks that pass through the Ci pipeline always
approval (which can be automated or not)
to a private supermarket (or equivalent, i.e. mini-mart) after final
* Cookbook changes pass through a Ci pipeline and are ultimately uploaded
(cookbook) level. To achieve this goal, two constraints must be imposed:
force developers to integrate continuously at the component artifact
make only the newest version of a given cookbook available in order to
This is intended to be used in an environment where the team wants to
cookbook can be used.
(which it delegates to), except that only the latest versions of any
Fetches cookbooks from a supermarket, similar to CommunityCookbookSource
def ==(other)
def ==(other) other.kind_of?(self.class) && other.uri == uri end
def default_source_args
def default_source_args [:delivery_supermarket, uri] end
def desc
def desc "delivery_supermarket(#{uri})" end
def initialize(uri)
def initialize(uri) @community_source = CommunityCookbookSource.new(uri) yield self if block_given? end
def universe_graph
def universe_graph @universe_graph ||= begin @community_source.universe_graph.inject({}) do |truncated, (cookbook_name, version_and_deps_list)| sorted_versions = version_and_deps_list.keys.sort_by do |version_string| Semverse::Version.new(version_string) end greatest_version = sorted_versions.last truncated[cookbook_name] = { greatest_version => version_and_deps_list[greatest_version] } truncated end end end