Two Artifacts, One Service

Hi all!

I was recently faced with an interesting situation, where a user wanted the ability to use two different artifact sources in the same Harness Service. Their use case was that they had a pre-prod artifact server and a production artifact server, but it was essentially the same artifact.

If you find yourself in the same scenario, follow these steps in Harness:

  1. Connect both artifact servers to Harness (either through IAM or through our Artifact Server connections)
  2. Create an Application in Harness
  3. Create a Harness Service
  4. Add the appropriate configurations in the Harness Service
  5. Add a new Artifact Source in the Service and then connect it to the correct Address Server and artifact (make sure to make this appropriately)
    image
  6. Repeat the previous step, but make the appropriate changes

  7. Create two Environments and Service Infrastructures/Definitions



  8. Create the appropriate Workflow type and associate the Harness Service to the Workflow
  9. Clicking Deploy will now give you two sub-options correlating to the different Artifact Sources you setup in steps 5 & 6. You can select the appropriate Source and Artifact Version for the deployment.
  10. (Bonus) Templatize the Workflow to allow any Environment, Service, and Infrastructure.
  11. (Bonus) Create a Trigger that allows you to deploy as needed
  12. Sit back, relax, and deploy!

Hopefully this helps!

Please Like/Comment/Share!