Skip to content
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

Merged
merged 1 commit into from
Jan 22, 2015

Conversation

jonnytdevops
Copy link

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.

@sodabrew
Copy link

Interesting. What's the use-case for this?

@jonnytdevops
Copy link
Author

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"},
Copy link

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",
      },

@hunner
Copy link

hunner commented Jan 21, 2015

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.
Copy link

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?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hunner Yep. Anytime today.

@jonnytdevops
Copy link
Author

@sodabrew
Copy link

This will conflict with #221, so one of them should land first and then the other can be rebased / updated.

@jonnytdevops
Copy link
Author

@sodabrew Indeed. Since this PR is a large change to how the source param works, I propose that this PR gets merged first, and then I can have a go at rebasing/merging #221? (Unless @i11 wishes to try himself first of course)

@i11 what do you think?

Thanks

@sodabrew
Copy link

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":

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

hunner added a commit that referenced this pull request Jan 22, 2015
Implemented multiple remotes feature for git provider.
@hunner hunner merged commit 56e2795 into puppetlabs:master Jan 22, 2015
@hunner
Copy link

hunner commented Jan 22, 2015

Merging this one first, as #221 is currently in need of a rebase anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants