azure-pipelines-build-task

Run “node test” as part of Visual Studio Team Services build task with results in “tests” tab

感情迁移 提交于 2019-12-04 08:20:31
问题 I have a project that contains tests that I am running with Mocha from the command line. I have set up a test script in my packages.json , which looks as follows: "test": "mocha ./**/*.spec.js --reporter dot --require jsdom-global/register" I have currently got a simple task set up in Visual Studio Team Services, which just runs the npm test command, this runs Mocha within a console and continues/fails the build depending on whether the tests pass. What I'd like to be able to do is have the

VSTS - how to get Code Coverage results

£可爱£侵袭症+ 提交于 2019-12-04 04:59:27
问题 I'm new to DevOps work and I've been tasked to setup a build for one of our .net Standard Library projects. I used the build template for this, which works great! But I want to add a code coverage into build output (there's a test project in the solution). In the "VsTest - testAssemblies" task, I've checked the "Enable Code Coverage" option, as shown below: I added a Publish code coverage task and it's asking for something called a "Summary File" - see below: I'm not sure how to set this

Building Project in VSTS doesn't build all projects in solution

核能气质少年 提交于 2019-12-03 16:17:18
I'm having a strange issue where when I create a build with "Visual Studio Build" and supply the *.sln file it pretends to build all projects (I see this in the log) but when it comes to publishing artifacts there is only a few of the projects from the solution (mainly test projects and some miscellaneous projects but no the main ones) I have dependencies sorted ok as this build fine in VS2015 (I currently use WebDeploy) Has anyone seen this behavior? Since you mentioned "WebDeploy", I suspect that you are building a web app project with some other projects in the solution. The behavior you

PhantomJS not captured when ran via build server

跟風遠走 提交于 2019-12-03 13:26:35
I am using Karma and PhantomJS with Jasmine to test my AngularJS. When I run my gulp test locally it works fine, launches PhantomJS and runs all my tests, but when the tests get run on the build server it fails with the following errors: Note that I am using VSTS and using their built in cloud build system (hosted agent). Having said that its pretty much a task runner and I only use it to run gulp tasks (build, test etc) on checkin [32m13 07 2016 15:21:32.260:INFO [karma]: [39mKarma v1.1.1 server started at http://localhost:9876/ [32m13 07 2016 15:21:32.262:INFO [launcher]: [39mLaunching

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

流过昼夜 提交于 2019-12-03 00:09:23
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 AppOffline rule handler for .Net applications on your next publish attempt. Learn more at: http://go

Create Large Amount of Work Items in TFS Using Javascript REST API

旧街凉风 提交于 2019-12-02 11:48:30
I need to create around 6000 work items via my TFS extension. I use typescript and REST API in my extension. below is the code I use to create work item var ops = [ { path: "/fields/System.Title", op: "add", value: "Hello world" } ]; var options = { url: 'http://localhost:8080/tfs/DefaultCollection/Agile Git/_apis/wit/workItems/$Bug?api-version=2.2', username: 'username', password: 'password', domain: 'domain', method: 'PATCH', headers: { 'Content-Type': 'application/json-patch+json' }, body: JSON.stringify(ops) }; httpntlm.patch(options, function(err,res) { console.log("patch complete");

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

柔情痞子 提交于 2019-12-02 09:01:44
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? 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 from 'vso-node-api/interfaces/Common/VSSInterfaces'; var collectionUrl = "https://xxxxxx.visualstudio.com";

Fatal: Could not read password for 'https://OrganizationName@dev.azure.com': terminal prompts disabled

て烟熏妆下的殇ゞ 提交于 2019-12-02 05:20:25
I'm trying to merge the develop branch to the master branch when building with Azure Pipelines PowerShell task. But while executing the command git push , I'm getting this error: Fatal: Could not read password for ' https://OrganizationName@dev.azure.com ': terminal prompts disabled The code repository is "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 After referring some URLs, I've created the Personal Access Token, and modified the push command as git push https:

How can I create a Pull Request when a release completes in VSTS?

别来无恙 提交于 2019-12-02 01:33:44
A project I'm working on has 2 long-standing feature branches as well as the master branch. To fully automate deployments, I'd like to create a pull request from master into those two feature branches anytime a deployment goes out from a VSTS Release. What kind of tooling in VSTS would allow me to do create pull requests as a release task? You can create the Pull Request through Pull Request REST API during the release. There is Invoke HTTP REST API task but may not good for your requirement. The simple way is that you can do it through PowerShell task : Select the phase (e.g. Run on agent)

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

谁说胖子不能爱 提交于 2019-12-01 18:19:18
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 the value of time in my release definition using some other variable? Is this possible? The is no