azure-pipelines-build-task

PhantomJS not captured when ran via build server

六月ゝ 毕业季﹏ 提交于 2019-12-21 04:48:27
问题 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

How to publish Jest Unit Test Results in VSTS tests?

柔情痞子 提交于 2019-12-20 09:23:06
问题 I've found some questions on SO specific to version for jest unit test to publish its result in VSTS build Test Results tab. But no proper solution is found. 回答1: I've used a different approach, b/c after some research I found that the Jest testResultsProcessor property is deprecated. I'm using the jest-junit package for test reports (which has been worked on more recently than the jest-trx-results-processor, fwiw): Add jest-junit to package.json Eg yarn add -D jest-junit or npm add --save

Is it possible to conditionally set the artifact name in my Azure DevOps build pipeline “publish artifact” task?

回眸只為那壹抹淺笑 提交于 2019-12-20 05:30:25
问题 I was wondering if it is possible to conditionally set the name of my build artifact in my Azure DevOps build pipeline "publish artifact" task? I want to produce different artifacts based on the input to my build pipeline. Say, based on the input pipeline variables, I want to produce one of three artifacts ("red", "blue", "green"). Is it possible to specify the artifact being produced in my "publish artifact" task based on the input variable, or is it easier/better just to produce three build

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

半城伤御伤魂 提交于 2019-12-17 13:43:01
问题 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. 回答1: Yes, it is. You can add following section in task.josn file to achieve this: "inputs": [ { "name": "rootArea", "type": "pickList", "label":

VSTS Build Task that runs script on multiple shards

不打扰是莪最后的温柔 提交于 2019-12-13 22:13:22
问题 We use Azure SQL Databases, and have a "shard" structure using the Elastic Library. We are starting the transition over to Visual Studio Team Services and want to use their Build and Release process to deploy to development and production environments. Is there a build task that will execute a SQL script on all our shards (ensuring that it runs successfully and follows some retry conditions). The scripts will be idempotent. Bonus points if we can also have a task that will generate the SQL

VSTS CD stage task always prints log in one go

﹥>﹥吖頭↗ 提交于 2019-12-13 21:01:50
问题 I would like to execute UI test cases as as part of CI/CD pipeline. I am using VSTS release management. I created a stage & run the command (npm run e2e-run) as part of one of the tasks, this triggers my test case execution. It takes around 1 hour to execute this task. Problem is I do not get any response until whole task (test execution) is done. I get only this message "Waiting for console output from an agent...". If I execute command locally in VS code then I get continuous logs (pass

How to limit build task only to VSTS not TFS

假装没事ソ 提交于 2019-12-13 17:16:14
问题 I have a VSTS extension with two build tasks, one build task should be available for both VSTS and TFS, the other one only for TFS. Is it possible to configure this for each build task via extension manifest? 回答1: I have used the following workaround to display message and discontinue the build in TFS. var collectionUrl = process.env["SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"]; var regExpression = new RegExp("^((https?)\:\/\/)(([a-z0-9])+\.)*(visualstudio\.com)"); if(regExpression.test

How to create Azure Cloud Service package from MsBuild in azure pipeline

人盡茶涼 提交于 2019-12-13 04:44:28
问题 I have some cloud service projects , which i am trying to get it into CI/CD. When i right click on the project from Visual Studio and click Package it does what i want. I can see the ServiceConfiguration.cscfg and ServiceDefinition.csdef in the bin\Release folder after the package command is completed. How can i achieve the same from an MSBuild command line ? I have tried msbuild.exe /p:DeployTarget=Package /p:DeployOnBuild=true /p:AutomatedBuild=True /p:configuration=release /p:outdir="D:

Cannot create batch work items using batch operations in TFS

不羁的心 提交于 2019-12-12 05:15:36
问题 I am getting below errors while trying to create workitems with batch creation method Error 1 "Message":"No MediaTypeFormatter is available to read an object of type 'JsonBatchHttpRequest' from content with media type 'application/json-patch+json'." Error 2 {"count":1,"value":{"Message":"One or more errors occurred."}} I have referred to this documentation https://www.visualstudio.com/en-us/docs/integrate/api/wit/batch from Microsoft . and my question on stackoverflaw Create Large Amount of

VSTS / TFS Error Occurred While Trying to get Work Items With WIQL

拟墨画扇 提交于 2019-12-12 02:35:53
问题 I am using below method to obtain workitem Ids with specific title from my VSTS extension. I am using REST API , Typescript and WIQL . public getWorkItemsbyQueryFilter(): string[] { try { let query = "Select [System.Id] From WorkItems Where [System.WorkItemType] = '" + this.workItemType + "' AND [System.Title] contains 'ABC'"; var ids : string[]; var self = this; var colURL = this.collectionURL +this.teamProject +"/_apis/wit/wiql?api-version=1.0" var options = { url: colURL, username: this