理想情况下,我想使用构建变量(在VSTS上)配置我们的Azure Web App应用程序设置,例如:
我们使用Powershell脚本执行发布任务.要设置应用程序设置,可以使用以下脚本:
param($websiteName, $appSettings)
Set-AzureWebsite -Name $websiteName -AppSettings $appSettings
Run Code Online (Sandbox Code Playgroud)
我可以手动将这些构建变量传递给Powershell脚本构建任务,如下所示:
PrepareAppSettings.ps1 -websiteName "MyWebApp" -appsettings @{"MyConnectionString" = $(MyConnectionString);"MyRandomService" = $(MyRandomService);"MyRandomServiceClient"=$(MyRandomServiceClient);"MyRandomServicePassword"=$(MyRandomServicePassword)}
Run Code Online (Sandbox Code Playgroud)
有没有办法将所有构建变量传递给脚本而不必在哈希表中显式指定每个变量?
我想在TFS中创建一个工作项查询的平面列表,其中结果包含所有指定的PBI和Bug案例以及任何没有父项的任务案例.
这是没有父母部分的任务让我感到困惑.我无法看到一种方式,我可以做一些看起来很明显的东西,如(父链接计数= 0),因为该属性不会暴露给我,奇怪的是,其他一些链接类型计数.
有任何想法吗?
我在Package Release hub(VSTS)中创建了一个新的feed,安装了凭据,然后添加了包源.
现在,我使用Visual Studio 2015将Micrososft.Aspnet.mvc安装到项目中,但是它会出现以下错误:
Exception 'System.AggregateException' thrown when trying to add source
'https://mysite.pkgs.visualstudio.com/DefaultCollection/_packaging/MyLogUtils/nuget/v3/index.json'.
Please verify all your online package sources are available.
Run Code Online (Sandbox Code Playgroud)
我需要正常安装NuGet包,所以我从VSTS中删除了Feed.但问题仍然存在.如何解决这个问题?
visual-studio nuget nuget-package azure-devops azure-artifacts
有没有办法在Visual Studio 2015中获取文件的特定版本(来自特定提交) - 团队资源管理器/团队服务Git?
我只是希望使用以前版本的文件来运行解决方案,只是为了查看过去的运行情况,然后回到最新版本继续开发.
我没有创建任何分支.我一直在"主"分支.
我只想明确允许开发人员合并到"主"分支.我找到了安全设置的位置,但似乎没有任何东西可以让我说'那个分支,只允许Rob合并到它'.有什么具体指导吗?
PreInfo:我有.net核心web api(vs2015)与普通项目混合.
我现在花了差不多2天的时间才开始工作,搜索并尝试了我能想到的一切,但我只是想让我的生活得到TFS在线的构建和发布才能一起玩.
构建(发布工件步骤)说" 目录'D:\ a\1\a'是空的.没有任何东西可以添加到构建工件'drop'. "
但"跑点网"一步说
"发布到D:\ a\1\s\Operator\MobileService\root\MobileService\src\AMP.Operator.MobileService\bin\release \net452\win7-x64\publish"
...所以它必须在某个地方,释放可以拿起它,但无论我尝试什么,我都无法得到它.
和$(System.DefaultWorkingDirectory)/ MobileService-Dev的现实请注意,我已经尝试了构建中的$(build.artifactstagingdirectory)的每个组合,但没有运气但是我确定这应该指向构建的发布文件夹
我希望有人能指出我的解决方案.我真的不明白这项工作有多难.
我想弄清楚如何在我的脚本中跨 ADO 管道共享自定义变量。以下是我的脚本,分为 2 个阶段。
我将 设置curProjVersion
为输出变量并尝试从不同的阶段访问它。我做得对吗?
stages:
- stage: Build
displayName: Build stage
jobs:
- job: VersionCheck
pool:
vmImage: 'ubuntu-latest'
displayName: Version Check
continueOnError: false
steps:
- script: |
echo "##vso[task.setvariable variable=curProjVersion;isOutput=true]1.4.5"
name: setCurProjVersion
displayName: "Collect Application Version ID"
- stage: Deploy
displayName: Deploy stage
dependsOn: Build
variables:
curProjVersion1: $[ dependencies.Build.VersionCheck.outputs['setCurProjVersion.curProjVersion'] ]
jobs:
- job:
steps:
- script: |
echo $(curProjVersion1)
Run Code Online (Sandbox Code Playgroud) 我有几个 CI 管道,我在 Azure DevOps 中使用它们来构建一些 Xamarin 应用程序,我想创建一个新的管道来合并两个现有管道的功能。有没有办法复制或克隆现有管道,以便我可以在不影响现有管道的情况下对新管道进行更改?
我看到我可以将管道导出到 JSON 文件,然后将其重新导入。 JSON 文件中的所有 id 值都是 GUID。导入过程会创建新的 GUID,还是会导入 JSON 文件覆盖现有管道。
我的Team Foundation Service构建遇到了一个奇怪的问题.我把它排队并且它开始很好,但随后它失败并出现以下错误:
C:\a\src\Platform\Prod\Platform.Web\Platform.Web.csproj (436): The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568.
Run Code Online (Sandbox Code Playgroud)
然后我按照消息/ URL对构建重新排队,然后......再次发生.我用Google搜索过,但我似乎无法弄清问题是什么.我可以在Visual Studio中构建得很好,并且该解决方案已配置为包还原.有什么想法吗?
提前致谢.
我收到一个错误:
User XXX lacks permission to complete this action. You need to have 'AddPackage'
Run Code Online (Sandbox Code Playgroud)
尝试将 nuget 包推送到 Azure DevOps 工件时。我是管理员 这是阶段:
- stage:
displayName: 'Release'
condition: succeeded()
jobs:
- job: 'Publish'
displayName: 'Publish nuGet Package'
steps:
- download: current
artifact: $(PIPELINE_ARTIFACT_NAME)
displayName: 'Download pipeline artifact'
- script: ls $(PATH_PIPELINE_ARTIFACT_NAME)
displayName: 'Display contents of downloaded articacts path'
- task: NuGetAuthenticate@0
displayName: 'Authenticate in NuGet feed'
- script: dotnet nuget push $(PATH_PIPELINE_ARTIFACT_NAME)/**/*.nupkg --source $(NUGET_FEED) --api-key $(NUGET_API_KEY)
displayName: 'Uploads nuGet packages'
Run Code Online (Sandbox Code Playgroud)
和确切的错误:
error: …
Run Code Online (Sandbox Code Playgroud) azure-devops ×10
tfs ×4
nuget ×3
git ×2
.net-core ×1
azure ×1
msbuild ×1
powershell ×1
tfs-workitem ×1
tfs2013 ×1