Hi Pasha,

I haven't tried yet, but it seems that Task.doFirst() and Task.doLast()
could help here?

E.g.

tasks.named("jooqCodegen") {
    doFirst {
        // Start testcontainers
    }
    doLast {
        // Stop testcontainers
    }
}


You might add some additional logic to coordinate liquibase with jooqCodegen

I hope this helps

On Thu, Feb 22, 2024 at 8:41 AM Pasha Finkelshtein <
[email protected]> wrote:

> Hi everybody!
>
> I wanna do the following during my Gradle build:
>
>
>    1. Launch docker (test?) container with postgres
>    2. Run my Liquibase migrations on it
>    3. Regenerate jOOQ code from the database
>    4. Bring the container down
>
> However, I didn't find a working way to launch a (test)container during
> the build. Did anybody succeed in doing this?
>
> Best,
> Pasha
>
> --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jooq-user/3422abd2-8312-4fc4-8476-82b6bf3b25ebn%40googlegroups.com
> <https://groups.google.com/d/msgid/jooq-user/3422abd2-8312-4fc4-8476-82b6bf3b25ebn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/CAB4ELO5wcrgPJj9vKNS4Pr33E-0xhnTDKAn7kWwir-ma7XM1eA%40mail.gmail.com.

Reply via email to