使用托管 VS2017 代理成功构建后,我尝试使用本地托管代理部署本地托管代理,该代理是使用域帐户设置的,该帐户应具有足够的权限,因为它在本地管理组中。当我在别处挖掘这个问题时,一位用户使用重新安装了他们的代理NTATHORITY\SYSTEM并且它起作用了。
我真的不需要创建或停止\启动网站,只需部署最近的构建工件。
我应该检查哪些权限或应该使用其他任务?
019-04-06T21:03:10.3898646Z 错误(消息:配置错误 2019-04-06T21:03:10.3899503Z
2019-04-06T21:03:10.3899791Z 文件名:redirection.config 2019-04-06T21:03:10.3900026Z 2019-04-06T21:03:10.3900293Z 2019-04-04-03Z 行号:1000293Z 行号:0309:03 -04-06T21:03:10.3900852Z 说明:由于权限不足,无法读取配置文件 2019-04-06T21:03:10.3901076Z 2019-04-06T21:03:10.3901333Z。) 2019-04-06T21:03:10.8135484Z ##[错误]进程“appcmd.exe”以代码“5”退出。
我已经尝试了数百次,但仍然无法找到 VSTest 任务中生成的 codeCoverage 文件。
请参阅以下代码。
我只想将代码覆盖率报告发布到管道。
请帮助!
代码覆盖率文件在哪里?
或者,如果您不想浪费时间写一些答案,请给我一些链接。
非常感谢!
# ASP.NET
# Build and test ASP.NET projects.
# Add steps that publish symbols, save build artifacts, deploy, and more:
# https://learn.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4
trigger:
- master
jobs:
- job: devbuild
pool:
name: 'Self Hosted VS2017'
variables:
solution: '**/*.sln'
steps:
- task: NuGetToolInstaller@0
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: VSBuild@1
inputs:
solution: '$(solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:Configuration=Debug /p:Platform="Any CPU" /p:OutDir=".\output\dev"'
clean: true
- task: VisualStudioTestPlatformInstaller@1
inputs:
packageFeedSelector: 'nugetOrg' …Run Code Online (Sandbox Code Playgroud) 我正在尝试将 Azure DevOps 设置为 在消息不以给定文本开头时跳过多阶段管道上的一个阶段。
从示例文档来看,我认为这只是
- stage: t1
condition: not(startsWith(variables['Build.SourceVersionMessage'], '[maven-release-plugin]'))
jobs:
- job: ReleasePrepare
displayName: Prepare release
pool:
vmImage: 'ubuntu-16.04'
steps:
- script: |
env | sort
Run Code Online (Sandbox Code Playgroud)
然而,无论如何,这都会被执行。t1这是我希望任务不会根据提交消息运行的示例https://dev.azure.com/trajano/experiments/_build/results?buildId=110&view=results
的输出env表明消息已正确传入
以防万一这是一个错误,我也在这里报告了https://developercommunity.visualstudio.com/content/problem/697290/startswith-buildsourceversionmessage-variable-not.html
我正在尝试在 Azure DevOps Release Pipeline 上运行迁移。因为我想在每个版本上自动运行我的数据库脚本。我的发布管道没有源代码,我只是编译了 DLL。
当我在本地机器上执行此命令时,它运行成功。如何转换此命令以便我可以将它与 DLL 一起使用。
dotnet ef database update --project MyEntityFrameworkProject --context MyDbContext --startup-project MyStartupProject
entity-framework azure-devops azure-pipelines azure-pipelines-release-pipeline entity-framework-migrations
我有以下错误:
\n\nerror : Unable to load the service index for source https://privateLibrary.com/private/_packaging/privateOrganitation/nuget/v3/index.json. [/home/vsts/work/1/s/Local.Proyect.Core/Local.Proyect.Core.csproj]\n /usr/share/dotnet/sdk/3.0.101/NuGet.targets(123,5): \nerror : Response status code does not indicate success: 401 (Unauthorized). [/home/vsts/work/1/s/Local.Proyect.Core/Local.Proyect.Core.csproj]\nRun Code Online (Sandbox Code Playgroud)\n\n我的 azure-pipeline.yml:
\n\nvariables:\n buildConfiguration: \'Release\'\n localProyectName: \'Local.Proyect.Core\'\n localProyectCoreDirectory: \'./Local.Proyect.Core\'\n\n\ntrigger:\n branches:\n include:\n - master\n\nsteps:\n- task: UseDotNet@2\n inputs:\n packageType: \'sdk\'\n- task: DotNetCoreCLI@2\n displayName: \'dotnet restore\'\n inputs:\n command: restore\n projects: \'**/$(localProyectName).csproj\'\n feedsToUse: config\n nugetConfigPath: $(localProyectCoreDirectory)/NuGet.Config\n arguments: --force\n\n- task: DotNetCoreCLI@2\n displayName: \'Build All\'\n inputs:\n projects: \'**/$(localProyectName).csproj\'\n arguments: \'--no-restore --configuration $(buildConfiguration)\'\n\n- script: dotnet publish --configuration $(buildConfiguration) …Run Code Online (Sandbox Code Playgroud) 我正在研究 Azure DevOps YAML 管道,我不确定我们是否可以在整个管道中使用单个代理。我有多个作业/阶段 - 构建、部署、部署后,并且希望将其分配给单个代理,因为它消耗相同的工件。有没有办法通过管道分配单个代理。
提前致谢。
我一直在研究 Azure DevOps,但我对一些事情感到困惑:微软似乎强烈建议使用 YAML 管道而不是经典管道;很公平,但他们需要替换 classi\xe2\x80\x8bc 管道中的所有功能。我如何用 YAML 管道替换“发布管道”功能?
\n例如,使用经典的发布管道,我可以设置一个管道来部署到具有手动触发器的生产(请参阅“由用户手动”):
\n\n与此等效的 YAML 管道是什么?我显然不想要自动部署到生产的触发器 - 我总是希望严格手动启动该部署 - 但帮助文章似乎没有提供任何 YAML 替代方案。
\n我正在尝试将管道设置为仅签出与项目相关的特定文件夹,以便减少签出时间。
我正在使用在许多其他问题上找到的以下代码,但我似乎无法让它工作。
- script: |
cd $(Build.SourcesDirectory)
git init
git remote set-url origin $(Build.Repository.Uri)
git config core.sparsecheckout true
echo STARS/Source/ >> .git/info/sparse-checkout
git pull origin $(Build.SourceBranch)
displayName: 'Project Specific Checkout'
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
Run Code Online (Sandbox Code Playgroud)
我不断在日志中收到以下错误:
Reinitialized existing Git repository in C:/Agent001/_work/20/s/.git/
fatal: Cannot prompt because terminal prompts have been disabled.
fatal: could not read Password for 'https://organization@dev.azure.com/...': terminal prompts disabled
Run Code Online (Sandbox Code Playgroud)
我似乎无法弄清楚如何启用终端提示。
更新:
根据@Repcak 评论,我更新了代码,但仍然收到错误terminal prompts have been disabled。
当触发下面的管道时,在Build 和 push之后不会运行Dev阶段。
该管道由以开发为目标分支的 PR 触发。
管道.yaml
trigger:
branches:
include:
- master
- develop
pr:
branches:
include:
- develop
stages:
# Frontend tests: Triggered by opening new PRs to develop or updating pr to develop.
- stage: FrontEndTests
displayName: "Frontend tests"
condition: eq( variables['Build.Reason'], 'PullRequest') # Trigger stage only for PullRequests
jobs:
- template: /templates/pipelines/npm-unit-tests.yml@templates
parameters:
triggerType: ${{ variables.triggerType }}
# Common build triggered by push to master or develop
- stage: BuildPush
displayName: "Build …Run Code Online (Sandbox Code Playgroud) 如果我们正在部署一个基本的WebApp / WebApi,那么 Microsoft 的这两个任务似乎执行相同的操作 - 部署到应用程序服务。
如何选择在新的 YAML 发布管道中使用哪一个?我只是想确保我使用的是最面向未来的版本 - 我有 25 个发布管道,除非有必要,否则不想重新执行它们。
帮助的编写方式很难通过比较功能来发现关键的“必备功能”。一些 Microsoft 在线示例同时使用这两种方法。两者在自述文件中仍被标记为“正在开发”,并且自上次签入以来均已使用超过 1 年。
azure-pipelines ×10
azure-devops ×7
azure ×4
yaml ×2
asp.net-core ×1
asp.net-mvc ×1
azure-pipelines-release-pipeline ×1
cmd ×1
deployment ×1
docker ×1
entity-framework-migrations ×1
git ×1
iis ×1
security ×1
tfs ×1
vstest ×1