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.
- Install Node.js and npm.
- Install tfx.
- Unzip the build .
- Create a Personal Access Token.
- Upload Build in TFS2017.
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.
Now unzip the Build to a reasonable location. (which you will need to refer to during the upload process.)
Next, you will need to set up a 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".
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)
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:
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.)
To confirm that you are logged in type the following to confirm all build tasks for the account:
This will display the builds
To finally upload your build you will need to type the following:
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.