Code Monkey home page Code Monkey logo

my-vsts-tasks's Introduction

Additional tasks for VSTS / TFS Build.

Most of the build and test infrastructure is copied from Microsoft's VSTS Tasks.

Currently, there is only one task:

Status

Build & Test
Win Windows Build status

Build

Fast pass

To build and test everything, simply use:

 build-full.cmd

You will find packaged tasks in _packages\tasks.zip, from where you can deploy/upload them.

Manual steps

Once, install dependencies:

 npm install

To increment all task's patch level - required to allow upload of a new version to VSTS/TFS:

 node make.js bump

Build and test:

 npm run build
 npm test

Build a single task:

 node make.js build --task RunOpenCover
 node make.js test --task RunOpenCover

Deploy a Build Task

One time preparation

Use the tfx-cli tool to upload and generally manage build tasks for VSTS or an on premise TFS instance.

Install the tfx tool by npm install -g tfx-cli.

Afterwards make sure you login to your TFS / VSTS instance of choice, for example:

 tfx logon -u http://localhost:8080/tfs/MyCollection --token <token>

(You can create a token from your "Security" settings in TFS/VSTS). I recommend setting the TFX_TRACE environment variable to 1 for all your work, because otherwise the tfx utility is a little to quiet, especially and even when errors occur (e.g. a login fails).

Deployment

Deploy a local build

To deploy the result of a local build (e.g. from cloning this repo):

 tfx build tasks upload --task.path .\_build\Tasks\RunOpenCoverTask

Make sure to update at least the patch version in your task.json everytime you redeploy a new version (e.g. via node make.js bump).

Deploy from a package

To deploy the result of a release's tasks.zip:

 7za x -o %TEMP%\tasks tasks.zip
 tfx build tasks upload --task.path %TEMP%\tasks\RunOpenCoverTask

my-vsts-tasks's People

Contributors

cklutz avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

somusun3 nordic81

my-vsts-tasks's Issues

The property 'Count' cannot be found on this object error when no unit tests exist.

When running OpenCover on a project without any unit tests we get a "The property 'Count' cannot be found on this object" error in RunOpenCover.ps1.

2018-03-26T07:02:20.7763009Z ##[section]Starting: Tests/Coverage - **\*test*.dll;-:**\obj\**;-:**\*TestAdapter.dll 2018-03-26T07:02:20.7763009Z ============================================================================== 2018-03-26T07:02:20.7763009Z Task : Run OpenCover 2018-03-26T07:02:20.7763009Z Description : Runs VSTest under OpenCover 2018-03-26T07:02:20.7763009Z Version : 1.0.15 2018-03-26T07:02:20.7763009Z Author : Christian Klutz 2018-03-26T07:02:20.7763009Z Help : [More information](https://github.com/cklutz/my-vsts-tasks/blob/master/Tasks/RunOpenCover/README.md) 2018-03-26T07:02:20.7763009Z ============================================================================== 2018-03-26T07:02:23.4014214Z Using specified VSTest version: latest 2018-03-26T07:02:23.4170626Z Adding Visual Studio setup helpers. 2018-03-26T07:02:23.6826806Z Getting Visual Studio setup instances. 2018-03-26T07:02:23.6982816Z Found 1 instances. 2018-03-26T07:02:23.7139319Z 2018-03-26T07:02:23.7139319Z 2018-03-26T07:02:23.7139319Z Description : Professional developer tools and services for small teams 2018-03-26T07:02:23.7139319Z DisplayName : Visual Studio Professional 2017 2018-03-26T07:02:23.7139319Z Id : f921f7cc 2018-03-26T07:02:23.7139319Z InstallDate : System.Runtime.InteropServices.ComTypes.FILETIME 2018-03-26T07:02:23.7139319Z Name : VisualStudio/15.5.7+27130.2036 2018-03-26T07:02:23.7139319Z Path : D:\VS15 2018-03-26T07:02:23.7139319Z Version : 15.5.27130.2036 2018-03-26T07:02:23.7139319Z VersionString : 15.5.27130.2036 2018-03-26T07:02:23.7139319Z 2018-03-26T07:02:23.7139319Z 2018-03-26T07:02:23.7139319Z 2018-03-26T07:02:23.7139319Z 2018-03-26T07:02:23.7764104Z Latest VS Version in D:\VS15 2018-03-26T07:02:23.9795752Z Using packaged tools. 2018-03-26T07:02:23.9795752Z Using VSTest: D:\VS15\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe 2018-03-26T07:02:29.6360737Z ---------------------------------------------------------------------------- 2018-03-26T07:02:29.6360737Z 2018-03-26T07:02:29.6360737Z 2018-03-26T07:02:29.6829511Z PSMessageDetails : 2018-03-26T07:02:29.6829511Z Exception : System.Management.Automation.PropertyNotFoundException: The property 'Count' cannot be found 2018-03-26T07:02:29.6829511Z on this object. Verify that the property exists. 2018-03-26T07:02:29.6829511Z at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext 2018-03-26T07:02:29.6829511Z funcContext, Exception exception) 2018-03-26T07:02:29.6829511Z at System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame
2018-03-26T07:02:29.6829511Z frame)
2018-03-26T07:02:29.6829511Z at
2018-03-26T07:02:29.6829511Z System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame
2018-03-26T07:02:29.6829511Z frame)
2018-03-26T07:02:29.6829511Z at
2018-03-26T07:02:29.6829511Z System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame
2018-03-26T07:02:29.6829511Z frame)
2018-03-26T07:02:29.6829511Z at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
2018-03-26T07:02:29.6829511Z at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
2018-03-26T07:02:29.6829511Z at System.Management.Automation.PSScriptCmdlet.RunClause(Action1 clause, Object 2018-03-26T07:02:29.6829511Z dollarUnderbar, Object inputToProcess) 2018-03-26T07:02:29.6829511Z at System.Management.Automation.PSScriptCmdlet.DoEndProcessing() 2018-03-26T07:02:29.6829511Z at System.Management.Automation.CommandProcessorBase.Complete() 2018-03-26T07:02:29.6829511Z TargetObject : 2018-03-26T07:02:29.6829511Z CategoryInfo : NotSpecified: (:) [RunOpenCover.ps1], PropertyNotFoundException 2018-03-26T07:02:29.6829511Z FullyQualifiedErrorId : PropertyNotFoundStrict,RunOpenCover.ps1 2018-03-26T07:02:29.6829511Z ErrorDetails : 2018-03-26T07:02:29.6829511Z InvocationInfo : System.Management.Automation.InvocationInfo 2018-03-26T07:02:29.6985398Z ScriptStackTrace : at <ScriptBlock>, E:\red1\_work\_tasks\RunOpenCoverTask_077011c0-8f20-11e7-9c44-c3e20bdea24c\1. 2018-03-26T07:02:29.6985398Z 0.15\RunOpenCover.ps1: line 121 2018-03-26T07:02:29.6985398Z at <ScriptBlock>, E:\red1\_work\_tasks\RunOpenCoverTask_077011c0-8f20-11e7-9c44-c3e20bdea24c\1. 2018-03-26T07:02:29.6985398Z 0.15\RunOpenCoverTask.ps1: line 104 2018-03-26T07:02:29.6985398Z at <ScriptBlock>, <No file>: line 1 2018-03-26T07:02:29.6985398Z at <ScriptBlock>, <No file>: line 22 2018-03-26T07:02:29.6985398Z at <ScriptBlock>, <No file>: line 18 2018-03-26T07:02:29.6985398Z at <ScriptBlock>, <No file>: line 1 2018-03-26T07:02:29.6985398Z PipelineIterationInfo : {} 2018-03-26T07:02:29.6985398Z 2018-03-26T07:02:29.6985398Z 2018-03-26T07:02:29.6985398Z 2018-03-26T07:02:29.6985398Z ---------------------------------------------------------------------------- 2018-03-26T07:02:29.9954651Z ##[error]The property 'Count' cannot be found on this object. Verify that the property exists. 2018-03-26T07:02:30.0579719Z ##[section]Finishing: Tests/Coverage - **\*test*.dll;-:**\obj\**;-:**\*TestAdapter.dll

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.