devspace-sh / devspace

DevSpace - The Fastest Developer Tool for Kubernetes ⚡ Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
https://devspace.sh
Apache License 2.0
4.29k stars 359 forks source link

build option force-rebuild is always true #2567

Closed alexissellier closed 1 year ago

alexissellier commented 1 year ago

What happened?

When building an image, the --force-rebuild flag is always true leading to image rebuilding even if the docker context did not change or even if rebuildStrategy: ignoreContextChanges is specify

What did you expect to happen instead? I expect the flag to be set to false by default and its value controlled by ``--force-rebuild`

How can we reproduce the bug? (as minimally and precisely as possible)

Build any image you want using the build_image pipeline function

Anything else we need to know?

lizardruss commented 1 year ago

Hello! I left an explanation in the PR, but as it stands the default is true as reflected in the docs. It can be disabled by passing devspace build --force-build=false. For other commands, the default is false.