Closed stevehoek closed 6 years ago
Hi @stevehoek
thanks for reporting this. Could you please tell me which version of the Task you are using and if you are using VSTS or on prem TFS (and the version if you use on prem).
Thanks :-)
Hi @huserben
We are using the latest version of the task (2.2.1) with an on-prem TFS 2017 server
Thanks, -Steve
Hi Steve
hmm ok, usually this is a problem with authentication (however the last version should have improved the logging of that...maybe i missed something there.)
As you are using a personal access tokens, are you sure the correct rights are set for it? It needs Build (read and execute).
Otherwise how does your configuration of the Task look like? Are you using any conditions or awaiting the build to finish?
Edit: I just uploaded a new version of the task and tried to improve logging a bit, so maybe you could try again and we would see a bit more information. If it is really a problem of Authentication, you could try to for now switch to the OAuth Token and see if this works, at least we would have located the problem. In case you wanna use the OAuth Token you would need to enable the build to access the OAuth token (see documentation of the task).
Hi @huserben
No, we don't have much setup on the task anymore - originally we did but we stripped things out in an effort to debug what was happening.
Our thinking was also that it could have something to do with authentication. We added a PAT of the user who configured the agents, and that user should be part of the Build Admin group so I assume they have Build (read/execute) rights. We will check further.
Here is our task configuration:
Hi
ok, however you can set different scopes for all the PAT's you define:
Maybe there something went sideways (for me now the default was "All Scopes" which should work). Other problem could be that the token has expired, this you could see in the token overview if it's acctive or revoked or expired.
The configuration really doesn't look too special, so I would try once with the OAuth token to verify it's really the autentication, then we could try and further investigate why the PAT wasn't working or figure out what else it could :-)
Hi @huserben
The PAT scope was the issue! Thanks for the help! We were using the same PAT we generated for managing the Agent Pools, so it did not have the build read/execute right.
While I have your attention... it would be nice if each build could have its own depend list... we have Windows and Mac builds, and they need different pre-req dependencies.
Cheers, -Steve
Hi @stevehoek
ok very good to know.
If you want to have different dependencies/conditions I would simply create 2 tasks instances. Solving this in one task would require some special syntax and then it gets quite complex to configure.
Is there something that would speak against having two tasks instead of one?
Hi, We're trying to use this extension and it always fails with a generic error:
We have simplified the options that we originally wanted to use, and it seems like it is failing in the actual triggerBuild call... perhaps in the REST wrapper that tries to get the Id from the build name?
We are trying to trigger 2 builds, one for Mac and the other for Windows, but even when we just list the Windows build as the build to trigger we get the same error.
Any ideas on what we can check?