| Class | R10K::Source::Git |
| In: |
lib/r10k/source/git.rb
|
| Parent: | R10K::Source::Base |
This class implements a source for Git environments.
A Git source generates environments by locally caching the given Git repository and enumerating the branches for the Git repository. Branches are mapped to environments without modification.
@since 1.3.0
| cache | [R] |
@!attribute [r] cache
@api private @return [R10K::Git::Cache] The git cache associated with this source |
| invalid_branches | [R] |
@!attribute [r] invalid_branches
@return [String] How Git branch names that cannot be cleanly mapped to
Puppet environments will be handled.
|
| remote | [R] |
@!attribute [r] remote
@return [String] The URL to the remote git repository |
| settings | [R] |
@!attribute [r] settings
@return [Hash<Symbol, Object>] Additional settings that configure how
the source should behave.
|
Initialize the given source.
@param name [String] The identifier for this source. @param basedir [String] The base directory where the generated environments will be created. @param options [Hash] An additional set of options for this source.
@option options [Boolean, String] :prefix If a String this becomes the prefix.
If true, will use the source name as the prefix. Defaults to false for no environment prefix.
@option options [String] :remote The URL to the base directory of the SVN repository @option options [Hash] :remote Additional settings that configure how the
source should behave.
List all environments that should exist in the basedir for this source @note This is required by {R10K::Util::Basedir} @return [Array<String>]
Load the git remote and create environments for each branch. If the cache has not been fetched, this will return an empty list.
@return [Array<R10K::Environment::Git>]
Update the git cache for this git source to get the latest list of environments.
@return [void]