[英]Can I upload existing NuGet packages to an Azure DevOps artifacts feed?
I'm currently migrating from TFS 2012 to Azure DevOps 2019 (both on-premise).我目前正在从 TFS 2012 迁移到 Azure DevOps 2019(均为内部部署)。 With the old server, I would manually create NuGet packages from some of our builds, and host these
.nupkg
files on a file share (configured as a package source in Visual Studio).使用旧服务器,我会从我们的一些构建中手动创建 NuGet 包,并将这些
.nupkg
文件托管在文件共享上(在 Visual Studio 中配置为包源)。 With DevOps, I can obviously automate all of this and push the packages straight into an artifact feed.使用 DevOps,我显然可以自动化所有这些并将包直接推送到工件提要中。
The old server needs to be decommissioned, so I would like to move the existing .nupkg files out of the file share into the new artifacts feed.旧服务器需要退役,所以我想将现有的 .nupkg 文件从文件共享中移到新的工件提要中。 Is this possible?
这可能吗?
Yes, you can push existing .npukg
files to the new feed.是的,您可以将现有的
.npukg
文件推.npukg
新提要。
You can create a simple PowerShell script that pushes to the feed all your .nupkg
files:您可以创建一个简单的 PowerShell 脚本,将您的所有
.nupkg
文件推送到提要:
# If you didn't add the new feed to your NuGet sources so add it:
nuget sources Add -Name "NEW-FEED" -Source "https://pkgs.dev.azure.com/org/_packaging/NEW-FEED/nuget/v3/index.json"
# Put all the nugets in one folder and move to this folder
cd path/to/nupkg/folder
$files = dir
$files.ForEach({
push -Source "NEW-FEED" -ApiKey AzureDevOps $_.Name
})
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.