And*_*ens 6 nuget azure-devops azure-artifacts azure-devops-server-2019
我目前正在从 TFS 2012 迁移到 Azure DevOps 2019(均为内部部署)。使用旧服务器,我将从我们的一些构建中手动创建 NuGet 包,并将这些.nupkg文件托管在文件共享上(在 Visual Studio 中配置为包源)。使用 DevOps,我显然可以自动化所有这些并将包直接推送到工件提要中。
旧服务器需要退役,所以我想将现有的 .nupkg 文件从文件共享中移到新的工件提要中。这可能吗?
是的,您可以将现有.npukg文件推送到新源。
您可以创建一个简单的 PowerShell 脚本,将所有文件推送到 feed .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
})
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3113 次 |
| 最近记录: |