Azure CI/CD for multiple solutions in same project - c#

I'm trying to implement CI/CD using Azure Devops... there are multiple projects in the same solution(local machine)eg: several web projects,angular project with .net core etc
Should i create separate projects in Azure or push them all under a single project by creating a repo in the root directory;i will need to define the build and release pipelines for CI/CD
please advice

Related

Centralize Laravel Models and Migrations to be consumed by multiple Laravel API projects

I am wondering if it is possible to create a centralized model/migration in Laravel to be consumed by other Laravel API projects.
For instance in C#, you can create a library that handles the data models and migration which can be reference to multiple API Core projects. By doing this, once I updated the library, all the project referenced to it will be updated. If I'm not mistaken, it does work because the .dll contains all the models just like creating models for each C# API project if you don't have the .dlls.
What do I want and Why?
I am planning to create multiple Laravel API project to implement CQRS and create a separate notification service. All this projects will have the same model and migrations.
Is there any similar solutions to centralized or ease the handling of all the data model and migrations in Laravel?
Thank you in advance!
You could build out the models and migrations in a composer package as described at https://laravel.com/docs/master/packages. Having access to them would then we as simple as adding them to the project.
https://getcomposer.org/doc/articles/handling-private-packages.md has some information on using vcs to add private repos to projects via composer.

Solution repo structure -VS Azure functions

Im developing 3 Azure Functions called EmployeeAPI, StudentAPI, ProjectsAPI all of which is accessing the same SQL database. I was instructed to make sure that each of projects are deployed separately independent of each other (separate code repository for each).
My problem is there are some common projects that are shared between the 3 and its a pain maintaining all 3 of them. If I changed 1 item let's say a database column, I need to update it on other projects as well.
Is there a way that the common project will reside in 1 repository and the changes will reflect on the 3 projects? Some advised me to create a Nuget package or reference the project.
This is the solution structure of each project (simplified)
EmployeeAPI
ApplicationLayer (shared)
DomainLayer (shared)
InfraLayer (shared)
Tests (shared)
StudentAPI
ApplicationLayer (shared)
DomainLayer (shared)
InfraLayer (shared)
Tests (shared)
ProjectsAPI
ApplicationLayer (shared)
DomainLayer (shared)
InfraLayer (shared)
Tests (shared)
I hope I explained it well :-D
Actually moving shared project to nuget package is the best what you can do if you want to keep API projects in separate repositories. Here you have docs showing you how to push nuget packages to feed.
You can also move all your shared project to 4th repo and the use them as submodule on your API projects. Here you have details about using submodules in Azure DevOps.
Assuming you are using Azure DevOps for CI/CD then you can use path filters like here to include/exclude and have all the functions and shared projects in one repository. Maybe you can achieve similar functionality using other CI/CD tools.

ASP.NET Core app CI using VS code and CLI

I am using bitbucket private repos as project dependencies with .net core tooling for deploying a asp.net core web api.
I have generated this project using the .net core CLI tools outside Visual Studio 2015/2017 on a Mac system using similar steps as documented in msdn
How do I include the bitbucket private repos as project dependencies for this project and then use the bitbucket CI pipelines product for deploying to azure?
I followed a recent msdn article on CI using asp.net core, but doesn't talk about how to include private or non-globally available nuget dependencies
One way I thought of was by making the private repos as git submodules, but landed up with issues mentioned here and here
You need to create and host your own Nuget feed, put your private nuget packages there and update nuget configuration for project to use that feed during package restore. You may read about available options in Hosting packages section in nuget documention:
Local feed: Packages are simply placed on a suitable network file share, ideally using nuget init and nuget add to create a hierarchical folder structure (NuGet 3.3+)
NuGet.Server: Packages are made available through a local server through HTTP
NuGet Gallery: Packages are hosted on an Internet server using the NuGet Gallery Project on GitHub. NuGet Gallery provides user management and additional features such as an extensive web UI that allows searching and exploring packages from within the browser, similar to nuget.org.

ASP.NET Core webapp Azure deployment with reference to class library project

I have an ASP.NET Core web app targeting net452 that I've been deploying to Azure from bitbucket.
I pulled all of my Azure Storage code out into a separate Class Library project in the solution -- 4.5.2 full framework -- because I want to share it with a WebJob.
This dll project is referenced by the Core webapp and works fine locally. But now the Azure deployment fails because it can't find the nuget dependencies of the dll project. Specifically, those dependencies are Newtonsoft.Json 8.0.3 and some of the Azure packages.
How can I resolve these dependencies on Azure?
You can try restoring all nuget packages. That action will remove all dll's of the existing packages and add them again.
nuget restore YourSolution.sln
The webjob project was in the same solution and bitbucket repo (the repo that was used for deployment) as the ASP.NET Core app. Azure was choking on the webjob packages.config. There was nothing wrong with the ASP.NET app. But Azure aborted because of the other project's error.

Suggested setup for OS project with several NuGet packages

I decided to share a small project I have been working on for a while. It's basically a development framework for distributed applications.
Now I'm setting up the GitHub repository and I wanted to use AppVeyor for continuous integration and I'm struggling with the setup.
As for now, my framework is composed of few packages
Interfaces: defines the basic interfaces, extracted as a package so that you don't need to bring the whole framework in your business logic library
Core: contains the basic components of the framework
CastleWindsor: contains support for the Castle IoC container
RabbitMQ: contains the implementation of the engine based on RabbitMQ
Now, it's pretty easy to setup AppVeyor to build and push into Nuget a single project/package.
But what I'm looking is:
build everything on push (includes testing)
create packages and publish them only on a specific action.
I'm wondering if I should create multiple repositories (one for each package) on GitHub and have multiple projects on AppVeyor as well. Or maybe a single repository with multiple projects.
Thanks for your insights.

Categories

Resources