Open kfatehi opened 9 years ago
strange. Is that for all deploy steps? (e.g. does the custom scripts deploy step run?)
Custom scripts deploy works correctly because it uses an object (cmd, args).
When we use an object with cmd and args, it uses docker. But heroku uses the function form.
Oh man! Now I totally understand what's going on, also with Strider-CD/strider-docker-runner#17
Strider-docker-runner works by proxying the runCmd
function into the docker container, instead of just using child_process.spawn
, and so plugins using the provided runCmd
will have the desired effects inside of the docker container. However, plugins using child_process.spawn
and friends directly will not have the desired effect, because things will be executed outside of the docker context.
I'm not entirely sure how to address this. My assumption is that the strider-gitlab
issue comes from wanting SSH key files to be present on the filesystem (this is what gitane does iirc), and they're not, because they're written to the host system, not the docker one.
Perhaps one solution would be to setup volume sharing with the host system? I don't know.
Wow, yeah, sounds annoying. I doubt ssh key files from the filesystem are used -- if so they should stop being used (I just patched this in strider-ssh-deploy a few days ago). As far as the spawn stuff... yeah, that's tricky... @niallo thoughts?
adding refs to other related bugs, since this is the closest we've come to knowing how to fix it:
https://github.com/Strider-CD/strider-docker-runner/issues/18
Plugins should use a plugin-specific way of running a command in the correct neuron net and not use child_process directly (unless they explicitly need that).
On Thursday, September 4, 2014, Keyvan Fatehi notifications@github.com wrote:
adding refs to other related bugs, since this is the closest we've come to knowing how to fix it:
Strider-CD/strider-docker-runner#18 https://github.com/Strider-CD/strider-docker-runner/issues/18
meric426/strider-gitlab#8 https://github.com/meric426/strider-gitlab/issues/8
— Reply to this email directly or view it on GitHub https://github.com/Strider-CD/strider-heroku/issues/4#issuecomment-54567015 .
Niall O'Higgins W: http://niallohiggins.com E: n@niallo.me T: @niallohiggins
@niallo git+ssh uses gitane, which uses child_process directly https://github.com/niallo/Gitane/blob/master/index.js#L6
:( It needs to be patched to accept a function.
On Fri, Sep 5, 2014 at 10:56 AM, Jared Forsyth notifications@github.com wrote:
@niallo https://github.com/niallo git+ssh uses gitane, which uses child_process directly https://github.com/niallo/Gitane/blob/master/index.js#L6
— Reply to this email directly or view it on GitHub https://github.com/Strider-CD/strider-heroku/issues/4#issuecomment-54659228 .
Niall O'Higgins W: http://niallohiggins.com E: n@niallo.me T: @niallohiggins
@niallo @jaredly 1.6.0 can't go out until we do whatever this neuron-net function patching thingy we're talking about here :D
if you guys just drop a bunch of line-number links and stuff i'm sure i can do it... but i dont quite know where to start at the moment.
just PRd gitane for accepting a function. https://github.com/niallo/Gitane/pull/4
@keyvanfatehi basically find plugins that use the child_process.spawn
function directly, and change them so they can use a passed-in spawn
function
@jaredly thanks Jared!!
@niallo does gitane need to be bumped and published?
I think so, yes.
On Thursday, October 16, 2014, Ilya Radchenko notifications@github.com wrote:
@niallo https://github.com/niallo does gitane need to be bumped and published?
— Reply to this email directly or view it on GitHub https://github.com/Strider-CD/strider-heroku/issues/4#issuecomment-59365347 .
Niall O'Higgins W: http://niallohiggins.com E: n@niallo.me T: @niallohiggins
The worker's deploy step does not run within the context of the docker container