Skip to main content
Generic packages allow you to store any file type in Harness Artifact Registry. This is useful for binaries, archives, documentation, or any other files that don’t fit into a specific package format.

Overview

Generic artifacts support:
  • Any file type (executables, archives, documents, etc.)
  • Glob pattern uploads for multiple files
  • Custom file paths within packages
  • Version management
  • Metadata tagging

Pushing generic artifacts

Use the hc artifact push generic command to upload files:
hc artifact push generic <registry-name> <file-path> \
  --name <artifact-name> \
  --version <version> \
  --pkg-url <pkg-url>

Required flags

--name
string
required
Name for the artifact package
--pkg-url
string
required
Base URL for the package service (e.g., https://app.harness.io/registry/pkg)

Optional flags

--version
string
Version for the artifact. Defaults to 1.0.0
--filename
string
Name of the file being uploaded. Defaults to the actual filename
--path
string
File path within the package. Defaults to the filename
--description
string
Description of the artifact

Examples

# Upload a binary
hc artifact push generic my-registry ./myapp \
  --name myapp \
  --version 1.0.0 \
  --pkg-url https://app.harness.io/registry/pkg

Pulling generic artifacts

Download generic artifacts using the pull command:
hc artifact pull generic <registry-name> <package-path> <destination> \
  --pkg-url <pkg-url>

Example

hc artifact pull generic my-registry myapp/1.0.0/myapp ./downloads/ \
  --pkg-url https://app.harness.io/registry/pkg

Use cases

Store compiled binaries, executables, or native libraries for different platforms.
hc artifact push generic builds ./myapp-linux-amd64 \
  --name myapp \
  --version 1.0.0 \
  --path linux/amd64/myapp
Store documentation bundles, PDFs, or help files.
hc artifact push generic docs ./docs.zip \
  --name project-docs \
  --version 1.0.0
Store configuration templates or environment-specific configs.
hc artifact push generic configs ./prod-config.yaml \
  --name app-config \
  --version 1.0.0 \
  --path environments/production/config.yaml
Store trained machine learning models.
hc artifact push generic models ./model.pkl \
  --name sentiment-model \
  --version 2.0.0

Best practices

  • Use semantic versioning for your artifacts
  • Include descriptive metadata for better organization
  • Use consistent naming conventions across packages
  • Leverage glob patterns for batch uploads
  • Document the purpose and usage in the description field

See also

Build docs developers (and LLMs) love