-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Execute all checkout steps inside docker #5673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The title isn't 100% true, because it depends on the settings (if docker is enabled). There are still commands being executed outside docker readthedocs#5673.
I think we should definitely we trying to run everything in docker, so #2 sounds the best to me. I think we can do it in stages though. Let's move the clone inside docker first, then we can figure out the best approach for the other commands after that. |
What's exactly the idea behind 2? If I understand correctly, we call
|
@humitos yeah, something like mounting the script in |
I'm thinking that could be tricky. That script would need a Python environment with Another approach could be mixture of this: query git repository data from the host (using gitpython), and use this data from the container to run the git commands inside it. |
I don't think installing gitpython in the build env is too much. We already have lots of other Python dependencies there. I think the bigger question is around architecture, and if we want more running in the build env. I think that seems like a reasonable approach, and we should at least put together a proof of concept, it shouldn't be too hard. |
So, looks like it doesn't matter if we install gitpython in the user env, bc we can't. We have a chicken/egg problem. We do all the git steps (get branches and tags) and after that we create the python env. |
But I think we can use the global python interpreter or create an env just to execute gitpython |
I have this silly POC master...stsewd:stsewd/get-git-info-from-container It works(1) in the local environment and docker, there are some things to decide:
|
Closes readthedocs#5673 There is a couple of things with this: - Git commands using gitpython will use the git binary from the host - Git commands using git directly, will use the git binary from the container. This may bring some surprises, since the git versions will be different. But I'm not really worried about it, it should work. Another thing is: To make a clone we will spin a build image, which are big, probably we could add an image that only has git in it. This should be merged after we have integrated this with the ssh-agent in .com
Right now we execute the checkout step (clone, pull) in the build itself (outside docker). The rest of commands (install deps, build html, etc) are executed inside docker.
We can't execute all the commands inside docker because we are using gitpython to parse branches/tags and other operations.
Possible solutions:
The text was updated successfully, but these errors were encountered: