Prebuild hook always run #8654
Labels
area/hooks
needs-reproduction
needs reproduction from the maintainers to validate the issue is truly a skaffold bug
priority/p2
May take a couple of releases
The pre/post build hooks created from #1441 are a great addition. I would like to improve upon this further to always run certain hooks or add another hook.
Example:
I am building Docker images. As far as I know, the build phase parses all the contents of the docker image and generates a hash. We are building Golang apps that run within a docker container. If the Go code has changed, it will not rebuild. We can issue a go build for each command before running skaffold build. This is fine for a small project with only one service or a couple services. This becomes an issue for 20+ services in a monorepo. An optimization we are using is building all binaries at the same time. This speeds up generation of all the binaries using Go's internal cache by loading all the modules. Example here: ko-build/ko#314
Expected behavior
Always run the prebuild hook or define a new hook that always runs. This would run prior to the build phase that checks the hash.
Actual behavior
The prebuild hook only runs if the build needs to run
Information
The text was updated successfully, but these errors were encountered: