We use spring boot
and Jooq
together in our project, and we are setting a Gitlab CI/CD process with build
, test
, deploy
phases.
We found that Jooq can be a bit challenging when setting up the CI/CD process since we have to spin up a dockerized db specifically to run jooq.
Basically, our steps in the build
phase in Gitlab CI are:
mvn flyway:migrate ...
mvn package -DskipTests
(which runs jooq
to generate the code)target/
So far so good, however the next CI/CD job is the Test
phase, where we do:
target/
from cachemvn test -DskipJooq=true
Since mvn package
already executed jooq to generate sources the problem we have is that when calling mvn test -DskipJooq=true
JOOQ does not do anything, but we still need jooq
to compile the generated java files.
I couldn't find anything related to this. Is there any way to achieve that?
For the moment, we solved this by spinning up the db, running flyway and jooq again in the test phase (the same process we have in build
phase), but this looks like unnecessary if we could make jooq to compile the generated sources.