hendricius / the-sourdough-framework

Open source book dedicated to helping you to make the best possible sourdough bread at home.

Home Page:https://breadco.de/book

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker image build should be done before various books compilation

cedounet opened this issue · comments

Right they are run in parallel… so guaranteed that a change to the docket image will b not be taken into account before build/release next commit.

Agreed. That should ideally be built before.

Priority probably not so high - as we probably do not change the actual docker image that often 😅 . But agreed - if this happens, we need to keep it in mind. If somebody with docker skills want's to have a go please be my guest!

We should have this image cached? I am not sure why we would build every time.

also we should probably pin the versions… that recent regression was quite annoying.

Agreed - it was super annoying to pin point this down. Thanks for the sherlock support.

Each step in the Dockerfile is cached - so yep - it's probably not going to take that long. Ideally each commit should have its own image and then one more image for the main branch.

Why do we build for every push to main ? Shall not have a branch an do it once in a blue moon Instead? Or when we add a packet

I propose we build a new image on every push to a branch? Ideally then this image should also then build the book once and attach it as artefacts to the PR? And then one in main that is always the latest version of everything after the merge?

Ok - then it would make sense we just build one image and freeze it for each branch? The image would be tagged with the branch and we can restore it later, the dependencies are frozen in the image. If nothing changes - the build process is cached for each step in the dockerfile, so only if something changes in the docker file - the image is also being updated.

Agreed 👍 . Reproducibility is important.

Not sure if I can control the "nothing changed" in the build process. I will have a look 😎 . Either way - since the dockerfile has not changed - it will take all the dependencies from the github actions cache and not take long to build again. It will then also take exactly the previous versions and not update dependencies.