Best practices for 'either' build dependencies, or shared parent projects?
I'm trying to simulate a work flow with the fewest redundant components, in which that our projects need to be:
- Compiled for multiple os + architecture combinations. (lets say Step A)
- Build of of docker images for each combination. (lets say Step B)
- Run tests against the image. Which could be either a smoke-test or a full regression test. (lets say Step C)
- Push the image to docker hub. (lets say Step D)
As I understand it, I need to produce a configuration for each type of build I want to perform, which is okay, but to have them as part of a greater chain not only do i need A1 & A2 & A3 but I'll 3 variants of steps B C & D as well just because of the triggers and dependencies? May there be a strategy that lets me have a shared dependency configuration of the docker build / docker push? That step B does not need to be dependent explicitly to A1, but will trigger off any variation of A?
Please sign in to leave a comment.
Hi Paul,
Having a single copy of B can be done, but you would need to script your way through it. There is no ability just yet to have optional or conditional dependencies: https://youtrack.jetbrains.net/issue/TW-19132
The recommendation is to have a build template for sharing all the configuration that you require, and have different instances of build configurations for the different platforms you need. The Kotlin DSL reduces substantially the bit of maintenance overhead you need for this as they can be created programatically.