How to integrate Harness CD with Cloudsmith
Harness is a self-service Continous Delivery platform that allows engineers and DevOps to build, test, deploy, and verify software, on-demand.
- Harness.io: Harness Website
- Harness Docs: Official Harness Documentation
Harness also provides Continuous Integration through Drone CI
Adding authentication to Harness CD
To authenticate to a private Cloudsmith repository, you first need to add either your Cloudsmith API Key or a Cloudsmith Entitlement Token in Harness as an encrypted secret in a Secrets Manager.
Harness includes a built-in Secrets Manager (Harness Vault) and also supports many third-party Secrets Managers. Please refer to the Harness documentation for details of how to configure your chosen Secrets Manager.
Cloudsmith API Key
You can obtain your Cloudsmith API Key from using the Cloudsmith CLI or via the API Settings page when logged in to the Cloudsmith Website.
Cloudsmith Entitlement Token
Please see the Entitlements documentation for details of how to create and retrieve Entitlement Tokens via the Cloudsmith CLI or the Cloudsmith Website.
Deploying a Docker Image with Harness CD
Add a Cloudsmith Repository as a Harness Artifact Server
Cloudsmith Repositories are added to Harness as an Artifact Server. At a minimum you need to provide the following information to configure an Artifact Server:
|Type||The type of Artifact Server, select "Docker Registry".|
|Display Name||A name for the Artifact Server within Harness. You can use any name that you wish here.|
|Docker Registry URL||The URL for your Cloudsmith Repository. Enter https://docker.cloudsmith.io/v2/ or your own docker Custom Domain (if enabled in your Cloudsmith Account)|
|Username||The Cloudsmith Username, or an Entitlement Token name that you wish to authenticate with Please see the Cloudsmith Docker Registry documentation for details of authentication methods.|
|Select Encrypted Password||The Encrypted Secret that you wish to use for Authentication. Please see the Harness documentation for further information on Encrypted Secrets.|
Declaring a Docker Image to be deployed
A Harness Service is where you specify the artifact that you want to deploy.
Add the following to specify a Docker image :
|Display Name||A name within Harness for the artifact.|
|Source Server||The "Display Name" specified when configuring the Artifact Server.|
|Docker Image Name||The name of the Docker image.|
In the format OWNER/REPOSITORY/IMAGE-NAME, where OWNER is your Cloudsmith Organization / Account name, REPOSITORY is your Cloudsmith Repository identifier, and IMAGE-NAME your the Docker image name in the repository.
Updated about 1 year ago