-
Notifications
You must be signed in to change notification settings - Fork 13
#26 Support init scripts for test containers #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
throw new MojoExecutionException("Error running jOOQ code generation tool", ex); | ||
} finally { | ||
closeClassloader(oldCL, mavenClassloader); | ||
try (var closableContextClassLoader = new ClosableContextClassLoader(getMavenClassloader())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reworked it to set context ClassLoader before running the container, to be able loading initScript from classpath.
Unfortunately tests as they are cannot cover this case properly (they successfully work without this change). I can try implementing multi-module test to cover it (to make it failing without the change)
@sivaprasadreddy , @mzagar, @eddumelendez , could you please merge approved PRs and publish new release? |
@kiview can you please approve? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution. I would suggest next time discussing the feature before raising a PR. No immediate action for now, I see some other options
- Support copy file
- Support volume mount
- Execute scripts using ScriptUtils (this PR)
Currently, the suggested approach is using copy files instead due to most of the images provides a fresh initialization folder.
* Optional | ||
*/ | ||
@Parameter | ||
private String initScript; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if scripts support is added then supporting a list would be more flexible.
@eddumelendez , could you please check my questions in the issue? #26 |
#26 Feature: Support for TC_INITSCRIPT parameter