electricitymaps / brick

Simple monorepo build tool based on Docker
20 stars 1 forks source link

Keep latest tags for branches #62

Closed skovhus closed 4 years ago

skovhus commented 4 years ago

Resolves https://github.com/tmrowco/brick/issues/61

We recently introduced a change to not not tag images on non-main branches with "latest". This avoids cache breaking as all branches will not all push the "latest" image – but it does break local development where the latest tag is used in Docker compose files.

I have a workaround if this indeed breaks the cache, when two branch builds tags the same repository with the latest tag and thereby breaks the cache.

madsnedergaard commented 4 years ago

The code make sense, but could you give me a small example of the impact of this? :)

skovhus commented 4 years ago

The code make sense, but could you give me a small example of the impact of this? :)

The impact is that you locally can use the latest tag in the docker-compose files again. Most of our docker compose files requires this.

There should not be any other impact, unless the cache is invalidated by two branches pushing the latest tag.

Let me know if I can explain this better