feat: add build to life cycle hooks by stevenh · Pull Request #2653 · testcontainers/testcontainers-go

@stevenh marked this pull request as ready for review

July 17, 2024 02:52

@stevenh

Add pre and post build life cycle hooks so the user can see when an image
build is occurring and what it's tag is.

Refactor combineContainerHooks to support additional fields automatically.

Reduce overhead of hook error handling by starting with an nil error
slice and use append to allocate only if needed, in other words assume
the happy path by default hence minimising allocations.

Minimise code used in hook handling by using helper methods.

Eliminate unused / shadowed parameters from defaultPreCreateHook.

GetRepo and GetTag now return a consistent UUID if the Repo or Tag field
aren't set by setting their values. This was needed to enable the output
of the image we're going to build in the log.

@stevenh stevenh marked this pull request as ready for review

November 2, 2024 00:12

mdelapenya

mdelapenya added a commit to mdelapenya/testcontainers-go that referenced this pull request

Nov 19, 2024

mdelapenya added a commit to mdelapenya/testcontainers-go that referenced this pull request

Nov 21, 2024