'Replace entire appsettings.json before build and deploy in azure pipeline
Scenario I have two repos with similar API-code funtionality but for two different type of objects.
Sence the functionality is similar, then i have focused on developing one of them and the thought is to reuse it for both APIs for these both object types.
now i have Repo 1 for objectType 1 with it's own appSettings.JSON for just its object type Repo 2 for objectType 2 with it's own appSettings.JSON for just its object type
Now i want to create a pipeline to build, and publish the API to the cloud without needing to write the code twice, once for objectType 1 and once for objecttype 2
Question: can i create an azure pipeline for Build and deploy as:
Pipeline from Repo 1: Check out the source code from Repo 2 (which has the latest code) and use appsettings.JSON from self repo (Repo 1)
Solution 1:[1]
That's feasible if you use the YAML pipeline schema.
As you can read here, you can check out multiple repositories.
If you have multiple checkouts steps, please only pay attention to the paths where they will be stored as the agent will create subfolders.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Alberto Maghini |
