Publish anything to the Artifacts tab
You can publish any URL to the Artifacts tab.
You can use the Artifact Metadata Publisher plugin to publish any URL on the Artifacts tab of the Build details page.
Configure the Artifact Metadata Publisher plugin
To use the Artifact Metadata Publisher plugin, add a Plugin step to your CI pipeline.
For artifacts generated in the same pipeline, the Plugin step is usually placed after the step that uploads the artifact to cloud storage.
- step:
type: Plugin
name: publish artifact metadata
identifier: publish_artifact_metadata
spec:
connectorRef: YOUR_IMAGE_REGISTRY_CONNECTOR
image: plugins/artifact-metadata-publisher
settings:
file_urls: https://domain.com/path/to/artifactPlugin step specifications
Use these specifications to configure the Plugin step to use the Artifact Metadata Publisher plugin.
connectorRef
Use the built-in Docker connector (account.harness.Image) or specify your own Docker connector. Harness uses this to pull the plugin Docker image.
This setting is labeled Container Registry in the Visual editor.
image
Set to plugins/artifact-metadata-publisher.
file_urls
Provide the URL for the artifact you want to link on the Artifacts tab. In the Visual editor, set this as a key-value pair under Settings.
For artifacts in cloud storage, use the appropriate URL format for your cloud storage provider, for example:
GCS:
https://storage.googleapis.com/GCS_BUCKET_NAME/TARGET_PATH/ARTIFACT_NAME_WITH_EXTENSIONS3:
https://BUCKET.s3.REGION.amazonaws.com/TARGET/ARTIFACT_NAME_WITH_EXTENSION
For artifacts uploaded through Upload Artifacts steps, use the Bucket, Target, and artifact name specified in the Upload Artifacts step.
For private S3 buckets, use the console view URL, such as https://s3.console.aws.amazon.com/s3/object/BUCKET?region=REGION&prefix=TARGET/ARTIFACT_NAME_WITH_EXTENSION.
If you uploaded multiple artifacts, you can provide a list of URLs, such as:
You can also set display name for each of the URLs set in the plugin, by using the format name:::file_url, where ::: is the delimiter that separates the name and url. For example:
For information about using Harness CI to upload artifacts, go to Build and push artifacts and images.
Artifact metadata publisher environment variables
The artifact-metadata-publisher plugin looks for two environment variables:
PLUGIN_ARTIFACT_FILE: The file path where the plugin stores artifact metadataPLUGIN_FILE_URLS: The URLs to be published to the Artifacts tab
The URLs passed via PLUGIN_FILE_URLS are stored in PLUGIN_ARTIFACT_FILE in the following JSON format, which the CI manager expects to publish under the Artifacts tab:
Kubernetes flow differences
In Kubernetes flow, the CI manager doesn't automatically create the temporary file and pass it via PLUGIN_ARTIFACT_FILE (unlike cloud flow). You need to pass artifact_file: somefile.txt explicitly as input. The plugin then creates this file (somefile.txt) in the JSON format above, containing the URLs passed via PLUGIN_FILE_URLS input, which is then processed and displayed under the Artifacts tab in the pipeline.
Using the plugin binary on hosted macOS runners
Hosted macOS runners cannot run Docker containers, which means you cannot use the containerized Plugin step with the artifact-metadata-publisher. Instead, you can download and run the plugin binary directly in a Run step.
Download and use the plugin binary
Use the following commands in a Run step to download the appropriate binary for macOS and publish artifacts:
Note
Replace
v2.2.0with the latest version from the artifact-metadata-publisher releases.For macOS Intel (x86_64), use
artifact-metadata-publisher-darwin-amd64.zstinstead.The CI manager automatically creates a temporary file and injects it via the
PLUGIN_ARTIFACT_FILEenvironment variable, so you don't need to create or manage this file manually.
Publish multiple artifacts with custom names
You can publish multiple artifacts and set custom display names using the format name:::url, where ::: is the delimiter between the name and URL:
Example: Publishing S3 presigned URLs
Here's a complete example that generates a presigned URL for an S3 artifact and publishes it to the Artifacts tab:
Build logs and artifact files
When you run the pipeline, you can observe the step logs on the Build details page, and you can find the artifact URL on the Artifacts tab.
On the Artifacts tab, select the step name to expand the list of artifact links associated with that step.
If your pipeline has multiple steps that upload artifacts, use the dropdown menu on the Artifacts tab to switch between lists of artifacts uploaded by different steps.

Tutorial: Upload an Allure report to the Artifacts tab
This tutorial demonstrates how to use the Artifacts Metadata Publisher plugin by generating and uploading an Allure report.
See also
Troubleshoot the Artifacts tab
Go to the CI Knowledge Base for questions and issues related to the Artifacts tab, such as:
Last updated
Was this helpful?