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

rebase from defined branch - managed_modules #121

Open
cdenneen opened this issue Jun 6, 2017 · 2 comments
Open

rebase from defined branch - managed_modules #121

cdenneen opened this issue Jun 6, 2017 · 2 comments

Comments

@cdenneen
Copy link
Contributor

cdenneen commented Jun 6, 2017

instead of providing namespace in modulesync.yml could managed_modules.yml allow for the following syntax:

---
- puppetlabs/puppetlabs-apt
- voxpupuli/puppet-iis

Allowing for the / prefix to be parsed as namespace?

This would allow for managing modules across multiple namespaces. Otherwise I'm not sure if it's possible to do and creating a modulesync_confg for each namespace seems like a poor way to manage something like this.

Any other suggestions welcome.

@cdenneen
Copy link
Contributor Author

cdenneen commented Jun 6, 2017

OK after further diving it looks like this works as expected.
Is there a way to parse a different branch rather than master on a module basis?

Tried to add something like:

- voxpupuli/puppet-iis
  branch: dev

but didn't work

@cdenneen
Copy link
Contributor Author

cdenneen commented Jun 6, 2017

Seems like this might need to be a parameter in order for above to work correctly:

repo.checkout('origin/master')

Also in order to keep remote modulesync branches up to date with master or dev branches before pushing these changes wouldn't the remote branch need to be a parameter in order to rebase against?

So something like:

if ! upstream_branch 
  default_upstream_branch = 'master'
else
  default_upstream_branch = upstream_branch
end

repo.checkout(branch)
repo.pull('origin', default_upstream_branch)
repo.push('origin', branch)

Because currently I believe branch is set to options[:branch] which if it's modulesync then it will pull changes for modulesync and then push back to modulesync but doesn't resync against master or in some cases based on development workflow dev branch

@cdenneen cdenneen changed the title namespaced managed_modules rebase from defined branch - managed_modules Jul 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant