It would be nice to limit the task certain platforms. Git pull won't work well on dev sandboxes due to .git dir permissions issues and adding new files as dev user. But it will work fine on stage servers. So, maybe a configuration option checkboxes to limit which platform sites can allow git pull etc.

Ok, thanks for your consideration. I'd be happy to help with this project if needed.

Comments

Gerben Spil’s picture

Would you like the configuration option on a per git command basis?
So that you can enable/disbale git pull, git clone and git checkout per site?

chrisschaub’s picture

Hmmm, maybe on demand with each invocation of the task. i could be a lot of work to set those defaults, and platforms and sites keep changing in the aegir world. It would also be way cool to have a checkbox to do a feature revert all ... maybe demands another task. but we always do a pull, verify, drush fra and then clear cache to make sure code gets deployed to a spoke.

If other git commands were possible, it would be good to set which ones are allowed for users. Really, i think pull is the most useful. It will be hard to get the others to work well with existing dirs after a clone etc. I guess the settings would have to per site since you would need to specify the default branch a site is on, or maybe what to do with things like gitignore etc.

Gerben Spil’s picture

I've actually added a git clone and git checkout (review branch). They both work with a dialog, enabling you to select where you want to perform the git command. Obviously a checkout is only possible when there's a git repo present and a clone is only available in empty directories. For the clone you need to specify where your repo is located. The checkout does a git fetch --tags and then performs the git checkout %tagname%.

Perhaps adding an init which also creates a gitignore file on the fly can be added, so that you can also perform a checkout for the complete site.

Currently the pull is working without a dialog and performs the git pull command on the site. Perhaps a dialog should be added, so you can select where to pull?

helmo’s picture

I personally don't have a usecase where I would want to limit these tasks per platform. For me it would be more useful to work with rolls.

Perhaps a dialog should be added, so you can select where to pull?

Yes, as it is possible to do multiple checkout's you will need the option to choose where to pull.

Adding a 'feature revert all' sounds nice but also a little out of scope for this module. Unless we were to implement a generic option to execute any drush command after the pull operation.

Gerben Spil’s picture

I will add the dialog to the pull command. Perhaps a configuration screen is needed for the locations where to perform git commands? Now t is hardcoded.

chrisschaub’s picture

there could be two text boxes that default to

origin / master

that folks could override as needed. Most folks will have a workflow they use with git, so setting at a too level for all git ops makes sense. And just use those settings as defaults in the various dialogs which can be overridden. Limiting access to git commands by role is probably good. It would also be nice to set which ones are available in a global setting someplace -- just to keepmthe clutter of tasks down for admins.

My comment about doing drush fra after each pull is going to be a common need -- most folks will be using git with features. Maybe a way to have extra drush commands run or a checkbox. I would say that a separate module makes since if this module didnt do a verify. But as is, many sites will break after the pull needing a drush fra or cc all. It's going to a commn use case imo.

Gerben Spil’s picture

I can probably add the drush fra and the drush cc all as checkboxes in the task dialog.

helmo’s picture

Project: Hosting site Git » Aegir Hosting Git
Version: 6.x-1.x-dev » 7.x-3.x-dev
Issue summary: View changes

Moving this to the hosting_git queue as per #2201133: [meta] Consolidate Git modules
Any future development will most likely happen there.

ergonlogic’s picture

Status: Active » Closed (works as designed)

Closing for lack of activity.