Closed rfennell closed 6 years ago
Hi @rfennell
thanks for your feedback. Your configuration looks correct, there seems to be an issue when checking the result of the awaited build however. I was able to reproduce a similar problem in my environment.
Something seems to be strange, as you can clearly see int he log that it is detecting that the build failed and it is trying to fail the task: "Build 1735 was not successful - failing task." Seems like it "fails to fail the task"...
I will look into that and let you know once i found a solution and updated the Task.
Thanks for the quick response, I will keep an eye open for future releases.
FYI: Usually happy to help test anything, but I will be going off line for a few weeks from Monday, so apologises in advance for my silence. I know it can be irritating on my OSS projects when an issue is raised and the person who raises it is unresponsive to follow up questions.
So feel free to close this issue when you are happy its sorted
No problem, thanks for raising the issue and help improve the task :-)
Thanks for this announcement as well, I think i'll look into it tomorrow, so if you have time over the weekend there might be a new version already.
I suspect there is some timing issue related to the async execution of the method that should fail the task. In the logs you can see that the task-result is set to succeeded before the line is printed that says that it actually should fail. I will investigate tomorrow into this and if this really is the problem it should be a simple fix.
Hi @rfennell I know updated the Task to version 2.4.3 which should fix the issue that the result is set to Succesful even though the task internally ran into an error. In case you're still around and could verifiy it please let me know if it's working as expected or not.
Tested it and it now behaves as expected, thanks for the quick fix
Can I check my understanding of how your trigger build task should function when the triggered build fails?
I am running on VSTS with Version 2.4.2 of your task.
I have added a Trigger Build task to a release, as a test the build triggered is set to fails i.e. it contains a single PowerShell task with the inline script 'write-error "this will fail the build'.
The release logs are as follows
The ##[debug]task result: Succeeded seems at odds with the REST call for the build status once the build has completed which shows.
I am assuming I am just missing something obvious, or misunderstood how the task works. Do I have a parameter on the Trigger Build task wrong or do I need to make a check on an extra check on some output variable?