Dependency Configuration
Hi
I have two build configurations A, and B, A is for Editor binary, B is for content cook for CI.
I set a trigger for A to watch the code changes, and set a trigger for B to watch the content changes.
And B depends on A.
So if I only set Artifact dependency for B, if there is a code change and a content change happen at same time, then B will always fail. But if I set snapshot dependency for B, then A will always be required to build before B, which is also I don't want, because A takes much time, and most of the cases are content cook is fast and content check-in are frequently.
Is there a way to check if there is a code change, then wait for A to finish first and then trigger B, if there is only content change, then start B directly?
Daniel
Please sign in to leave a comment.
Hi Daniel,
If you want to strictly maintain order between A and B for the case when changes are sent to both, then you definitely need a snapshot dependency, although I must admit that I don't really understand why the content build would fail if not using a code version that was just submitted.
With this in mind, your best option would probably be to, in the code build, set up a first build step that runs a command line script that will make the build fail (with some message maybe), then set all the rest of build steps to only run if the previous step succeeded, but configure the snapshot dependency to build even if the dependency didn't succeed.
Another option would be to move the triggers to a third configuration that checks for what was changed and then triggers the corresponding builds via the REST API.