Azure-pipelines-tasks: Nuget push: should return error, instead of "[warning]No packages matched the search pattern."

Created on 28 Sep 2018  路  4Comments  路  Source: microsoft/azure-pipelines-tasks

Environment

  • Server - Azure Pipelines
  • Agent - Hosted VS 2017
  • vNext task: Nuget v2.*

Observed

When 'command = PUSH' and no packages are found that match pattern supplied in task param 'Path to NuGet package(s) to publish', task currently reports warning:

2018-09-28T19:20:09.3740622Z ##[warning]No packages matched the search pattern.
2018-09-28T19:20:09.3751205Z ##[debug]Processed: ##vso[task.issue type=warning;]No packages matched the search pattern.

Expected behavior

When 'command = PUSH' and no packages are found: task should return error and fail, instead of reporting warning.

IMO: when 'command = PUSH', the sole purpose of this step is to publish at least one package. If it can't publish at least one package (even if due to user supplying incorrect match pattern), then task should fail.

Reasons why this fix/feature would be valuable

  • Common failure (user supplying incorrect path or pattern) goes undetected, since task execution reports "pass" instead of "fail".
  • Improved perception of robustness and reliability of this vNext task. I was taken by surprise when this step "passed", without pushing any packages to our nuget feed.
ArtifactsPackages bug

Most helpful comment

One year on, this issue still exists.

All 4 comments

Hello! I'm a PM over on the Azure Artifacts team. I wanted to drop in here and address some of these issues with the news that we're currently reevaluating the types of tasks we offer in Azure Pipelines, and looking to focus more on lighter-weight tasks that cover authentication and setup. In lieu of the task redesign, we're going to forego making changes to the current tasks (with a few exceptions). We hope the new tasks we spin up in the next quarter or so are easier and more helpful, be on the lookout!

One year on, this issue still exists.

+1... I was shocked to see that instructing the pipeline to publish a package that doesn't exist or couldn't be found isn't an error. It should at least provide an _option_ to specify the severity of that event.

Whats the status on this? I just stumbled upon this issue and it seems to be quit old. Is there a more recommended way to publish NuGet Artifacts these days?

Was this page helpful?
0 / 5 - 0 ratings