modulesync
modulesync copied to clipboard
rebase from defined branch - managed_modules
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.
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
Seems like this might need to be a parameter in order for above to work correctly: https://github.com/voxpupuli/modulesync/blob/2185419a98d48e5d81387813b60968b1db540c57/lib/modulesync/git.rb#L32
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