chore: support for bumping ryuk in an automated manner #1195
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PRs bumps Ryuk to the latest version (v0.5.1), and adds a shell script to bump the Ryuk version in an automated manner. The script consumes just the first argument of a call, which should be the full qualified name of the Docker image representing Ryuk: e.g. "docker.io/testcontainers/ryuk:0.5.1"
This script is used to bump the version of Ryuk in Testcontainers for Go, modifying the "reaper.go" file. By default, it will be run in dry-run mode, which will print the commands that would be executed, without actually executing them.
It's possible to run the script without dry-run mode actually executing the commands.
The passed argument will replace the content of the
ReaperDefaultImage
variable in thereaper.go
file.Why is it important?
We would like to eventually bump the ryuk version in an automated manner, e.g. when ryuk is bumped in their repo, automatically clone all dependent repos (e.g. go, .net, node, java) and run the very same entrypoint in all of them, finally sending a PR. This shell script would represent the entrypoint for that, and should be eventually copied across the testcontainers projects, with the specific parsing code to extract the Ryuk version from them.
Follow-ups
We must include a way to pass the new features from Ryuk (verbose mode). I did not add them because it will cause conflicts with #1161, as it affects how the testcontainers config struct is populated