Git Product home page Git Product logo

tfs-cli's Introduction

Node CLI for Azure DevOps

NOTE: If you are looking for the new Azure DevOps CLI, see vsts-cli

NPM version

Command utility for interacting with Microsoft Team Foundation Server and Azure DevOps Services (formerly VSTS). It is cross platform and supported on Windows, OS X, and Linux.

Setup

First, download and install Node.js 4.0.x or later and NPM (included with the installer)

Linux/OSX

sudo npm install -g tfx-cli

Windows

npm install -g tfx-cli

Commands

To see a list of commands:

tfx

For help with an individual command:

tfx <command> --help

Help info is dynamically generated, so it should always be the most up-to-date authority.

Command sets

  • tfx build (builds): Queue, view, and get details for builds
  • tfx build tasks (build tasks): Create, list, upload and delete build tasks
  • tfx extension (extensions): Package, manage, publish Team Foundation Server / Azure DevOps extensions
  • tfx workitem (work items): Create, query and view work items.

Login

To avoid providing credentials with every command, you can login once. Currently supported credential types: Personal Access Tokens and basic auth credentials.

NTLM support is under consideration

Warning! Using this feature will store your login credentials on disk in plain text.

To skip certificate validation connecting to On-Prem Azure DevOps Server you can use parameter --skip-cert-validation

Personal access token

Start by creating a personal access token and paste it into the login command.

~$ tfx login
Copyright Microsoft Corporation

> Service URL: {url}
> Personal access token: xxxxxxxxxxxx
Logged in successfully

Examples of valid URLs are:

  • https://marketplace.visualstudio.com
  • https://youraccount.visualstudio.com/DefaultCollection

Basic auth

You can alternatively use basic auth by passing --auth-type basic (see Configuring Basic Auth).

Settings cache

To avoid providing other options in every command, you can save options out to a settings file by adding the --save flag.

~$ tfx build list --project MyProject --definition-name println --top 5 --save

...

id              : 1
definition name : TestDefinition
requested by    : Teddy Ward
status          : NotStarted
queue time      : Fri Aug 21 2015 15:07:49 GMT-0400 (Eastern Daylight Time)

~$ tfx build list
Copyright Microsoft Corporation

...

id              : 1
definition name : TestDefinition
requested by    : Teddy Ward
status          : NotStarted
queue time      : Fri Aug 21 2015 15:07:49 GMT-0400 (Eastern Daylight Time)

If you used --save to set a default value for an option, you may need to override it by explicitly providing the option with a different value. You can clear any saved settings by running tfx reset.

Troubleshooting

To see detailed tracing output, you can set a value for the TFX_TRACE environment value and then run commands. That may offer a clue into the problem (and will certainly help if logging an issue).

Linux/OSX

export TFX_TRACE=1

Windows

set TFX_TRACE=1

PowerShell

$env:TFX_TRACE=1

Contributing

We take contributions and fixes via Pull Request. Read here for the details.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

tfs-cli's People

Contributors

akbarmdmd avatar bfcamara avatar bryanmacfarlane avatar bworline avatar colindembovsky avatar cschleiden avatar darthwillis avatar deborshinew avatar deborshisaha1988 avatar dmitriibobreshev avatar dwilsonactual avatar ericsciple avatar gaurav42 avatar joaomoreno avatar jtpetty avatar kesane-msft avatar kirill-ivlev avatar konstantintyukalov avatar max-zaytsev avatar mmanela avatar nkirchem avatar nschonni avatar onlyutkarsh avatar scottdallamura avatar sergey-koryshev avatar stephenmichaelf avatar sumitsharma0999 avatar t-hugs avatar vishalkiri avatar willsmythe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tfs-cli's Issues

root is partially ignored for creating packages

I'm creating all the files I want to package up in the dist directory.

$ ./node_modules/.bin/tfx extension create --root dist --output-path Packages
$ cd Packages
$ unzip saucelabs-beta.saucelabs-tasks-0.2.0.vsix
$ md5 ../dist/sod-build-info/scripts/dump.js sod-build-info/scripts/dump.js ../sod-build-info/scripts/dump.js
MD5 (../dist/sod-build-info/scripts/dump.js) = 9b1880b43f26d4fff8d7f7de6b0e5da5
MD5 (sod-build-info/scripts/dump.js) = 6e25b092202ef26e730da592c9c76af2
MD5 (../sod-build-info/scripts/dump.js) = 6e25b092202ef26e730da592c9c76af2

as you can see from the md5 (and i've checked the file contents) its pulling the one from cwd not root.
I don't have any other files my build process is yet messing with (other than vss-extension but its not in the zip).

Is this the right use of --root? Is it a bug?

tfx-cli, tfx, node

If I use:

C:> node tfx-cli ....

Things work...

But I can not get things to work if either:
a) I just use "tfx" as shown in all of the samples
b) I am within node

Milestones

Could we get a list of Milestones for this project? The reason is because the REST API for TFS / online is vast, and although it would be ideal to have this tool support every aspect of that API, reality is that the team here will likely only add support for highest priority features.

What I would like to know are;

  • Are there any aspects of the REST API that simply are not part of the future/long-term plan of this project? That is, you don't even wants us asking about it because it's simply not part of the chatter.
  • Which APIs are slated to be supported next?
  • Would it possible to off-load some of this work to the community? If so, I would prefer the design/development be split into separate issues and tracked individually that way we can have those are more familiar with the design architecture to specify what the CLI API would be like, but we can have others in the community attempt to do the implementation.

For someone may be willing to implement work-item updating, or test management interface could if they 1) knew whether it was even part of the roadmap and 2) what would command-line interface look like.

Under Windows, you can't just type "gulp" to build

If you follow the instructions to build the project, it says just to type 'gulp' to build. That won't work under Windows because the gulp command is in the node_modules.bin\ folder.

The fix is easy. Rather than type:

gulp

instead type:

npm run gulp

However, this requires that the script section of the package.json file be updated as follows:

BEFORE:

"scripts": {
  "test": "gulp test",
},

AFTER:

"scripts": {
  "test": "gulp test",
  "gulp": "gulp"
},

Connection Failed when behind proxy

I'm trying to run the login command whilst behind a corporate proxy and I'm getting the error

Connection failed. Check your internet connection & collection URL.
Message: connect ECONNREFUSED xxx.xxx.xxx.xxx:443

I've tried both basic and PAT auth but it fails with the same error on both. Trace emits:

2016-02-15T13:31:45.639Z : loader.load
TFS Cross Platform Command Line Interface v0.3.13
Copyright Microsoft Corporation
2016-02-15T13:31:45.830Z : Login.exec
2016-02-15T13:31:46.903Z : Connection failed.
2016-02-15T13:31:46.907Z : cache.setItem

I suspect that tfx isn't using my proxy. Is it possible to force it to use a specified proxy?

Login subcommand issue parsing collection url.

Issue Description: Attempts to pass the unnamed collection URL argument results in the argument being parsed as the authtype argument instead.

Usage info specifies: login [--authtype ] [options]

Workarounds: Don't specify the collection URL and let the tool prompt. Also works if pass as a named arg (i.e. --collectionurl ).

Repro Steps:
PS C:> tfx login http://localhost:8080/tfs/defaultcollection
Copyright Microsoft Corporation

Enter collection url > http://mymachine:8080/tfs/defaultcollection
Error: Unsupported auth type: http://localhost:8080/tfs/defaultcollection

Is it possible to use tfs-cli from a node.js script?

I'm creating a node.js script and would like to access TFS via rest. I realize I can make the REST calls directly, but I think it would be better to use tfs-cli because that way I can leverage the built-in authentication, etc.

For instance, after the user does:

tfx login --auth-type basic

they don't have to type in their credentials with each command invocation.

If I created my own tool and accessed the REST api directly, I would have to recreate that somehow.

I can see several ways to solve it.

  1. Expose the internal API used by tfs-cli so that other cli tools can leverage it. Perhaps this is already possible by simply referencing tfs-cli.
  2. Launch a tfx console and pipe the output to my app.
  3. Expose the specific API that I need, such as how to access the authentication that's been stored, but do the rest of the work via rest ourselves.

Thoughts?

Task uploaded but not in tasks list or available for build configuration

This may be due a lack of understanding on my part, but...

I've used the tfx build tasks upload to upload the SqlServerDacpacDeployment task to VSO, which it reported as successful. When I use the tfx build tasks list command though, it doesn't show in the output. However, if I attempt to upload it again, I get back a 409, which I take as confirmation that the task is already there.

I'm also unable to locate the task in configuring a build definition...any thoughts?

Basic auth and HTTPS

Using basic auth with an HTTPS endpoint cause the following error :

tfx login --auth-type basic --service-url https://server/tfs --username user --password pwd
Connection failed. Check your internet connection & collection URL.
Message: unable to get local issuer certificate

It seems to be the same problem I had with Git : http://blogs.msdn.com/b/phkelley/archive/2014/01/20/adding-a-corporate-or-self-signed-certificate-authority-to-git-exe-s-store.aspx
So how I can specify my certificate file ?

(Trace doesn't help, CLI version is 0.3.3)

Error when quoting taskPath parameter with trailing backslash

The following call throws an Specified directory does not exist error:

tfx build tasks upload --taskPath "c:\mytask\"

With the quotes removed it works:

tfx build tasks upload --taskPath c:\mytask\

For path options it should be possible to quote the path (tfx build tasks upload --taskPath c:\my task also throws an Specified directory does not exist error)

When can we expect NTLM support?

So... what does "in a month or so" mean? #20 (comment)

The month seemed short enough that I didn't want to bother implementing it myself, but we could really use the ntlm support soon... anything we can do to help the progress? I'll be happy to test things as well...

invalid credentials rejection from all urls (http and https)

i'm working with on-premise TFS 2015 and am able to create build agents and login to TFX from windows.
from fedora or ubuntu machines i have full access from my browser the server answers to ping nslookup returns the correct server address.
running tfs login --auth-type basic fails (server is configure to accept basic authentication)

**user@machine ~$ tfx login --auth-type basic
2016-02-29T14:55:28.712Z : loader.load
TFS Cross Platform Command Line Interface v0.3.15
Copyright Microsoft Corporation

Service URL: http://serverurl:port/tfs/collection
2016-02-29T14:55:37.279Z : cache.getItem
Username: Domain\Username
Password:
2016-02-29T14:55:53.054Z : Login.exec
2016-02-29T14:55:53.147Z : Connection failed: invalid credentials.
2016-02-29T14:55:53.148Z : cache.setItem
Invalid credentials.
**

I triple checked the credentials and tried accessing with CURL - same result
BTW - with SSL i have to run** export NODE_TLS_REJECT_UNAUTHORIZED="0"**
otherwise i get:
Connection failed. Check your internet connection & collection URL.
Message: certificate not trusted

i really want to pick TFS vNext as my primary cross platform CI system (using TFS since 2012)
Please advise.

For tfx login command with on-premises specifying server url and not collection url succeeds but causes errors later

When using the login command you are prompted for a collection url but are able to specify the server url without an error condition being raised (i.e http://server:8080/tfs instead of http://server:8080/tfs/collection )

You are able to successfully login but then when issuing commands such as tfx build list you get strange errors and it is not clear why. Once the actual collection URL is specified instead everything works as expected.

I would recommend alerting the user if they are not specifying a collection url.

Cannot run tfx with node 0.1.0

on fedora 23 nodejs stable is 0.1.0 when installing tfx-cli according to Readme instructions i get
an error that lead me to find that i need node 0.1.2 - after installation everything worked OK.
Please add this to the docs.

2016-02-10T13:22:12.526Z : TypeError: Object # has no method 'parse'
2016-02-10T13:22:12.526Z : at /usr/lib/node_modules/tfx-cli/_build/app/lib/command.js:42:35
2016-02-10T13:22:12.526Z : at Array.forEach (native)
2016-02-10T13:22:12.526Z : at /usr/lib/node_modules/tfx-cli/_build/app/lib/command.js:37:15
2016-02-10T13:22:12.526Z : at _fulfilled (/usr/lib/node_modules/tfx-cli/node_modules/q/q.js:834:54)
2016-02-10T13:22:12.526Z : at self.promiseDispatch.done (/usr/lib/node_modules/tfx-cli/node_modules/q/q.js:863:30)
2016-02-10T13:22:12.526Z : at Promise.promise.promiseDispatch (/usr/lib/node_modules/tfx-cli/node_modules/q/q.js:796:13)
2016-02-10T13:22:12.526Z : at /usr/lib/node_modules/tfx-cli/node_modules/q/q.js:604:44
2016-02-10T13:22:12.526Z : at runSingle (/usr/lib/node_modules/tfx-cli/node_modules/q/q.js:137:13)
2016-02-10T13:22:12.526Z : at flush (/usr/lib/node_modules/tfx-cli/node_modules/q/q.js:125:13)
2016-02-10T13:22:12.526Z : at process._tickCallback (node.js:442:13)
TypeError: Object # has no method 'parse'

Overwrite option

Hi,

what is precisely the overwrite option doing on the build task upload?

Thanks

Internal Server Error(500) on task upload for task that was deleted

I get "Internal Server Error(500)" when I try to upload a task on TFS 2015 (on-premise).

  • Task was deleted before successfully
  • Client and TFS server

E:\dev\Tfs\Tasks\vso-agent-tasks>tfx build tasks upload Tasks\DeployVisualStudioTestAgent
2015-09-24T13:00:32.826Z : loader.load
2015-09-24T13:00:32.829Z : build-list.js
2015-09-24T13:00:32.830Z : build-queue.js
2015-09-24T13:00:32.830Z : build-show.js
2015-09-24T13:00:32.830Z : build-tasks-create.js
2015-09-24T13:00:32.831Z : build-tasks-delete.js
2015-09-24T13:00:32.831Z : build-tasks-list.js
2015-09-24T13:00:32.831Z : build-tasks-upload.js
2015-09-24T13:00:32.832Z : build-tasks.js
2015-09-24T13:00:32.832Z : build.js
2015-09-24T13:00:32.832Z : help.js
2015-09-24T13:00:32.833Z : login.js
2015-09-24T13:00:32.833Z : parse.js
2015-09-24T13:00:32.833Z : resources
2015-09-24T13:00:32.834Z : version.js
2015-09-24T13:00:32.834Z : loader.match
2015-09-24T13:00:32.835Z : Command matched
2015-09-24T13:00:32.835Z : No command matched
2015-09-24T13:00:33.000Z : loaded C:\Users\qml\AppData\Roaming\npm\node_modules\tfx-cli\exec\build-tasks-upload.js
Copyright Microsoft Corporation

2015-09-24T13:00:33.001Z : loader.getCollectionUrl
2015-09-24T13:00:33.002Z : loader.getCachedUrl
2015-09-24T13:00:33.006Z : Retrieved collection url from cache
2015-09-24T13:00:33.007Z : url: http://ws100:8080/tfs/DefaultCollection
2015-09-24T13:00:33.007Z : inputs.check
2015-09-24T13:00:33.008Z : auth.getCredentials
2015-09-24T13:00:33.008Z : auth.getCachedCredentials
2015-09-24T13:00:33.010Z : Retrieved credentials from cache
2015-09-24T13:00:33.011Z : Using basic creds
2015-09-24T13:00:33.013Z : build-task-upload.exec
2015-09-24T13:00:33.013Z : tfcommand.checkArguments
2015-09-24T13:00:33.014Z : inputs.check
2015-09-24T13:00:33.014Z : taskPath: Tasks\DeployVisualStudioTestAgent
2015-09-24T13:00:33.015Z : task.json path: E:\dev\Tfs\Tasks\vso-agent-tasks\Tasks\DeployVisualStudioTestAgent\task.json
2015-09-24T13:00:33.015Z : Validating task json...
2015-09-24T13:00:33.018Z : Json is valid.
2015-09-24T13:00:33.023Z : Initializing agent API...
2015-09-24T13:00:33.196Z : TaskAgentApi.uploadTaskDefinition failed with code 500. Message: Failed Request: Internal Server Error(500) - http://ws100:8080/tfs/_apis/distributedtask/tasks/52A38A6A-1517-41D7-96CC-73EE0C60D2B6?overwrite=false
Error: Failed Request: Internal Server Error(500) - http://ws100:8080/tfs/_apis/distributedtask/tasks/52A38A6A-1517-41D7-96CC-73EE0C60D2B6?overwrite=false

E:\dev\Tfs\Tasks\vso-agent-tasks>

Any suggestions?

I cannot run tfx after installation

What have I missed, I've followed the instructions from the document by installing on a Windows 10 machine via the command prompt:

npm install -g tfx-cli, the installation seems to work but any attempts to run tfx simply returns tfx is not recognised as an internal or external command, operable program or batch file.

I've also tried running the install from a command window as Administrator with the same result.

Using in gulp task

I want to build an extension in an gulp task. Is there already a gulp plugin or node module available to build the extension? I see that the tfx utility build on top of vso-node-api but it still seems like quite a bit of logic involved in tfx.

needs Manage permissions to perform the action

When I try to upload the task, I get this error. Where is documentation on what exact perms are required for a user to be able to upload task. we have fine grain access control on our vso subscription.
Can this error message be modified to be little specific on what role perms needed? instead of such generic error?

Error: Failed Request: Forbidden(403) - Access denied. needs Manage
permissions to perform the action. For more information, contact the Team Found
ation Server administrator.

Introduce the silent mode

As far as I can tell, the tool can only login interactively. If I specify a collection URL in the command line, it still prompts for it. Do you think it makes sense to introduce the silent mode?

Here is the scenario. I'm working on a custom build step, and each time I push I'd like my CI server to 'tfx build tasks upload' my step to the playground TFS instance. Does it make sense?

Please, let me know if I'm missing anything. Thanks!

Where build agent with versio 1.88 can be downloaded?

Hello everyone.

I'm using on-premise TFS 2015. I've learned about great feature - logging commands (https://github.com/Microsoft/vso-agent-tasks/blob/master/docs/authoring/commands.md), and wanted to use it in our build process. But when I tried to use it - there was no effect (build number does not changed). Then after googling I found that newer build agent version is needed: microsoft/azure-pipelines-tasks#380 (comment)

TFS now has 1.83 agents, but I need 1.88.

So, the questions are:

  • Is new agent version available for download from somewhere?
  • If not, it means, that to get updated agents we need upgrade entire TFS? And we need to wait untill Update 1 is released (but VSO users get their agents updated automatically)?
  • If we need to wait for Update 1, when it will be released?

Thanks.

tfx --version prints wrong version

I just updated to the recently released 0.3.5 version. Globally installed tfx module has version 0.3.5 in its package.json and it also contains the fixes contained in this version.

But if I run tfx --version is still prints 0.3.4. It seems to always be one patch version off (while I had installed 0.3.4 it printed 0.3.3)

Unable to login with on premises

Hello,

I have enabled Basic authentication on TFS, created a local user account, and am able to log in with that from my browser.

When trying to log in with tfx login --authtype basic, I receive:

Error: Connection failed. Check your internet connection & collection URL.
Message: Failed Request: Internal Server Error(500) - [colleciton URL]/_apis/connectionData

If I visit [collection URL]/_apis/connectionData in my browser, I receive a JSON response which describes the user I created, in particular, NOT a 500 error.

Error on tfx login after update to 0.1.9

After login to the latest version I now get the following error on tfx login:

Message: Failed Request: Not Found(404) - https://mytenant.visualstudio.com/DefaultCollection/My%20Collection/_apis/connectionData

It worked with the previous version with the same collection url / access token

GitVersion returning different version numbers on local repo vs Build agent repo

I posted this question on StackOverflow (http://stackoverflow.com/questions/33946642/what-could-make-gitversion-compute-a-different-version-on-the-same-branch-local) and was wonder if you guys could shed any light on how the repos could be different (local = VS 2015 clone, build agent = Build.VNext clone) - same git version, that would lead to git version not picking up the tag?

Please let me know what other info I can provide. I'm running an on premise TFS 2015 so only have the agents that are in that release and not the ones in the VSO releases.

Thanks.

bin/tfx is using dos line endings

bin/tfx is in windows mode
which gives me
env: node\r: No such file or directory
on the mac

I'm not sure if the file is being uploaded to npm or not, but I'm under the impression npm installs it
Using npm:
2.14.7

With invalid project collection address logged in successfully message

Here is a piece of a session, as you can see I've specified an invalid url, and typed random chars for password, but I still got a logged in successfully message. I think that the tool does not detect when the collection url is invalid.

PS C:\WINDOWS\system32> tfx login --authtype basic
Copyright Microsoft Corporation

Enter collection url > http://pippo.com
Enter username > alkampfer
Enter password >
logged in successfully

Support overwrite on uploading task

Currently the overwrite parameter for uploadTaskDefinitionis fix set to false. For custom build tasks it would be useful if this can be overwritten from the command line

tfx extension / differences from VSET

Missing/changed

  1. VSET package (not tfx extension create, which makes me think it's going to seed a new, empty extension for me)
  2. VSET package -m xxx.json (have to specify --manifest-globs, which is about the longest command line argument name ever)

Hmmm

  1. tfx extension create has publisher and extension-id ... both should end with -in or neither should.

Add command for clearing build task cache

It seems like VSO has a cache for build tasks, since if an updated version of the same build task is uploaded to the same tenant, VSO still takes the old version. Even after a Delete and a new Upload.

The only solution at the moment to have changes taking effect during development is by increasing the patch version. This is not ideal since this messes with the released version number (especially if multiple developers work parallel on the same task)

It would be helpful if tfx could provide a command for clearing the build task cache.

Agent auto update

Hi,

I just installed the Update 1 RC1 on my on-premise TFS 2015. I was looking for the new build agent version and build tasks. I noticed that the auto-update functionality is not working as expected.

My case:
I have two agents in default pool, one added before the Update 1, version 1.83.2 called Agent1, and one added post Update 1 version 1.89.0 called Agent2.
If I do try to right click the agent pool and choose Update all Agents, I do see my Agent2 going offline (changing color to red) and back online (getting to green). The same is not true for Agent 1. Reported agent one stays the same and it doesn't update.
I tried also restarting the service on my build machine but no luck.
I do see in the agent folder some changes although. There is a folder called agent.old which contains the, what appears, the old version of vsoagent and service executable and worker. I do also see that the windows service running for Agent1 is not pointing to the executable in the agent.old folder, but at the executable in agent folder.
Is this a bug in tfs reporting the wrong version of the agent? How can I get the version of the agent, maybe in my custom build task by reading a value or something similar?

Thanks

build task create skips friendly name and fails

First i've tried the current version on npm and tried to create a build task:

>tfx build tasks create
Copyright Microsoft Corporation

Enter short task name > sample
sample
Enter friendly name >
unhandled:
TypeError: Cannot read property 'toString' of null
    at AppData\Roaming\npm\node_modules\tfx-cli\lib\inputs.js:70:65
    at Interface.onLine (AppData\Roaming\npm\node_modules\tfx-cli\node_modules\read\lib\read.js:111:5)
    at emitOne (events.js:77:13)
    at Interface.emit (events.js:169:7)
    at Interface._onLine (readline.js:210:10)
    at Interface._line (readline.js:546:8)
    at Interface._ttyWrite (readline.js:830:16)
    at ReadStream.onkeypress (readline.js:105:10)
    at emitTwo (events.js:87:13)
    at ReadStream.emit (events.js:172:7)

Here i just typed 'sample', hit enter, it got echoed back, it skipped the friendly name input and failed with the exception.

I've then build master @e438b2904d6a96aca84e35679a0260851a851259

>tfx build tasks create
Copyright Microsoft Corporation

Enter short task name > sample
sample
Enter friendly name >
Enter description > sample
Enter author > sample
Error: friendlyname is required.

Which then echoed the first sample back and skipped friendly name again, finally failing with friendlyname is required

With trace turned on:

>tfx build tasks create
2015-08-16T20:48:47.376Z : loader.load
2015-08-16T20:48:47.378Z : build-list.js
2015-08-16T20:48:47.378Z : build-queue.js
2015-08-16T20:48:47.379Z : build-show.js
2015-08-16T20:48:47.379Z : build-tasks-create.js
2015-08-16T20:48:47.379Z : build-tasks-delete.js
2015-08-16T20:48:47.379Z : build-tasks-list.js
2015-08-16T20:48:47.379Z : build-tasks-upload.js
2015-08-16T20:48:47.379Z : build-tasks.js
2015-08-16T20:48:47.379Z : build.js
2015-08-16T20:48:47.380Z : help.js
2015-08-16T20:48:47.380Z : login.js
2015-08-16T20:48:47.383Z : parse.js
2015-08-16T20:48:47.383Z : resources
2015-08-16T20:48:47.386Z : version.js
2015-08-16T20:48:47.386Z : loader.match
2015-08-16T20:48:47.393Z : Command matched
2015-08-16T20:48:47.393Z : No command matched
2015-08-16T20:48:47.404Z : loaded AppData\Roaming\npm\node_modules\tfx-cli\exec\build-tasks-create.js
Copyright Microsoft Corporation

2015-08-16T20:48:47.405Z : build-create.exec
2015-08-16T20:48:47.405Z : tfcommand.promptArguments
2015-08-16T20:48:47.406Z : inputs.prompt
Enter short task name > sample
sample
2015-08-16T20:48:52.709Z : read: sample
Enter friendly name >
2015-08-16T20:48:52.711Z : read: null
Enter description > sample
2015-08-16T20:48:59.027Z : read: sample
Enter author > sample
2015-08-16T20:49:00.139Z : read: sample
2015-08-16T20:49:00.140Z : friendlyname is required.
2015-08-16T20:49:00.141Z : Failed to gather inputs. Message: friendlyname is required.
Error: friendlyname is required.

tfx extension publish shows incorrect "sharing" status

Just updated a public extension, tfx extension publish shows this after publishing:

=== Completed operation: publish extension ===

  • Packaging: XXXXX
  • Publishing: success
    * - Sharing: not shared (use --share-with to share)*

I have also updated private extensions and it incorrectly indicates the extension is not shared, even though it has previously (and is currently) shared with multiple accounts.

tfx extension create - contributions shouldn't be required if item type is "Integration"

For Integration items, which are items that in its manifest specify target Microsoft.VisualStudio.Services.Integration, the extension commands (create or publish) shouldn't be requiring at least one contribution.

Integration items can specify only market artifacts (icons, markdowns, etc.) and a Action URL to point to a page explaining how to setup the integration.

Cannot read property 'value' of null

When trying to list or upload a task I get the following error message:

steven-imac:Tasks Steven$ tfx build tasks list
Copyright Microsoft Corporation

unhandled:
TypeError: Cannot read property 'value' of null
    at /usr/local/lib/node_modules/tfx-cli/node_modules/vso-node-api/VsoClient.js:101:60
    at processResponse (/usr/local/lib/node_modules/tfx-cli/node_modules/vso-node-api/RestClient.js:56:9)
    at /usr/local/lib/node_modules/tfx-cli/node_modules/vso-node-api/RestClient.js:164:13
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/tfx-cli/node_modules/vso-node-api/HttpClient.js:120:17)
    at emitNone (events.js:72:20)
    at IncomingMessage.emit (events.js:166:7)
    at endReadableNT (_stream_readable.js:903:12)
    at doNTCallback2 (node.js:439:9)
    at process._tickCallback (node.js:353:17)

The message isn't clear so I am unsure what is causing this.

I have logged in successfully with tfx and have tried this on both windows and mac where these messages are coming out

Here is the same command with trace turned on:

steven-imac:Tasks Steven$ tfx build tasks list
2015-10-15T17:39:29.197Z : loader.load
2015-10-15T17:39:29.199Z : build-list.js
2015-10-15T17:39:29.199Z : build-queue.js
2015-10-15T17:39:29.199Z : build-show.js
2015-10-15T17:39:29.199Z : build-tasks-create.js
2015-10-15T17:39:29.199Z : build-tasks-delete.js
2015-10-15T17:39:29.199Z : build-tasks-list.js
2015-10-15T17:39:29.199Z : build-tasks-upload.js
2015-10-15T17:39:29.199Z : build-tasks.js
2015-10-15T17:39:29.200Z : build.js
2015-10-15T17:39:29.200Z : help.js
2015-10-15T17:39:29.200Z : login.js
2015-10-15T17:39:29.200Z : parse.js
2015-10-15T17:39:29.200Z : resources
2015-10-15T17:39:29.200Z : version.js
2015-10-15T17:39:29.200Z : loader.match
2015-10-15T17:39:29.200Z : Command matched
2015-10-15T17:39:29.200Z : No command matched
2015-10-15T17:39:29.202Z : loaded /usr/local/lib/node_modules/tfx-cli/exec/build-tasks-list.js
Copyright Microsoft Corporation

2015-10-15T17:39:29.202Z : loader.getCollectionUrl
2015-10-15T17:39:29.202Z : loader.getCachedUrl
2015-10-15T17:39:29.207Z : Retrieved collection url from cache
2015-10-15T17:39:29.207Z : url: http://tfs:8080/tfs
2015-10-15T17:39:29.207Z : inputs.check
2015-10-15T17:39:29.207Z : auth.getCredentials
2015-10-15T17:39:29.208Z : auth.getCachedCredentials
2015-10-15T17:39:29.208Z : Retrieved credentials from cache
2015-10-15T17:39:29.209Z : Using basic creds
2015-10-15T17:39:29.211Z : build-tasks-list.exec
2015-10-15T17:39:29.211Z : Initializing agent API...
2015-10-15T17:39:29.211Z : tfcommand.checkArguments
2015-10-15T17:39:29.211Z : inputs.check
2015-10-15T17:39:29.212Z : Searching for build tasks...
unhandled:
TypeError: Cannot read property 'value' of null
    at /usr/local/lib/node_modules/tfx-cli/node_modules/vso-node-api/VsoClient.js:101:60
    at processResponse (/usr/local/lib/node_modules/tfx-cli/node_modules/vso-node-api/RestClient.js:56:9)
    at /usr/local/lib/node_modules/tfx-cli/node_modules/vso-node-api/RestClient.js:164:13
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/tfx-cli/node_modules/vso-node-api/HttpClient.js:120:17)
    at emitNone (events.js:72:20)
    at IncomingMessage.emit (events.js:166:7)
    at endReadableNT (_stream_readable.js:903:12)
    at doNTCallback2 (node.js:439:9)
    at process._tickCallback (node.js:353:17)

"tfx --version" does not report version information.

I found the version through the npm ls command. "[email protected]".

The output I get from tfx is the following;

C:\Users\jason>tfx --version
Copyright Microsoft Corporation

tfx <command> [<subcommand(s)> ...] [<args>] [--version] [--help] [--json]

                        fTfs
                      fSSSSSSSs
                    fSSSSSSSSSS
     TSSf         fSSSSSSSSSSSS
     SSSSSF     fSSSSSSST SSSSS
     SSfSSSSSsfSSSSSSSt   SSSSS
     SS  tSSSSSSSSSs      SSSSS
     SS   fSSSSSSST       SSSSS
     SS fSSSSSFSSSSSSf    SSSSS
     SSSSSST    FSSSSSSFt SSSSS
     SSSSt        FSSSSSSSSSSSS
                    FSSSSSSSSSS
                       FSSSSSSs
                        FSFs    (TM)

commands:
   build
        manage task extensions and builds

   help
        command help

   login
        login and cache credentials. types: pat (default), basic
        login <collection url> [--authtype <authtype>] [options]

   parse
        parse json by piping json result from another tfx command
        parse <jsonfilter> [options]


Options:
   --version : output the version
   --help    : get help on a command

Windows 8.1. NPM install of 0.1.9.

The CLI doesn't allow entering friendly name

Using latest version of the CLI and trying to create a new build task.

When entering the short name for the task, the CLI skips the friendly name, then complains the friendly name is missing.

workitem query --help incomplete

"workitem query --help" is incomplete. It needs to specify that --project is an argument.
And there's no mention of the --query argument.

Conflict / overwrite - IIS Web AppDeploy

So, i was messing around with this, trying to get with one of the VSO agent tasks uploaded; the IISWebAppDeploy.

Not sure what's going on but,

Error: Failed Request: Conflict(409) - https://*.visualstudio.com/_apis/distributedtask/tasks/89A3A82D-4B3E-4A09-8D40-A793849DC94F?overwrite=false

I fired a command up for the IISWebAppDeploy script. From the build output directory that i took from the vsoAgent git repo.

I do a build tasks list, and the code 89A3A82D-4B3E-4A09-8D40-A793849DC94F doesn't exist. Can't find it anywhere, checked the UX and it doesn't seem to have it.

I checked the task.json, and it is the right one, i'm just wondering why it think it's already there.

{
"id": "89A3A82D-4B3E-4A09-8D40-A793849DC94F",
"name": "IISWebAppDeployment",
"friendlyName": "IIS Web Application Deployment",
"description": "Deploy Web Application using MSDeploy to IIS Web Site",
"helpMarkDown": "More Information",
"category": "Deploy"
}

And when i go to use ./Chef and upload it, it says Task at : ./Chef has succeeded upload, etc..
But going to the UX and the tasks list, doesn't show chef at all.

Cache maybe? On the ux end?

How to log into local team foundation server.

The examples on the main page show how to log into visual studio online. What is the process for logging into an uploading a task for use on an team foundation server local installation?

I am currently stuck at logging into the tfs local machine with the command tfx login. Even using basic auth fails to log me in.

Passing "/" in username field to "tfx login --authType basic" causes crash

The command line was:

tfx login --authType basic

Then I entered the following by mistake:

Enter collection url > http://localmachine:8080/tfs/DefaultCollection
Enter username > domain/user

Which resulted in:

unhandled:
TypeError: Cannot read property 'toString' of null
    at C:\Users\AppData\Roaming\npm\node_modules\tfx-cli\lib\inputs.js:70:65
    at Interface.onLine (C:\Users\AppData\Roaming\npm\node_modules\tfx-cli\node_modules\read\l
ib\read.js:111:5)
    at Interface.emit (events.js:107:17)
    at Interface._onLine (readline.js:214:10)
    at Interface._line (readline.js:553:8)
    at Interface._ttyWrite (readline.js:830:14)
    at ReadStream.onkeypress (readline.js:109:10)
    at ReadStream.emit (events.js:110:17)
    at readline.js:1175:14
    at Array.forEach (native)

I would expect to report an error to standard error that the input was invalid.

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.