Hey
While investigating how Nodes trigger dependencies, and how produced artifacts trickle down, we have made a pipeline for building and testing but was wondering if there are options we’re missing for skipping fetching build products on dependent nodes defined by ‘Produces’
This is an example we have:
- Location 1 has our builder machines and our artifact store
- Location 2 has our tester machines
- We want a single machine to fetch the build from Location1->Location2 and send it to a local network drive. Then Location 2 testers can pick it up internally and run tests
- We also want on our testing templates to have the option for asking for a build, so conditionally testers will either pick up an existing build, or ask Location 1 to produce it, wait for it to be relay and then start testing
In the example buildgraph, what will happen is that `BuildRelayer - Location 2` will fetch the build from Location1, but then each of the testers will also fetch it from Location1 through the requirements before executing
The ways we’re solving this right now:
- Use chainedjobs to break templates into just building and just testing, and have options to trigger the chainedjob
This works well, but to do it we have to have conditional nodes on the builder template buildgraph, that only happen if the ‘Testing’ option is true, and then tie the chainedjobs to that, since chainedjobs don’t have a conditional
- Use the After keyword for testers, and update a general “RequiredNodes” with the publish/relay jobs
This is what we tended to do when we want order of execution, but don’t want to fetch produced files. This works well but needs to keep track of a full list of required nodes (so now “RunAllTests” becomes Test1;Test2;Publish Windows Client(conditionally) which starts to muddle the definition a bit
- Remove ‘Produces’ and use Create/Retrieve artifact
This is our current solution and it works great, so builders send explicit artifacts with CreateArtifacts, Relays use RetrieveArtifact to get them and copy them, and then Testers can just require the relay without getting any file implicitly.
The downside of this is that we can’t use Produces with the above, as it brings us back to the original issue, so all dependent nodes use the explicit RetrieveArtifact task.
- Have the producing node also produce some #BuildReport file that we can depend on instead
This feels very hacky but it works well, so Testers conditionally require #BuildReport instead of the “Build Windows Client”, they respect the order of operations, and cause a publish to trigger
So my questions are:
- Is there some way to require a node but only conditionally receive its `Produces` artifacts?
- How will the OptionalRequires linking work in regards to this? We assume it will be like Requires rather than After
- Is there a way to have multiple artifact stores across locations that replicate artifacts, so that Location2 agents can always look there when using RetrieveArtifact? If so we’d be able to remove the relay part completely
- Are we maybe doing something wrong in general?
Thank you!
NodeDepedenicesExample.xml(2.62 KB)