I have a repo where is several libraries (csproj projects) which are published into a private NuGet feed hosted by Azure DevOps. They are consumed by other project in my company.
Current state
A push pipeline for each library which pushes NuGet into the private feed. These pipelines are triggered by
trigger:
branches:
include:
- master
paths:
include:
- MyCompany.Product.PackageName/*
During PR, another simple build pipeline that checks the build of the new package version. The PR can't be merged if this build pipeline fails. The new package version gets pushed into the feed when PR is merged into master.
The problem is that no version check in the build pipeline. During the PR, the developer doesn't have any information if the push pipeline would be successful or not.
I would like to do an automatic check if the package can be pushed into the private feed.
Desired state
When some developer opens a new PR, the build pipeline tells him/her that the package can't be pushed into the feed because (s)he forgot to update a package version.
My idea was create a project-specific build pipeline and employ PowerShell for some magic version check which fails if there is a duplicate in the feed.
What would be a proper strategy for this task? Does anybody applied some successful solution for this? Some pipeline examples would appreciated.
