我正在尝试使用cmd
组件推送在 Azure 管道期间完成的一些更改,如下所示,
steps:
- script: |
git config user.email you@you.com
git config user.name "your name"
git diff
git add .
git commit -m "version update [skip ci]"
git push origin HEAD:master
Run Code Online (Sandbox Code Playgroud)
但它无法显示以下错误。
远程:0000000000aaTF41027:您需要 Git 'GenericContribute' 权限才能执行此操作。详细信息:身份'Build\sdfdfjjkk',范围'repository'
我已经设置了必要的权限如下:
并且Allow scripts to access the OAuth token
还启用了此处提到的
我还需要哪些其他权限才能使其工作?
我需要一个正在运行的发布任务的输出中的某些内容,以使其完成(身份验证代码)。但是控制台现在没有更新。我得到的只是“正在等待来自代理的控制台输出...”
在我们的自托管代理(Linux或Windows)和托管Ubuntu 1604代理上都会发生这种情况。
有问题的步骤是标准的Kubernetes任务:https : //github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks/KubernetesV1
这并非总是发生。
azure-devops azure-pipelines-build-task azure-pipelines azure-pipelines-release-pipeline
我正在使用VSTS中的"Azure Web App部署"构建步骤将ASP.NET Core API发布到Azure Web App:
有时,此步骤会出现以下错误:
[error] Microsoft.Web.Deployment.DeploymentDetailedClientServerException:Web Deploy无法修改目标上的文件"MyProject.Api.exe",因为它已被外部进程锁定.为了使发布操作成功,您可能需要重新启动应用程序以释放锁定,或者在下次发布尝试时使用.Net应用程序的AppOffline规则处理程序.有关详情,请访问:http: //go.microsoft.com/fwlink/?LinkId = 221672 #ERROR_FILE_IN_USE.
此GitHub问题引发了同样的问题,但没有使用Azure Web App部署构建步骤的建议解决方案.
azure azure-web-sites azure-devops azure-pipelines-build-task azure-pipelines
我有一些测试自动化代码从存储在本地机器上的环境变量中读取一些值,如下所示:
Environment.GetEnvironmentVariable("SAUCE_USERNAME", EnvironmentVariableTarget.User);
Run Code Online (Sandbox Code Playgroud)
我正在尝试使用 Azure Pipelines 在管道执行期间创建此变量,然后在我的测试自动化代码中读取它。使用 YAML 文件。
我在 Azure Pipeline 的 VS 测试步骤中读取此变量。因此,如果我设置该变量,它必须在 Azure Pipeline 的整个生命周期内。
也尝试了下面的代码,但由于此错误而失败:
azure-pipelines.yml (Line: 39, Col: 1, Idx: 1252) - (Line: 39, Col: 1, Idx: 1252):扫描一个简单的键时,找不到预期的':'。
# Create a secret variable
- powershell: |
Write-Host '##vso[task.setvariable variable=sauce.userName;issecret=true]abc'
# Attempt to output the value in various ways
- powershell: |
# Using an input-macro:
Write-Host "This works: $(sauce.userName)"
# Using the env var directly:
Write-Host "This does not work: …
Run Code Online (Sandbox Code Playgroud) continuous-integration azure azure-devops azure-pipelines-build-task azure-pipelines
我刚刚注意到 Visual Studio Build任务如下:
对于常见设置(如解决方案文件)的参数对我来说似乎是一个好主意,因为一些参数用于超过1个任务......但老实说我不喜欢使用通配符,我宁愿使用解决方案文件的路径.
如果我点击链接设置我无法编辑解决方案设置的值,有没有办法更改它?
visual-studio visual-studio-2015 azure-devops azure-pipelines-build-task azure-pipelines
使用 Azure Pipelines PowerShell 任务构建时,我试图将develop
分支合并到分支master
。
但是在执行命令时git push
,我收到此错误:
致命:无法读取“ https://OrganizationName@dev.azure.com ”的密码:终端提示已禁用
代码存储库是“Azure Repos Git”。
git checkout -b master
git config --global user.email "xxxxxxx@xxxx.xxx"
git config --global user.name "xxxxx"
git merge origin/develop
git push origin master
Run Code Online (Sandbox Code Playgroud)
在引用了一些 URL 之后,我创建了个人访问令牌,并将推送命令修改为git push https://PAT@dev.azure.com/OrganizationName
,但它仍然无法正常工作。
如果您找到解决此问题的方法,请告诉我。
git azure-powershell azure-devops azure-pipelines-build-task azure-pipelines
我有一个任务组,其中包含Azure Key Vault任务和Azure资源组部署任务以及其他任务.在后者中,我想要使用来自密钥库的值覆盖ARM模板中的一些参数.
Azure Key Vault任务中的Secrets过滤器字段如下所示.这些秘密可作为其他任务中的变量使用,其名称与秘密名称相同.因此,Azure资源组部署任务中的" 覆盖模板参数"字段具有该值.secret1,secret2,secret3
-p1 $(secret1) -p2 $(secret2) -p3 $(secret3)
问题是VSTS会自动选择三个变量作为任务组的参数.我不希望这种情况发生.这些变量将在任务组本身中设置和读出.它们就像一个班级中的私人领域.
一种方法是删除Azure Key Vault任务,然后使用Build and Release> Library> Variable组.但是没有办法将变量组链接到任务组.
我有一个带有预定义变量$(ProjectBuildNumber)的Microsoft Visual Studio Team Foundation Server(版本15.117.26714.0).
有没有办法在构建过程中增加带有次要内部编号+1的变量的值?
$(ProjectBuildNumber) = 663
Run Code Online (Sandbox Code Playgroud)
那么,在下一次构建时,它将是:
$(ProjectBuildNumber) = 664
Run Code Online (Sandbox Code Playgroud)
我在配置Azure DevOps Dotnet核心生成过程时遇到问题。
我有一个简单的dotnet核心项目,正在尝试在Azure DevOps环境中进行构建。
该项目位于我的仓库内的子文件夹中,但是我无法弄清楚如何指定管道应如何找到我的csproj文件。 MSDN文档建议您可以指定它,但没有示例,我的所有尝试都遇到错误。
使用标准dotnet CLI模板构建管道时,创建的YAML为:
# ASP.NET Core
# Build and test ASP.NET Core web applications targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://docs.microsoft.com/vsts/pipelines/languages/dotnet-core
pool:
vmImage: 'Ubuntu 16.04'
variables:
buildConfiguration: 'Release'
steps:
- script: dotnet build --configuration $(buildConfiguration)
displayName: 'dotnet build $(buildConfiguration)'
Run Code Online (Sandbox Code Playgroud)
但是,遇到错误:
MSBUILD : error MSB1003: Specify a project or solution file.
The current working directory does not contain a project or solution file. …
Run Code Online (Sandbox Code Playgroud) azure-pipelines-build-task ×10
azure-devops ×9
azure ×2
git ×2
.net-core ×1
azure-pipelines-release-pipeline ×1
jestjs ×1
tfs ×1