Reputation: 51
Need your help on TFS build for one of my apps
I have a copy file task in my build which copies the file from SourceFolder$(Build.SourceDirectory)/DataBase/Scripts
to targetFolder $(Build.ArtifactStagingDirectory)/DataBase/Scripts
.
This works fine if scripts are present in the Source location but fails when there are no files. I need my build to succeed in any case, even if files are not present.
Upvotes: 2
Views: 1564
Reputation: 72191
You could use continueOnError
on that particular build step and set it to true
, so it doesn't cause the job to be reported as failed, if it fails.
Upvotes: 3
Reputation: 31083
If no files in Source Folder Scripts
, the task will still report success. If the Source Folder Scripts
doesn't exist, the task will report fail as build agent can not find the folder. This is an expected behavior, if the source folder doesn't exist and it reports success, you'll get incorrect result if you type wrong folder name.
Upvotes: 2