Closed giovannicandido closed 10 months ago
Yes, it is the same problem. The workaround works, thanks.
I set up the service using GitHub pipeline options, and that can have a static configuration.
However, if the environment does not support a fixed URL (for example, dynamic ports as the default behavior of testcontainer), then it will not work.
I tried to contribute to this change, but it will be much more work than I anticipated, so if there is more demand, this could be done.
Again, Thank you.
Hi, I have a Gradle task that creates a Postgresql container on the fly, using test containers. The URL for this container is not static; ports can change.
Then, I migrate the project using liquibase, which prepares the database for jooq code generation in another task.
The liquibase task is able to lazy load the gradle property I set after the creation of the container. But this plugin does not.
My goal is to automate the process using ci/cd. I don't want to check the generated code in version control.
Before I share part of the code, let me explain how it's done:
The jooq task receives the default value, because the jooq configuration is evaluated at gradle configuration time, not at the task runtime.
A workaround could be to force a fixed port in the test container, but that could make the ci/cd process randomly fail.
Here is part of the code, if needed, I can share a full working example:
Code that creates the container: