huserben / TfsExtensions

Extensions for TFS 2015+ such as custom Widgets (require TFS 2017) and Build Tasks
MIT License
44 stars 22 forks source link

Can you use Trigger Build with just VSTS and Github? #71

Closed JDCurran closed 6 years ago

JDCurran commented 6 years ago

Hi!

I am trying to trigger a VS MSTest solution build after dev deploys. I have the trigger at the end of the deploy and I keep getting authentication error with TFS. The issue is we do not use TFS. We are VSTS and Git. Is there a way to get around this? It looks like the plugin is using TFS API so I am guessing that is why it cannot log in. Thanks!

huserben commented 6 years ago

Hi @JDCurran

the task works with both TFS and VSTS. Did you read through the section Authentication Options on https://marketplace.visualstudio.com/items?itemName=benjhuser.tfs-extensions-build-tasks? What kind of authetentication did you setup?

JDCurran commented 6 years ago

Yes, I have read through that and also checked the issue one person had with authentication failure. I tried using Oauth but get authentication failed message - It says it can not log into TFS which we do not use. That is what led me to believe it would not work for me.

huserben commented 6 years ago

ok, that might be just a bad log message on my side then, sorry for the confusion. So it definetly works with both, TFS and VSTS.

So for OAuth to work you have to make sure that scripts have access to it (Can be found in the agent phase properties). As well please make sure that the "password" field is empty when selecting OAuth.

If this doesn't help, what you could do is try to queue the build and setting the system.debug variable to true, which should give more output which might be helpful in locating the problem.

JDCurran commented 6 years ago

OK so I am slapping myself right now :-). All I had to do was check off the enable scripts access - BINGO! Thanks so much! This is awesome stuff here :-).

huserben commented 6 years ago

If it helps, it happened to me as well more than once already :-)

If you happen to have another question, find a bug or a proposal for improvement of the tag, please don't hesitate to open another issue.