azure-pipelines-build-task

How to get the variable value in TFS/AzureDevOps from Build to Release Pipeline?

自古美人都是妖i 提交于 2019-12-01 17:49:53
问题 I've defined a variable in my TFS/AzureDevops Build definition (say it's time ) and assign the value using PowerShell task within my build definition. Like, Type: Inline Script. Inline script: $date=$(Get-Date -Format g); Write-Host "##vso[task.setvariable variable=time]$date" You can refer to this similar example Now I want to get this value in my release definition pipeline. I configured this build definition as continuous deployment to my release definition. My Question is How can I get

How to add secret variable as task environment variable in VSTS

寵の児 提交于 2019-12-01 17:23:43
This documentation states that secret variables are Not decrypted into environment variables. So scripts and programs run by your build steps are not given access by default. One of my build tasks require that an environment variable be set that is stored in a secret variable. Does this mean it's impossible to do this using secret varaibles in VSTS? If not, how do I do this? For further background, I'm trying to code sign my electron app using electron-builder. It requires that two environment variables be set: CSC_LINK and CSC_KEY_PASSWORD . One of these is the password to a code signing

Increase the screen resolution on Test Agent

泄露秘密 提交于 2019-11-30 07:36:22
Running a automated test against a desktop WPF application works fine on my local machine and on Azure VM Windows Server 2012R2 when accessed via RDP. However, when the VM is used as build machine, controlled by test agent on TFS or VSTS, all test fails because of the screen resolution is set to 1024x768 screen resolution. The application is not configure to run until this display settings. Is there any way to change the screen settings when we deploy the test agent? Change VSTS agent session screen resolution when running protractor tests We've encountered the same issue on our Visual studio

Modify TFS 2015 BuildNumber during build process

蓝咒 提交于 2019-11-29 14:35:55
I have some embedded C software stored under TFS and also have a corresponding TFS build definition that successfully checks out the code and builds it using the relevant compilers. So just to be clear, although this is TFS, I'm not building a .NET application. Now that I have the build working, I'm trying to provide overall software versioning support which should be linked to the build process. My current aim is as follows: The source code that is being built has a header file that has #defines for three variables, Major Version, Minor Version and Build Number. This header file is then used

How to create work items using Visual Studio Team Services Client for Node.js (vso-node-api)?

时间秒杀一切 提交于 2019-11-28 12:23:03
问题 I need to create VSTS work items using Visual Studio Team Services Client for Node.js (vso-node-api), Please provide any samples on this? 回答1: I created a simple code sample to get and create work item with it for your reference, see following section for details: /// <reference path="typings/index.d.ts" /> import * as vm from 'vso-node-api/WebApi'; import * as wa from 'vso-node-api/WorkItemTrackingApi'; import * as wi from 'vso-node-api/interfaces/WorkItemTrackingInterfaces'; import * as vss

Modify TFS 2015 BuildNumber during build process

江枫思渺然 提交于 2019-11-28 08:29:25
问题 I have some embedded C software stored under TFS and also have a corresponding TFS build definition that successfully checks out the code and builds it using the relevant compilers. So just to be clear, although this is TFS, I'm not building a .NET application. Now that I have the build working, I'm trying to provide overall software versioning support which should be linked to the build process. My current aim is as follows: The source code that is being built has a header file that has

How to display “Area path” in VSTS build task input PickList?

 ̄綄美尐妖づ 提交于 2019-11-27 15:25:00
I need to display the the "Area path" in a VSTS Build task input PickList, so that I can retrieve the user selected "Area path" value from my build task and set it in a work item generated by the build task. Is this possible with existing VSTS API? If so how to do this? I think this is done in Copy Files task in Utilty section. Thanks in advance. Yes, it is. You can add following section in task.josn file to achieve this: "inputs": [ { "name": "rootArea", "type": "pickList", "label": "rootArea", "defaultValue": "", "required": false, "helpMarkDown": "Select the root area.", "properties": {

Azure Web App deploy: Web Deploy cannot modify the file on the destination because it is locked by an external process

心不动则不痛 提交于 2019-11-27 13:39:29
问题 I am using the "Azure Web App Deployment" build step in VSTS to publish an ASP.NET Core API to an Azure Web App: Occasionally, this step breaks with the following error: [error]Microsoft.Web.Deployment.DeploymentDetailedClientServerException: Web Deploy cannot modify the file 'MyProject.Api.exe' on the destination because it is locked by an external process. In order to allow the publish operation to succeed, you may need to either restart your application to release the lock, or use the

How to add secret variable as task environment variable in VSTS

丶灬走出姿态 提交于 2019-11-27 07:44:52
问题 This documentation states that secret variables are Not decrypted into environment variables. So scripts and programs run by your build steps are not given access by default. One of my build tasks require that an environment variable be set that is stored in a secret variable. Does this mean it's impossible to do this using secret varaibles in VSTS? If not, how do I do this? For further background, I'm trying to code sign my electron app using electron-builder. It requires that two

Visual studio team services deploymen/buildt certificate error

余生颓废 提交于 2019-11-27 05:29:24
I am trying to build a click-once application using the Continuous integration and deployment feature in VSTS (Visual studio team services Online)We are trying to build this using the Hosted agent Visual studio 2015 We had difficulties signing the strong name key file with an error of MSB3326: Cannot import the following key file: xxxx.snk. The key file may be password protected. To correct this, try to import the certificate again or import the certificate manually into the current user's personal certificate store. And after that MSB3321: Importing key file "xxxx.pfx" was canceled. I have