我正在尝试创建一个简单的TFS vNext任务,使用Powershell执行Powershell脚本.
我可以加载任务,但在我使用任务触发发布后,我得到了
##[error]System.Management.Automation.ParameterBindingException: A parameter cannot be found that matches parameter name 'PoolName'.
Run Code Online (Sandbox Code Playgroud)
我的task.json如下.
{
"id": "7fe28fb2-c323-4494-beb6-b5c5939b09e7",
"name": "ManageIIS",
"friendlyName": "ManageIIS",
"description": "ManageIIS",
"helpMarkDown": "ManageIIS",
"category": "Utility",
"visibility": [
"Build"
],
"author": "Baskar Lingam",
"version": {
"Major": 1,
"Minor": 0,
"Patch": 3
},
"demands": [],
"minimumAgentVersion": "1.83.0",
"groups": [
{
"name": "advanced",
"displayName": "Advanced",
"isExpanded": false
}
],
"instanceNameFormat": "ManageIIS",
"inputs": [
{
"name": "PoolName",
"type": "string",
"label": "Application Pool Name",
"required": true,
"defaultValue": "AppPoolName"
},
{
"name": "AppPoolAction", …Run Code Online (Sandbox Code Playgroud) powershell tfs tfsbuild azure-pipelines-build-task azure-pipelines
我创建了一个.Net Core 2.0 Web API,并尝试使用Visual Studio Team Services和AWS Lambda .Net Tools进行部署,具体如下:https://aws.amazon.com/blogs/developer/working-with -lambda-functions-and-visual-studio-team-services /.
但是当任务在VSTS中运行时会抛出此错误:
找不到匹配命令"dotnet-lambda"的可执行文件
以下是任务的完整日志:
2018-01-27T02:55:21.9538582Z ##[section]Starting: Deploy to Lambda:
2018-01-27T02:55:21.9749412Z ==============================================================================
2018-01-27T02:55:21.9749717Z Task : AWS Lambda .NET Core Deployment
2018-01-27T02:55:21.9749955Z Description : Build and deploy a Serverless .NET Core application or AWS Lambda function
2018-01-27T02:55:21.9750152Z Version : 1.0.17
2018-01-27T02:55:21.9750334Z Author : Amazon Web Services
2018-01-27T02:55:21.9750571Z Help : Please refer to [AWS Lambda Developer Guide](https://docs.aws.amazon.com/lambda/latest/dg/) for more information on working with AWS Lambda.
2018-01-27T02:55:21.9750859Z ============================================================================== …Run Code Online (Sandbox Code Playgroud) aws-lambda azure-pipelines-build-task azure-pipelines asp.net-core-webapi asp.net-core-2.0
我正在自动化 nuget 包的部署。
它工作正常,只是我无法按照我想要的方式设置 prelease 包。
有两个分支触发构建。
当构建由 master 分支触发时,我想发布一个常规的 nuget 包。
当测试分支触发构建时,我想发布一个预发布包。
为了做到这一点,我需要添加-beta到 nuget 包版本号。所以我把Automatic package versioningfromuse build number改为use an environment variable.
请参阅以下 img :

起初它抱怨变量说No value was found for the provided environment variable,但我通过删除$(). 但是现在我仍然卡住了,因为我找不到用Build.BuilderNumberand设置变量的方法-beta。我可以复制构建并让每个构建触发器用于自己的分支,但我宁愿只有一个构建可以处理来自两个分支的构建。
所以现在我正在考虑将设置use build number更改回并更改在构建选项卡options中设置构建编号的表达式。但是,即使在那里我也无法使用条件表达式Build.SourceBranch来添加或不添加-beta.
Chris McKenzie 似乎在这里遇到了类似的问题,并用 powershell 解决了它。不幸的是,我不知道 powershell 并且无法理解,因为脚本对于我需要的来说似乎太大了。我仍然相信他们对 powershell …
我正在尝试在 Microsoft 应用程序中心上进行构建,并且我的存储库已从 VSTS 连接,但我面临此错误,它不是我的捆绑包 ID 我在 App Store 上的项目中使用了另一个捆绑包 ID。但我不明白这个错误是如何显示的。
Info.plist:错误:项目包标识符“com.companyname.Relyfy”与指定的配置文件“83b9c1b7-ad1a-48c4-8322-6e4cff2dc90a”[/Users/vsts/agent/2.131.0/work/1/s /Relyfy/iOS/Relyfy.iOS.csproj] 完成构建项目“/Users/vsts/agent/2.131.0/work/1/s/Relyfy/iOS/Relyfy.iOS.csproj”(重建目标)- - 失败的。
构建失败。
“/Users/vsts/agent/2.131.0/work/1/s/Relyfy/iOS/Relyfy.iOS.csproj”(重建目标)(1)->(_DetectSigningIdentity目标)->Info.plist:错误:项目捆绑标识符 'com.companyname.Relyfy' 与指定的配置文件 '83b9c1b7-ad1a-48c4-8322-6e4cff2dc90a' [/Users/vsts/agent/2.131.0/work/1/s/Relyfy/iOS/Relyfy.] 不匹配。 iOS.csproj]
任何帮助表示赞赏。
ios bundle-identifier xamarin.forms azure-pipelines visual-studio-app-center
我正在尝试在托管Linux池上运行针对Visual Studio Team Services的赛普拉斯测试.不幸的是,托管代理没有安装赛普拉斯的所有依赖项.
运行文档apt-get不起作用:
2018-05-18T21:03:14.7423331Z ##[section]Starting: Install cypress dependencies
2018-05-18T21:03:14.7474742Z ==============================================================================
2018-05-18T21:03:14.7488281Z Task : Bash
2018-05-18T21:03:14.7501148Z Description : This is an early preview. Run a Bash script on macOS, Linux, or Windows
2018-05-18T21:03:14.7513088Z Version : 3.127.0
2018-05-18T21:03:14.7524823Z Author : Microsoft Corporation
2018-05-18T21:03:14.7537179Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=613738)
2018-05-18T21:03:14.7549730Z ==============================================================================
2018-05-18T21:03:15.0174503Z Generating script.
2018-05-18T21:03:15.0535056Z Script contents:
2018-05-18T21:03:15.0547355Z apt-get install xvfb libgtk2.0-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2
2018-05-18T21:03:15.0656822Z [command]/bin/bash --noprofile --norc /opt/vsts/work/_temp/cac4d3f9-42e7-49f3-94f6-7d0444827d83.sh
2018-05-18T21:03:15.6040707Z Reading package lists...
2018-05-18T21:03:15.6085335Z Building dependency tree... …Run Code Online (Sandbox Code Playgroud) azure-devops azure-pipelines azure-pipelines-release-pipeline cypress
我创建了一个 C# .Net Standard 库,它引用了两个 Windows SDK 库。
参考文献是
C:\Program Files (x86)\Windows Kits\10\References\10.0.16299.0\Windows.Foundation.FoundationContract\3.0.0.0\Windows.Foundation.FoundationContract.winmdC:\Program Files (x86)\Windows Kits\10\References\10.0.16299.0\Windows.Foundation.UniversalApiContract\5.0.0.0\Windows.Foundation.UniversalApiContract.winmd这适用于我的本地开发机器。
VS Team Services 构建首先显示以下警告:
2018-06-13T01:17:22.3393846Z ##[warning]C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): Warning MSB3245: Could not resolve this reference. Could not locate the assembly "Windows.Foundation.FoundationContract". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
后来它失败并出现以下错误:
Error CS0246: The type or namespace name 'Windows' could not be found (are you missing a …
我已使用linux vm设置了专用管道,并且已安装代理,并且在门户网站中显示代理处于活动状态。我也有安装docker。在同一台机器上,如果我使用sudo docker则可以工作。因此,我确定VSTS代理运行命令时这是权限问题。不知道我需要给哪个用户哪个权限,以便从VSTS初始化构建时运行docker命令。
尝试连接到Unix:///var/run/docker.sock上的Docker守护程序套接字时获得的权限被拒绝:发布 http://%2Fvar%2Frun%2Fdocker.sock/v .37 / build?buildargs =%7B %7D&cachefrom =%5B]&cgroupparent =&cpuperiod = 0&cpuquota = 0&cpusetcpus =&cpusetmems =&cpushares = 0&dockerfile = Dockerfile&labels =%7B%7D&memory = 0&memswap = 0&networkmode = default&rm =&session = a53bbddc77c2f9c2f9c2f9c2f9c2f9e2e6e7f9e2e6e2e6e7e2e6e6e6e6e6e6e6e6e6e6e6e6e6e2e7e7e7e7e7e0e7e8e7e0e7e8e7e0e人* 8b9&shmsize = 0&t = mycontainerreg.azurecr.io%2Ftk-dashboard%3A853&target =&ulimits = null:拨打Unix /var/run/docker.sock:连接:权限被拒绝
/ usr / bin / docker失败,返回码:***
我的构建脚本使用SYSTEM_ACCESSTOKEN环境变量。
在设计器内部定义中,我选中了“ 允许脚本访问OAuth令牌”,一切正常。
复制设计器生成的YAML定义后,我无法访问SYSTEM_ACCESSTOKEN环境变量。
如何允许我的YAML版本访问OAuth令牌?
这是我的azure-pipelines.yaml:
queue:
name: Hosted VS2017
steps:
- checkout: self
lfs: true
persistCredentials: true
- powershell: ./build.ps1
Run Code Online (Sandbox Code Playgroud) 我有一个经典的环境。设置如下:
我有2个分支:Develop和Master。
Azure DevOps中有什么方法可以设置以下规则:
在dev环境(在azure devops的发布管道中定义)上成功部署后,------>将自动创建一个pull request将开发合并到Master中。
或另一个:如果成功执行Build了开发分支-------> 自动
创建一个pull request将开发合并到Master中。
任何帮助将不胜感激。
git continuous-integration continuous-deployment azure-devops azure-pipelines
选择以下所示的选项时,将生成一个yaml文件:
在此yaml文件中,您可以定义从开始的整个部署周期restore -> build -> run tests -> publish and -> deploy to azure app service web app。
那么,为什么有发布选项?如果我可以通过Pipelines -> Pipelines选件定义整个生命周期,那么选件的目的是Pipelines -> Releases什么?
azure-devops azure-pipelines azure-pipelines-release-pipeline
azure-pipelines ×10
azure-devops ×7
azure-pipelines-release-pipeline ×2
aws-lambda ×1
c# ×1
cypress ×1
docker ×1
git ×1
ios ×1
powershell ×1
tfs ×1
tfsbuild ×1
winapi ×1
winmd ×1