Add Artifact Servers

In this article:

To connect to an artifact server, do the following:

  1. Click Setup.
  2. Click Connectors.
  3. Click Artifact Servers.
  4. In Type, click the artifact source you want to use.
  5. In URL, enter the URL of the artifact server. Consult the provider's documentation to determine what URL and URL format to use.
  6. In Authentication Mechanism, click UserName/Password or Token (if available), and provide the credentials.
  7. In Display Name, provide a name for the Artifact Server. This is the name you will use to identify this connection when adding an Artifact Source to a Harness Service.

    If you want to restrict the use of an artifact source to specific applications and environments, do the following:
  8. In Usage Scope, click the drop-down under Applications, and click the name of the application.
  9. In Environments, click the name of the environment.
  10. Click Submit.
A useful resource for repositories and their features is available at Binary Repository Manager Feature Matrix.

AWS S3 and Google Cloud Storage

Amazon AWS and Google Cloud Platform are added to Harness as Cloud Providers, but they may also be used as Artifact Servers. You simply add them as Cloud Providers, and then when you are adding an artifact in a Harness service, the AWS S3 and Google Cloud Storage options will be available.

Here is what the Artifact Server list looks like in a Harness service when AWS S3 and Google Cloud Storage have been as added as Cloud Providers:

For information on how to add AWS and GCP as Cloud Providers, see Add Cloud Providers.

Jenkins

The Jenkins dialog has the following fields:

  • Jenkins URL - Enter the URL of Jenkins server.
  • Authentication Mechanism - Enter the credentials to authenticate with the server. If you select Username/Password, enter the Jenkins API token or password in the Password field. If you select Bearer Token(HTTP Header), enter the OpenShift OAuth Access Token in Bearer Token(HTTP Header). For more information, see Authentication from OpenShift.

Jenkins Permissions

  • Overall: Read.
  • Job: Build (if you plan to trigger a build as part of your workflow)

For token-based authentication, go to http://Jenkins-IP-address/jobs/me/configure to check and change your API access token. The token is added as part of the HTTP header.

See Jenkins Matrix-based security.

If you add Jenkins as an Artifact Server, it is automatically added as a Verification Provider, and is a single account. Changes made to the Jenkins Artifact Server settings, such as username or Display Name, will also apply to the Jenkins Verification Provider settings, and vice versa.

Bamboo

Build Permissions
  • View plan.
  • Build plan (if you plan to trigger a build as part of your workflow).

See Bamboo Permissions.

Docker Registry

Docker Registry Permissions

  • Read permission for all repositories.

User needs:

  • List images and tags
  • Pull images

See Docker Permissions.

Nexus

Nexus Versions

The Version field in the dialog lists the supported Nexus versions, 2.x and 3.x. For Nexus 2.x, Harness supports the repositories listed for 2.x on Sonatype's website at Supported Formats. For 3.x, Harness supports Docker 3.0 and greater.

Nexus Permissions

  • All repositories: Read.

If used as a Docker Repo, the user needs:

  • List images and tags
  • Pull images

See Nexus Managing Security.

Artifactory

In the Artifactory URL field, ensure that you enter in your base URL followed by your module name: https://mycompany.jfrog.io/module_name.

Artifactory Permissions

  • Privileged User is required to access API, whether Anonymous or a specific username (username and passwords are not mandatory).
  • Read permission to all Repositories

If used as a Docker Repo, user needs:

  • List images and tags
  • Pull images

See Managing Permissions: JFrog Artifactory User Guide.

SMB

You can share files and folders on your network and use them for an SMB Artifact Server connection.

The SMB dialog has the following fields:

  • In SMB URL - Ensure a value that contains the smb:\\ scheme followed by the hostname or IP address and folder name. For example, smb:\\23.100.87.22\share.

    If you want to specify a folder in the URL, you can enter the folder using the \myFolder format, such as smp:\\23.100.87.22\myFolder. Typically, you will specify the folder when you use the SMB Artifact Server as an Artifact Source for a Service.
  • Domain - Enter the Windows domain where the host containing the shared folder is located.
  • Username and Password - Use a user account that has permissions to access the shared folder.

When you use the SMB Artifact Server as an Artifact Source for a Service, you can specify a file or a folder for the artifact. This allows a folder to be copied to the deployment target host by the Harness Delegate. Here is the SMB Artifact Source dialog:

In Artifact Path, you can specify a file or folder by name or using regex. The following are examples for matching different files and folders:

  • todo-*zip - Delegate pulls all matching files, such todo-1.0.zip, todo-2.0.zip.
  • test/*zip - Delegate pulls all zip files under test folder.
  • test/1* --- Delegate pulls all folders under test folder starting with 1.
  • test/* --- Delegates pull all folders under test folder.

SFTP

You can share files and folders on your network and use them for an SFTP Artifact Server connection.

The SFTP dialog has the following fields:

  • In SFTP URL - Ensure that the value contains the sftp:\\ scheme followed by the hostname or IP address. For example, sftp:\\23.100.87.22. For FTP, use the ftp:\\ scheme.

    If you want to specify a folder in the URL, you can enter the folder using the \myFolder format, such as sftp:\\23.100.87.22\myFolder. Typically, you will specify the folder when you use the SFTP Artifact Server as an Artifact Source for a Service.
  • Domain - Enter the domain where the SFTP server is located.
  • Username and Password - Use a user account that has permissions to access the SFTP server.

When you use the SFTP Artifact Server as an Artifact Source for a Service, you can specify a file or a folder for the artifact. This allows a folder to be copied to the deployment target host by the Harness Delegate. Here is the SFTP Artifact Source dialog:

In Artifact Path, you can specify a file or folder by name or using regex. The following are example for different files and folders:

  • todo-*zip - Delegate pulls all matching files, such todo-1.0.zip, todo-2.0.zip.
  • test/*zip - Delegate pulls all zip files under test folder.
  • test/1* --- Delegate pulls all folders under test folder starting with 1.
  • test/* --- Delegates pull all folders under test folder.


How did we do?