Strider-CD / strider-docker-runner

Strider runner that uses Docker
34 stars 19 forks source link

Git clone exit code -1 #33

Closed itoed closed 9 years ago

itoed commented 9 years ago

Could you please help me understand how this runner works?

$ git clone --recursive git@bitbucket.com:itoed/vacuum . -b devel       bitbucket 404ms -1
Cloning into '.'...
$ git checkout -qf devel                                                bitbucket 14ms -1
fatal: Not a git repository (or any of the parent directories): .git

It seems like it's the git clone, not the git checkout that's failing: it says exit code -1.

I'm using Strider version 1.6.6, running on an AWS EC2 box with Ubuntu. This installation has no problems cloning with the simple runner.

Do I need the public RSA key for bitbucket inside the docker image? Or is the git clone being done on the host?

Also, does any directory at all get mounted by the strider-docker-runner onto the guest?

Thank you!

knownasilya commented 9 years ago

-1 is just a placeholder for "no output yet", so your failure is on the checkout.

itoed commented 9 years ago

Thank you, I didn't know that.

I've been going over the source for strider-docker-runner and strider-docker-slave. There is something I don't understand. How is my project repository supposed to end up in the container?

I inspected the container and there are no mounted volumes. Strider calls worker on strider-git. How does the RSA key end up on the container?

knownasilya commented 9 years ago

cc @keyvanfatehi

kfatehi commented 9 years ago

Sorry for the super late reply.

The keys are inserted by strider-git which uses an npm module called gitane. The shell spawn commands happen through JSON objects streamed to the container. It is kind of convoluted -- one must really sit there and scan through the code in detail.

Eventually you will find that there was a better way run commands on the container that did not require depending on a base image. At the time of building this our docker experience and the npm module we were using to interface with docker was all immature. I say this because I managed to do things differently elsewhere

Unfortunately I have not had time to reconcile these lessons with strider-docker-runner

itoed commented 9 years ago

Thank you for clarifying that. In the meantime I got around this issue by calling docker build and docker run directly within my build.

knownasilya commented 9 years ago

@itoed thanks for following up!