Simplify plugin deployment and the plugin developer's life #366

Closed
marbetschar opened this Issue Apr 27, 2012 · 14 comments

Comments

Projects
None yet
4 participants
@marbetschar

I really love the new autoDiscoverPlugin option in mura. It's definitely a big step in the right direction and simplifies the plugin development a lot! In conjunction with the directoryFormat option of the plugin it'll be a great way of check out the plugin from a repository, put it into the plugins folder and to start the coding from there right away. That's what I thought....

Unfortunately mura seems to delete the plugins folder on deployment, even the directoryFormat option is set to packageOnly and the plugin folder has already the package name. That's why I have to checkout every plugin twice before I may start coding - that's really annoying :(

In my opinion, mura should not delete and recreate the plugin/myPlugin folder if the directoryFormat option is set to packageOnly and the myPlugin folder name is already the same as the plugins package.

@mattlevine

This comment has been minimized.

Show comment
Hide comment
@mattlevine

mattlevine Apr 27, 2012

Member

I think the issue is that the copy directory method that Mura use's removes hidden files. It was specifically added to remove svn file a long time ago. I think that behavior could easily be tweaked in the case auto discovering plugins. After that all you would need to do is checkout your project from github and reload Mura to install a plugin. I'll look at doing this in the near future.

Member

mattlevine commented Apr 27, 2012

I think the issue is that the copy directory method that Mura use's removes hidden files. It was specifically added to remove svn file a long time ago. I think that behavior could easily be tweaked in the case auto discovering plugins. After that all you would need to do is checkout your project from github and reload Mura to install a plugin. I'll look at doing this in the near future.

@marbetschar

This comment has been minimized.

Show comment
Hide comment
@marbetschar

marbetschar Apr 27, 2012

Sounds great!! I'm looking forward to the next update :)

Sounds great!! I'm looking forward to the next update :)

@mattlevine

This comment has been minimized.

Show comment
Hide comment
@mattlevine

mattlevine Apr 27, 2012

Member

It you update your core you can now set the /config/settings.ini.cfm autoDiscoverPlugins=true and the simple clone your plugin into the /plugins directory reload Mura.

In the plugin/config.xml you can also set

<autoDeploy>true</autoDeploy>

to tell Mura to not just register the plugin, but actually make it go live as well as add

<siteid>siteA,siteB</siteid>

for site assignments for the autoDeployment.

Member

mattlevine commented Apr 27, 2012

It you update your core you can now set the /config/settings.ini.cfm autoDiscoverPlugins=true and the simple clone your plugin into the /plugins directory reload Mura.

In the plugin/config.xml you can also set

<autoDeploy>true</autoDeploy>

to tell Mura to not just register the plugin, but actually make it go live as well as add

<siteid>siteA,siteB</siteid>

for site assignments for the autoDeployment.

@marbetschar

This comment has been minimized.

Show comment
Hide comment
@marbetschar

marbetschar Apr 27, 2012

Great!! So the issue is fixed now? :)

Great!! So the issue is fixed now? :)

@mattlevine

This comment has been minimized.

Show comment
Hide comment
@mattlevine

mattlevine Apr 27, 2012

Member

I can now navigate to the plugins directory in terminal and run "git clone ..." then reload Mura and the plugin is now installed with git. As I undertand it that was the issue. So yes, but please test it fot yourself.

Member

mattlevine commented Apr 27, 2012

I can now navigate to the plugins directory in terminal and run "git clone ..." then reload Mura and the plugin is now installed with git. As I undertand it that was the issue. So yes, but please test it fot yourself.

@marbetschar

This comment has been minimized.

Show comment
Hide comment
@marbetschar

marbetschar Apr 27, 2012

Matt, you made my day! :) Works like a charm!!!

Matt, you made my day! :) Works like a charm!!!

@s992

This comment has been minimized.

Show comment
Hide comment
@s992

s992 Apr 30, 2012

@mattlevine I'm having an issue with this on CF9 on Windows Server 2003. When I reload Mura after performing an svn checkout into the plugins directory, I get a file not found error:

Could not find the included template /plugins/2B0477B9-3048-651A-FE5302DE478A3124/plugin/config.xml.cfm.

It looks like it's taking my plugin directory, renaming it to a UUID, and then creating another directory with a different UUID. The second directory is empty, which sounds like there's supposed to be some copying (or something) going on during the autodeployment that isn't happening.

Any ideas?

s992 commented Apr 30, 2012

@mattlevine I'm having an issue with this on CF9 on Windows Server 2003. When I reload Mura after performing an svn checkout into the plugins directory, I get a file not found error:

Could not find the included template /plugins/2B0477B9-3048-651A-FE5302DE478A3124/plugin/config.xml.cfm.

It looks like it's taking my plugin directory, renaming it to a UUID, and then creating another directory with a different UUID. The second directory is empty, which sounds like there's supposed to be some copying (or something) going on during the autodeployment that isn't happening.

Any ideas?

@mattlevine

This comment has been minimized.

Show comment
Hide comment
@mattlevine

mattlevine Apr 30, 2012

Member

At this point point Mura does actually rename the directory and then deploys it according to it directoryFormat setting in the plugin/config.xml(|.cfm).

Can you double check that you have a a /plugin/config.xml.cfm in your plugin? I know it's a long shot.

Member

mattlevine commented Apr 30, 2012

At this point point Mura does actually rename the directory and then deploys it according to it directoryFormat setting in the plugin/config.xml(|.cfm).

Can you double check that you have a a /plugin/config.xml.cfm in your plugin? I know it's a long shot.

@s992

This comment has been minimized.

Show comment
Hide comment
@s992

s992 Apr 30, 2012

Yes, I do have the necessary file - the issue is that it appears to be checking the empty folder for the file. This is a really simple plugin, the entire structure is as follows:

contactInfo
    plugin
        config.xml.cfm
    index.cfm
    pluginEventHandler.cfc

What's the correct directyFormat setting for autoDeploy? This plugin has <directoryFormat>packageOnly</directoryFormat>

s992 commented Apr 30, 2012

Yes, I do have the necessary file - the issue is that it appears to be checking the empty folder for the file. This is a really simple plugin, the entire structure is as follows:

contactInfo
    plugin
        config.xml.cfm
    index.cfm
    pluginEventHandler.cfc

What's the correct directyFormat setting for autoDeploy? This plugin has <directoryFormat>packageOnly</directoryFormat>

@mattlevine

This comment has been minimized.

Show comment
Hide comment
@mattlevine

mattlevine Apr 30, 2012

Member

Can you test it without the svn element?

Member

mattlevine commented Apr 30, 2012

Can you test it without the svn element?

@s992

This comment has been minimized.

Show comment
Hide comment
@s992

s992 Apr 30, 2012

I get the same error when removing SVN. When reloading Mura, it renames the existing directory and then creates a new one, so I have 31A3ABAF-BA43-025D-FAFE911C52B53F4A (the renamed directory) and 31A3ABFD-C7CE-F262-1324E2FA06FAD2EF (the new directory). It's searching for the file in the latter (the new one), but not finding anything because the directory is empty.

Interestingly enough, I examined the files in my plugin directory after the auto deploy failed and they have all been completely wiped out; That is, the files still exist but the content of the files themselves have disappeared - all of them are simply blank.

EDIT: If it matters, I am on Core Version 5.6.4888

s992 commented Apr 30, 2012

I get the same error when removing SVN. When reloading Mura, it renames the existing directory and then creates a new one, so I have 31A3ABAF-BA43-025D-FAFE911C52B53F4A (the renamed directory) and 31A3ABFD-C7CE-F262-1324E2FA06FAD2EF (the new directory). It's searching for the file in the latter (the new one), but not finding anything because the directory is empty.

Interestingly enough, I examined the files in my plugin directory after the auto deploy failed and they have all been completely wiped out; That is, the files still exist but the content of the files themselves have disappeared - all of them are simply blank.

EDIT: If it matters, I am on Core Version 5.6.4888

@mattlevine

This comment has been minimized.

Show comment
Hide comment
@mattlevine

mattlevine Apr 30, 2012

Member

Please update your core and retest.

Member

mattlevine commented Apr 30, 2012

Please update your core and retest.

@s992

This comment has been minimized.

Show comment
Hide comment
@s992

s992 May 1, 2012

@mattlevine Thanks! That fixed it on my local development machine and I'll be testing it on our production server later today, but I don't expect to run into any issues.

s992 commented May 1, 2012

@mattlevine Thanks! That fixed it on my local development machine and I'll be testing it on our production server later today, but I don't expect to run into any issues.

@s992

This comment has been minimized.

Show comment
Hide comment
@s992

s992 May 1, 2012

@mattlevine Works great on the production server as well. Thanks, as always, for the quick response and fix!

s992 commented May 1, 2012

@mattlevine Works great on the production server as well. Thanks, as always, for the quick response and fix!

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