readArtifact
Purpose and behavior
Section titled “Purpose and behavior”Read the artifact published by a declared dependency: take its reference from context.value(), reject with Artifact dependency producer mismatch when another execution or task produced it, then verify and decode it like readStoredArtifact() under the task’s signal.
Complete example and detailed rules.
Parameters and properties
Section titled “Parameters and properties”contextRequiredTaskContextContext of the running task; supplies the dependency output, the execution id and the cancellation signal.dependencyRequiredTask<ArtifactReference>Artifact task listed in this task’s after; its output is the reference to read. An undeclared dependency throws.contractRequiredArtifactContract<T>Expected contract; must match the reference’s name, version and encoding.storeRequiredArtifactStoreStore holding the artifact bytes.