Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure DevOps: 1 Solution Multiple Projects CI/CD

Tags:

I just started setting Azure DevOps with CI/CD. This might not be possible but I hope to find answers.

I have a solution with 6 projects:

  • Web Api project (references Infrastructure, Repositories, and Models projects)
  • Website project (calls the Web Api for data and references Infrastructure, Repositories, and Models projects)
  • Node.js project (only calls the Web Api for data)
  • Infrastructure project (shared by Web Api and Website)
  • Repositories project (shared by Web Api and Website)
  • Models project (shared by Web Api and Website)

Before I start searching on how to publish the Web Api, Website, and Node.js projects to their own Azure App Service within the CI/CD definitions:

Is it possible to set it up so that only certain projects are deployed? i.e.: the Node.js project is published only or only the Web Api and Website are published but not the Node.js.

Or do I need to keep things in different solutions?

If I keep them in separate solutions, how does this affect the shared projects (Infrastructure, Repo, and Models) in reference to Source Control (Git)? If I add code to the Models and Repo in the Web Api solution, do I commit these changes not he Web Api Git repo? How does this affect the other projects that reference the same Models and Repo projects? Is this where Git submodules come into play?

Update 1 (2019/3/8)

Looks like I might be able to get this working in 1 solution using Path filters (https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=azure-devops). Still interested in any further input.

like image 894
RoLYroLLs Avatar asked Mar 07 '19 16:03

RoLYroLLs


People also ask

How do I manage multiple projects on Azure DevOps?

Just create separate teams for each project. Azure DevOps will create an area path for each team. Then each team will use their own backlogs. In the default project team you can select "Include sub areas," and then you will see items for all teams (or projects).

Can Azure DevOps project have multiple repos?

Specify multiple repositories Repositories can be specified as a repository resource, or inline with the checkout step. The following repository types are supported. Only Azure Repos Git ( git ) repositories in the same organization as the pipeline are supported for multi-repo checkout in Azure DevOps Server 2020.

How many projects can you have in Azure DevOps?

Azure DevOps Services limits each organization to 1000 projects per organization, an increase over the previous limit of 300 projects.


2 Answers

Hoping this helps others:

I solved this by using Path filters on the Build definition and it works flawlessly. I have created 1 build definition per project that needs to live or be hosted somewhere (in my example, I have 3 Build definitions: Web Api, Website, Node.js).

With the proper path to the project in the Path filter only the proper Builds spin up, and any projects untouched do not trigger a build. Each build has it's own release which then deploys the specified app to it's own destination.

like image 135
RoLYroLLs Avatar answered Oct 06 '22 03:10

RoLYroLLs


Look if I understand your question well, you need to deploy specific built parts Yes you can do this in azure DevOps. In Azure DevOps you have build definition and release pipeline. In build you will build the projects and publish just 2 components which you mentioned and in release you will deploy them I hope I answered your question

like image 34
Mohamed Amr Avatar answered Oct 06 '22 04:10

Mohamed Amr