[feature request] Interactive build
JonathanWilbur opened this issue · 5 comments
Is your feature request related to a problem? Please describe.
I cannot build this in a Docker container with no human interaction. It currently halts on apt install, waiting for me to accept installation of the dependencies.
Describe the solution you'd like
I would like a -y option or something like that to auto-accept / not require human interaction.
Describe alternatives you've considered
Rewriting the build script, which I might do eventually anyway. I ultimately want to make a Docker image whose build script has little to no branching execution, variables, etc., so that it is super readable what all is being done to build the kernel image.
Hello @JonathanWilbur,
Tilck has extensive tests using containers, but I haven't documented that because they are used only in Azure Pipelines. Take a look at those two pipelines:
https://vkvaltchev.visualstudio.com/Tilck/_build/results?buildId=2008&view=results
https://vkvaltchev.visualstudio.com/Tilck/_build/results?buildId=2009&view=results
Therefore, I have already Docker containers ready for building Tilck, with all the dependencies pre-downloaded and compiled. Plus, I have minimal containers for 4 distros checking, which I use that the build_toolchain works when it has to do all the work. The main Docker container is vvaltchev/tilck-ci-build:v4. See the its DockerFile in other/containers/tilck-ci-build: https://github.com/vvaltchev/tilck/blob/master/other/containers/tilck-ci-build/Dockerfile
Now, the key answer to your question, how to do everything non-interactively, is to use one environment variable CI=1. For more info see also the YML file for the main pipeline: .azure-pipelines.yml
Let me know if you have any further questions.
Thanks,
Vlad
I used that environment variable, but it still didn't work. I think I see now why your Docker container works and why me just adding the CI=1 to my Dockerfile does not make it work:
tilck/other/containers/tilck-ci-build/Dockerfile
Lines 8 to 11 in d6cb592
Here, you install all of the dependencies, so by the time you run apt install, you already have them, so your pipeline does not freeze waiting on them. In other words, I think your build script does not actually use this CI variable for that particular step. I added that exact step to my Dockerfile and now it works. I'll create a PR if I can find where it's happening.
Actually, when I undid the above line and used RUNNING_IN_CI=1 that seemed to work. Did you just mistake that for the other environment variable? I found that in the parts of the code that determine whether to use the -y flag.
@JonathanWilbur Yeah, that's correct. The real env variable is RUNNING_IN_CI but I thought that I supported CI as a shortcut as well. It might not be true in some cases. RUNNING_IN_CI really works.
I guess I can close this issue, as RUNNING_IN_CI solved the problem. We can continue discussing about your plans on the other issue.