Build succeeds even if artifact publishing fails
- Bamboo v6.2.5
- Create a plan (i.e PROJ-PLAN)
- Add a Script task
- Create a Artifact Definition
Name Location Copy pattern My Artifact **/*
- Build should fail since there is no artifact to be published.
The following gets displayed in build log:
And the build succeeds.
- Have a script task at the end of the build to check if there is any file(artifact) generated or not and fail the build if not.
Please note: The above code is bash compatible and is only for reference (You may have to script it when using Windows or any other OS). You could change this code as per your requirement to look for specific files as well.