问题描述
我目前正在从TFS 2012迁移到Azure DevOps 2019(均在内部部署).在旧服务器上,我将根据一些构建手动创建NuGet程序包,并将这些 .nupkg
文件托管在文件共享中(在Visual Studio中配置为程序包源).借助DevOps,我显然可以自动化所有这些操作,并将软件包直接推送到工件提要中.
I'm currently migrating from TFS 2012 to Azure DevOps 2019 (both on-premise). 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). With DevOps, I can obviously automate all of this and push the packages straight into an artifact feed.
旧服务器需要停用,因此我想将现有的.nupkg文件从文件共享中移出到新的工件提要中.这可能吗?
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. Is this possible?
推荐答案
是的,您可以将现有的 .npukg
文件推送到新的供稿中.
Yes, you can push existing .npukg
files to the new feed.
您可以创建一个简单的PowerShell脚本,将所有 .nupkg
文件推送到供稿:
You can create a simple PowerShell script that pushes to the feed all your .nupkg
files:
# 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
})
这篇关于我可以将现有的NuGet程序包上传到Azure DevOps工件提要吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!