-1

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)

B.j
  • 47
  • 1
  • 9
  • Please take a look at Alberto Maghini's answer to see if it is helpful to you. If you think it is a solution, please mark it as a correct answer. Others who meet the same question will appreciate you much. –  Mar 29 '22 at 05:59

1 Answers1

0

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.