Description

It'd be nice to have a checkbox option for the [ArtifactDeployer] plugin to cause the build to fail if the artifacts specified in the "Files to deploy" field do not exist. The current behavior of the plugin is to succeed even if there are zero artifacts matching the specified file/wildcard expression.

Attachments

Activity

Like ArtifactDeployer enables you to specify several sections of 'Files to deploy', do you want an option for each section or a global option?
In first use-case, build fails only if there are no maching files and the option (checkbox) is selected.
In the second use-case, the build fails only if the option is selected and there is at least one section that doesn't meet the conditions (no matching files).

Gregory Boissinot
added a comment - 2012-09-28 19:58 Like ArtifactDeployer enables you to specify several sections of 'Files to deploy', do you want an option for each section or a global option?
In first use-case, build fails only if there are no maching files and the option (checkbox) is selected.
In the second use-case, the build fails only if the option is selected and there is at least one section that doesn't meet the conditions (no matching files).

I'm thinking if the 'Files to deploy' expression does not match any files relative to the $WORKSPACE, the option, if selected, should trigger a build failure. For example, the following expression could trigger a build failure if no .jar files were present under the 'output' directory:

output/*.jar

This new option, 'Fail build if there are no files to deploy' could be added within the 'Advanced...' button options for the 'Files to deploy' field. The problem we're having is that if there are zero files to deploy, the ArtifactDeployer plugin currently indicates that zero artifacts being deployed is a success condition. I'd be useful to have an option to say that, if no artifacts were found to deploy, some error prevented the artifacts from being available for deployment when they were expected per the build configuration.

Brent Duffy
added a comment - 2012-09-29 02:13 Hi Gregory,
I'm thinking if the 'Files to deploy' expression does not match any files relative to the $WORKSPACE, the option, if selected, should trigger a build failure. For example, the following expression could trigger a build failure if no .jar files were present under the 'output' directory:
output/*.jar
This new option, 'Fail build if there are no files to deploy' could be added within the 'Advanced...' button options for the 'Files to deploy' field. The problem we're having is that if there are zero files to deploy, the ArtifactDeployer plugin currently indicates that zero artifacts being deployed is a success condition. I'd be useful to have an option to say that, if no artifacts were found to deploy, some error prevented the artifacts from being available for deployment when they were expected per the build configuration.
Thanks for your quick response!

Brent Duffy
added a comment - 2012-10-08 14:38 Hi Gregory,
I tested the updated plugin, artifactdeployer-0.24-SNAPSHOT.hpi, and it looks like it works perfectly!
Thanks so much for adding this feature!