box: alpine build: steps: echoa: steps: - script: name: echo AA code: sleep 5 && echo 'AA' > forward.txt echob: steps: - script: name: echo BB code: sleep 8 && echo 'BB' > forward.txt readfile-a: steps: - script: name: read forward.txt code: cat echoa/forward.txt readfile-b: steps: - script: name: read forward.txt code: cat echob/forward.txt
In this example, the pipeline build fans out to the following two pipelines:
echob. Each of the pipelines,
echob produce an artifact called
forward.txt containing the text
BB respectively. The pipelines
echob fan into the following two pipelines:
You can specify whether the pipelines
readfile-b obtain the artifact
echob by collecting and storing the artifact in that pipeline’s directory, for example
<faninPipelineName2>/, and then referencing it in the required pipeline.
Fan-in connections come in handy when you want a particular pipeline to depend on specific preceding pipeline(s) to complete executing and also select the source of the artifact it is going to consume.
In the following example, the
system-test pipeline is waiting for the
integration-test pipelines to finish, and is also going to consume artifacts from both the pipelines.
To establish a fan-in connection using the Workflow Editor:
By default, only the artifact of the pipeline that originally preceded is made available to the pipeline that now has a fan-in connection. If you want the artifacts of additional or all the previous pipelines to be made available - or remove any fan-in sources, click the edit icon on the pipeline you that are currently configuring. The Manage source pipeline dialog box is displayed.