JFrog Artifactory

Upload resources into JFrog Artifactory helm, maven, npm and generic repositories during transfer, with credentials and overwrite rules.

The artifactory.uploader.transfer.config.ocm.software/v1alpha1 uploader uploads the resources it matches into one Artifactory repository during transfer. Each repository type has its own page below with a complete configuration.

Repository types

Package typeGuidePublished access
helmUpload Helm ChartsHelm/v1
mavenUpload Maven ArtifactsWget/v1
npmUpload npm PackagesWget/v1
genericUpload Generic FilesWget/v1

At upload time the uploader reads the package type from the server with GET <url>/artifactory/api/repositories/<repository>.

Unsupported repositories

RepositoryErrorAlternative
dockerhas package type "docker"; supported: helm, generic, maven, npmTransfer images to the OCI registry host of the repository
Remote or virtual repositoryuploads need a local repositoryUpload into the local repository behind it

Prerequisites

  • OCM CLI installed
  • A component version in a CTF or OCI repository
  • An Artifactory local (or federated) repository
  • A user that may deploy into the repository and read its configuration

Configure credentials

The uploader resolves credentials for the HelmChartRepository identity of <url>/artifactory/api/helm/<repository>, falling back to the Wget identity of <url>/artifactory/<repository>. A Wget consumer without a path covers every repository on the server:

type: generic.config.ocm.software/v1
configurations:
  - type: credentials.config.ocm.software
    consumers:
      - identity:
          type: Wget
          hostname: myorg.jfrog.io
          scheme: https
        credentials:
          - type: WgetCredentials/v1
            identityToken: <ARTIFACTORY_IDENTITY_TOKEN>

hostname is the bare host name. A value such as https://myorg.jfrog.io matches no request, so the upload is sent without credentials and fails with 401.

Existing files at the upload path

When a file is already stored at the upload path, the uploader decides by its content and owner properties:

  • Same content: the stored file is reused.
  • Owner properties name the same resource of the same component version: the file is replaced. This is a repeated transfer.
  • Anything else: the transfer fails and asks for a different path.

The property names are listed in the reference.

Troubleshooting

Symptom: failed detecting the type of … repository …: GET … returned status 401

Cause: No credentials were found for the server, so the uploader asked anonymously.

Fix: Configure credentials as shown above, with the bare host name in hostname.

Symptom: failed detecting the type of … repository …: GET … returned status 403

Cause: The user may deploy but not read the repository settings.

Fix: Grant read access to the repository configuration, or use a user that has it.

Symptom: … already stores a file that was not uploaded for this resource …; refusing to overwrite it, configure a different path

Cause: Artifactory stores a file at the upload path that belongs to another resource, component version or was not uploaded by OCM.

Fix: Configure a path that is unique for the resource, or remove the stored file.