Closed jlbaptista closed 5 years ago
Hi José,
thanks for reporting this issue. I quickly checked the code and saw that we had a bug in the post-job script that does the actual cleanup. The Post Build Cleanup task has two phases. There is the task itself which you can control using the execution control options you mentioned. The task checks the clean option and then sets an internal variable based on which the post-job script does the cleanup.
Our post-job script checked the variable for an explicit false which meant that the cleanup would run even if the variable wasn't set at all. I have just fixed this bug and pushed the new code into our release pipeline. Once one of my colleagues approves my PR, you should see the new version in the marketplace.
Happy building, René
The fixed version (3.0.7) is online now. I'm cloisng the issue for now. If you still have problems with the new version, feel free to open a new ticket or send us an email.
Happy building, René
I've tried to have the Post Build Cleanup task only run when the build succeeds or is canceled, but regardless of the build status, the task always run. I've tried the following custom conditions:
in(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues', 'Canceled')
or(succeeded(), canceled())
But none of them worked. The other options seem to work correctly. Am I missing some detail here?