How to: Upload Build in TFS2017 (Update 1)

This functionality is only available in SPCAF Quality Gate. Feature Comparison

In order to upload your build in TFS2017 you must use the TFX command line. This article will explain what is required in order to do this.

  • Prerequisite.
    • Install Node.js and npm.
    • Install tfx.
    • Unzip the build .
    • Create a Personal Access Token.
  • Upload Build in TFS2017.

Prerequisites

Install Node.js and npm and use this to install tfx-cli.

First you will need to install Node.js. The installer will also contain npm. Once this is installed on your system you will need to load "Node.js command prompt". Enter the code below to install tfx.

npm install -g tfx-cli

Now unzip the Build, to a reasonable location, you will need to reference to during the upload process.

Next you will need to setup an Personal Access Token (PAT). In order to do this you will need to login into the TFS Admin Page. Once logged in click on the User icon and go to "Security".

TFS_UserSecurity_1124x800.png

Next click the add button, set a description for the PAT and make sure that you have set the Authorized scopes to "All scopes" and click "Create Token". (as shown below)

  TFS_PAT_Create_1124x800.png

The newly created PAT will be displayed. Copy this code and save for future reference.

Upload Build in TFS2017

With the prerequisites done it is time to upload your build. First open Node.js command prompt, with this open you will need to type:

tfx login

The interface will now ask for your URL, which must end in "DefaultCollection", it will then prompt for the PAT. Copy the PAT from the prerequisites and paste this in. (Please be aware this will not be displayed as shown below.)

TFX_Login_980x510.png

To confirm that you are logged in type the following to confirm all build tasks for the account:

tfx build tasks list

This will display the builds

TFX_Lists_980x463.png

 To finally upload your build you will need to type the following:

tfx build tasks upload

Finally it will prompt for the location of the build this is the location you unzipped the build to in the prerequisites.

Once complete, a notification will confirm that the upload was successful.

TFS_Upload_980x512.png

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.