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:
- Connect both artifact servers to Harness (either through IAM or through our Artifact Server connections)
- Create an Application in Harness
- Create a Harness Service
- Add the appropriate configurations in the Harness Service
- 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)
- Repeat the previous step, but make the appropriate changes
- Create two Environments and Service Infrastructures/Definitions
- Create the appropriate Workflow type and associate the Harness Service to the Workflow
- 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.
- (Bonus) Templatize the Workflow to allow any Environment, Service, and Infrastructure.
- (Bonus) Create a Trigger that allows you to deploy as needed
- Sit back, relax, and deploy!
Hopefully this helps!