Closed josegonzalez closed 7 years ago
@michaelshobbs your smoke-test-plugin fails the pre-deploy trigger tests...
@josegonzalez looks like there are a couple issues here.
First, you are correct plugn
itself doesn't call the install
trigger and thus the plugin does not get compiled.
Second, the command plugn install https://github.com/dokku/smoke-test-plugin/archive/v0.3.0.tar.gz smoke-test-plugin
yields an incorrect directory structure. Thus, you get the error cat: /var/lib/plugins/available/smoke-test-plugin/plugin.toml: No such file or directory
.
root@e3b2cab1f13c:~# find /var/lib/plugins -name "smoke*" -type d
/var/lib/plugins/available/smoke-test-plugin
/var/lib/plugins/available/smoke-test-plugin/smoke-test-plugin-0.3.0
Do we want plugn
to handle the compilation step? If so, thoughts on how to detect that? Maybe run make
only if there is a Makefile
in the root?
If it doesnt handle the install
trigger, then we need to change our tests to do that, as it seems our testing is wrong.
Regarding the incorrect directory structure, thoughts on getting that working for github zips? Sorry, a bit groggy still.
Lemme play with the tar
cmd. I'll push to this branch if I get it working.
Regarding the install
trigger, the question remains of which component should be responsible for that? Currently dokku
calls it. However, that may not be the correct place to do so. The crux of my question is, which component is responsible for triggering the install
trigger?
Can we trigger the install
command for just a single plugin at a time? If so, then plugn
should do that I think. Would be a breaking change - 0.3.0? - but I think better.
In dokku's case, we trigger the install
thing and then it tries to install all the things, which may not be great if we are specifically interacting with one plugin.
Maybe in this case we just change tests to run install
and punt on that issue for now?
Unfortunately, triggering a hook on a single plugin is counter to the design of plugn
. We can just trigger in this test for now. Git commit inbound.
Sweet that works for me.
Not adding zip support for now. If someone requests it, we can add it then?
This adds support for installing a file with a
.tar.gz
. It will detect curl and wget support, using whichever is available, and then extract the downloaded file to the destination directory