Use this method to attach artifacts to build targets while running builds. Artifacts can be used to carry data through a complex build workflow, provide extra information to users, or store build results.
When creating an artifact, you will choose an artifactType from this table. These types of artifacts are supported:
Artifact Type | Name | Summary |
---|---|---|
host | Drydock Host | References a host lease from Drydock. |
working-copy | Drydock Working Copy | References a working copy lease from Drydock. |
file | File | Stores a reference to file data which has been uploaded to Phabricator. |
uri | URI | Stores a URI. |
Each artifact also needs an artifactKey, which names the artifact. Finally, you will provide some artifactData to fill in the content of the artifact. The data you provide depends on what type of artifact you are creating.
Drydock Host
References a host lease from Drydock.
Create an artifact of this type by passing host as the artifactType. When creating an artifact of this type, provide these parameters as a dictionary to artifactData:
Key | Type | Description |
---|---|---|
drydockLeasePHID | string | Drydock working copy lease to create an artifact from. |
For example:
{ "drydockLeasePHID": "PHID-DRYL-abcdefghijklmnopqrst" }
Drydock Working Copy
References a working copy lease from Drydock.
Create an artifact of this type by passing working-copy as the artifactType. When creating an artifact of this type, provide these parameters as a dictionary to artifactData:
Key | Type | Description |
---|---|---|
drydockLeasePHID | string | Drydock working copy lease to create an artifact from. |
For example:
{ "drydockLeasePHID": "PHID-DRYL-abcdefghijklmnopqrst" }
File
Stores a reference to file data which has been uploaded to Phabricator.
Create an artifact of this type by passing file as the artifactType. When creating an artifact of this type, provide these parameters as a dictionary to artifactData:
Key | Type | Description |
---|---|---|
filePHID | string | File to create an artifact from. |
For example:
{ "filePHID": "PHID-FILE-abcdefghijklmnopqrst" }
URI
Stores a URI.
With ui.external, you can use this artifact type to add links to build results in an external build system.
Create an artifact of this type by passing uri as the artifactType. When creating an artifact of this type, provide these parameters as a dictionary to artifactData:
Key | Type | Description |
---|---|---|
uri | string | The URI to store. |
name | optional string | Optional label for this URI. |
ui.external | optional bool | If true, display this URI in the UI as an link to additional build details in an external build system. |
For example:
{ "uri": "https://buildserver.mycompany.com/build/123/", "name": "View External Build Results", "ui.external": true }