-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented multiple remotes feature for git provider. #230
Conversation
Interesting. What's the use-case for this? |
It was documented as a supported feature in the README, however was never implemented. |
vcsrepo { "/path/to/repo": | ||
ensure => present, | ||
provider => git, | ||
source => {"origin" => "https://github.com/puppetlabs/puppetlabs-vcsrepo.git", "other_remote" => "https://github.com/other_user/puppetlabs-vcsrepo.git"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you put this one multiple lines?
source => {
"origin" => "https://github.com/puppetlabs/puppetlabs-vcsrepo.git",
"other_remote" => "https://github.com/other_user/puppetlabs-vcsrepo.git",
},
Could you put the ticket number in the commit? Like "(MODULES-####) " |
source => {"origin" => "https://github.com/puppetlabs/puppetlabs-vcsrepo.git", "other_remote" => "https://github.com/other_user/puppetlabs-vcsrepo.git"}, | ||
} | ||
|
||
It is important to note that you must specify a mapping for the remote that is specified in the 'remote' property - this is set to 'origin' by default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@laurenrother Could I get 3 minutes of your time on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hunner Yep. Anytime today.
95d5f87
to
5d6ef98
Compare
This will conflict with #221, so one of them should land first and then the other can be rebased / updated. |
Sounds good, thanks! |
##### Using multiple remotes with a repository | ||
Instead of specifying a single string in the 'source' property, you can specify a hash with multiple name => URL mappings, | ||
|
||
vcsrepo { "/path/to/repo": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be wrapped in a puppet...
block
Implemented multiple remotes feature for git provider.
Merging this one first, as #221 is currently in need of a rebase anyway. |
This PR allows multiple remotes to be used by specifying a hash of name => URL mappings in the source property, instead of just a single URL string.