Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Success reported even if repository provisioner is unable to retrieve artifact #50

Open
TimothyScales opened this issue Mar 11, 2020 · 1 comment

Comments

@TimothyScales
Copy link

If the repository provisioner is unable to retrieve the requested artifact from the source repo, it incorrectly returns a success exit code.
In MavenRepositoryProvisioner.java the reportResults() method first checks for a retrieval failure and correctly sets the value of "provisioningSuccess". It then checks for a deployment failure; if nothing was retrieved, deployment never executes, and as a result never fails, so no deployment failure is reported. At this point, the value of "provisioningSuccess" is overwritten by the "success" code from the (non-)deployment, which causes the utility to return 0 (Success) despite its failure to read from the source repository (it does log the failed retrieval to the console, however).
This is a problem when using the repository provisioner to automatically copy several files between repos inside an unattended app which needs to respond appropriately to a failure.

@mosabua
Copy link
Member

mosabua commented Mar 11, 2020

You could supply a patch that allows it to fail in a more explicit way. This will be tricky since there are always lots of artifacts missing in source repos (like pom files or source or javadoc files and so on).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants