azure-pipelines-build-task

Set “Path” environment variable during vsts build so it would persist across build tasks specifically vsTest task

余生长醉 提交于 2019-12-07 02:14:57
问题 I have a vsts build definition in which I try to set the PATH environment variable using PowerShell (and before I tried cmd) task, so that in a later vsTest task, the tests could run an exe from that path, however setting the PATH using the ps\cmd tasks doesn’t seem to work, I tried a few options such as: [Environment]::SetEnvironmentVariable("Path", $env:Path + ";" + $newPath, [EnvironmentVariableTarget]::User) setx path " %newPath;%PATH%" Any suggestions? 回答1: Set the process environment

VSTS build summary tab with visible condition or Task dependency

こ雲淡風輕ζ 提交于 2019-12-06 15:44:35
I try to add new custom tab to summary page for build result, but which will be added only for builds with my custom build Task. For example, Task "publish artifacts", only if this task was added, the tab "artifacts" added in summary page. I want the same behavior for my task and tab. For now, I've just added in vss-extension.json, in "contributions" { "id": "build-info-tab", "type": "ms.vss-build-web.build-results-tab", "description": "A tab contributing to build results view", "targets": [ "ms.vss-build-web.build-results-view" ], "properties": { "name": "My Build info", "uri": "infoTab.html"

ANDROID_HOME not set (VSTS agent running as service on OS X)

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 06:27:28
问题 I have configured the VSTS agent on my MacBook Pro and it works perfectly when I manually run it (using ./run.sh ). However when I configure the VSTS agent to run as a service (using ./svc.sh install and ./svc.sh start ) and queue a new build in VSTS I receive an error (on the signing step) "ANDROID_HOME not set". I have the following configured in my .bash_profile: export ANDROID_HOME=/Users/$(whoami)/Library/Android/sdk export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

Create AD application with VSTS task

跟風遠走 提交于 2019-12-06 04:32:18
I am trying to create a VSTS task, which should create an AD application. Taken the DeployAzureResouceGroup as a sample, I have created to following script: [CmdletBinding()] param() Trace-VstsEnteringInvocation $MyInvocation Import-VstsLocStrings "$PSScriptRoot\Task.json" $connectedServiceNameSelector = Get-VstsInput -Name "connectedServiceNameSelector" -Require $connectedServiceName = Get-VstsInput -Name "connectedServiceName" $connectedServiceNameClassic = Get-VstsInput -Name "connectedServiceNameClassic" $domains = (Get-VstsInput -Name "domains").Split(";") $appName = Get-VstsInput -Name

Using PowerShellGet on VSTS hosted agents

佐手、 提交于 2019-12-06 02:50:48
I am using Visual Studio Team Services (VSTS) hosted build agents in my build process. My builds mostly rely on the 'PowerShell' step that calls a script that I have in git. From within this script, I would like to manage PowerShell modules using PowerShellGet. For example, I would like to be able to install pscx simply by running Install-Module -Name pscx Unfortunately, hosted agents use PowerShell 4 and they don't have the PowerShellGet module installed. As a result, the Install-Module function is not available. Anybody has any suggestion to use the PowerShellGet module on VSTS hosted agent?

Reuse same build pipeline for different repository on Azure DevOps

谁说胖子不能爱 提交于 2019-12-05 15:27:24
I have a project on Azure DevOps containing multiple forks of the same main repository. I created a build pipeline for that repository which unfortunately cannot be reused for the present forks since a pipeline can only be configured for a single repository. This solution is not ideal because leads to multiple identical pipelines, one for each fork, and maintaining all of them can be difficult. Is there a way to use one pipeline for multiple repositories? you can create a template file and reference that file from each pipeline, that way you can edit a single file and every pipeline will

Build error in Xcode on cloud-hosted Mac on VSTS

北城余情 提交于 2019-12-05 13:38:13
I'm getting following error while building my project on cloud no such module 'RxCocoa' import RxCocoa ** BUILD FAILED ** The following build commands failed: CompileSwift normal arm64 CompileSwiftSources normal arm64com.apple.xcode.tools.swift.compiler (2 failures) Error: /usr/bin/xcodebuild failed with return code: 65 the reason is same as building on local machine when frameworks are not added in 'Link Binary With Libraries' then Xcode throw this error. So my question is how to fix this issue in Xcode on cloud-hosted Mac? Thanks in Advance ok so just replacing **/*.xcodeproj/project

Why TFS Build Step Extension Icon Is Missing?

試著忘記壹切 提交于 2019-12-05 09:37:03
I created a new extension for TFS following MS tutorial. For some reason when I'm adding Icon to my extension I can see this icon when I'm installing the extension and in the "Extension Manager" page, But when I choose my extension from the build step menu the image is missing . In the "vss-extension.json" file I added: "icons": { "default": "images/icon.png" }, "files": [ { "path": "images", "addressable": true }, { "path": "dist", "addressable": true, "packagePath": "scripts" }, { "path": "infoTab.html", "addressable": true }, { "path": "node_modules/vss-web-extension-sdk/lib", "addressable"

Increment variable value in TFS build +1

可紊 提交于 2019-12-05 00:53:55
I have a Microsoft Visual Studio Team Foundation Server (Version 15.117.26714.0) with predefined variable $(ProjectBuildNumber). Is there any way to increment, during build process, value of variable with minor build number by +1? $(ProjectBuildNumber) = 663 So, that on next build it will be: $(ProjectBuildNumber) = 664 jessehouwing You can't reference variables in the build number of the Build Definition. But what you can do is override the build number in the build itself. You can either use a magic log command or use my VSTS Variables Task to set the Build.BuildNumber in the build itself .

ANDROID_HOME not set (VSTS agent running as service on OS X)

不问归期 提交于 2019-12-04 09:44:49
I have configured the VSTS agent on my MacBook Pro and it works perfectly when I manually run it (using ./run.sh ). However when I configure the VSTS agent to run as a service (using ./svc.sh install and ./svc.sh start ) and queue a new build in VSTS I receive an error (on the signing step) "ANDROID_HOME not set". I have the following configured in my .bash_profile: export ANDROID_HOME=/Users/$(whoami)/Library/Android/sdk export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools The path is correct and also running echo $ANDROID_HOME returns the expected value (in this case /Users