Custom Build vNext Task to Release Management

Custom task in build vNext to start Release Management

This project explains how to create a task in build vNext to start the Release Management.

Currently there is the Release options in the Visual Studio on line, but I need to release my applications in the on premises TFS.

  1. First of all you need to install 2 apps;
  2. After that you need to install tfx-cli in the command prompt, more information here
    • npm install -g tfx-cli
  3. With the tfx-cli installed execute the follow command to create the files templates
    • tfx build tasks create
      • Include Task Name, Friendly Task Name, Task Description and Task Author
    • It will create a folder named with your Task Name with 4 files:
      • icon.png - Generic 28x28 icon for the task that can be changed
      • samples.js - A sample to JS
      • samples.ps - A sample to powerShell script
      • task.json - A manifest file
  4. The files to create the task to Release Management are in the source code.
  5. To publish, the task is simple, just execute the follow command (this part I prefer to use PowerShell):
    • tfx login --auth-type basic
      • Include 
        • Service URL - the TFS URL (http://yourtfsurl:8080/tfs)
        • Username - Administrator user from TFS
        • Password - Password from Administrator user
    • tfx build tasks upload
      • Include
        • Task path - the folder where the file is
  6. If everything is ok, the message "Task at 'folderName' uploaded successfully!" will appear.

References:

http://colinsalmcorner.com/post/developing-a-custom-build-vnext-task-part-1

https://github.com/Microsoft/tfs-cli

https://www.simple-talk.com/sql/database-delivery/writing-build-vnext-tasks-for-visual-studio-online/

Last edited Feb 11, 2016 at 10:01 PM by igorcfelix, version 9