ctron / package-drone-jenkins

A Package Drone Plugin for Jenkins
3 stars 4 forks source link

better errors if unconfigured #6

Closed CptMauli closed 7 years ago

CptMauli commented 8 years ago

If you add the package drone deployer and don't configure it in any way, this exception happens:

Package Drone Server URL: null
Uploading using Package Drone V2 uploader
ERROR: Build step failed with exception
java.lang.NullPointerException
    at java.net.URI$Parser.parse(URI.java:3042)
    at java.net.URI.<init>(URI.java:588)
    at org.apache.http.client.utils.URIBuilder.<init>(URIBuilder.java:80)
    at de.dentrassi.pm.jenkins.UploaderV2.makeUrl(UploaderV2.java:67)
    at de.dentrassi.pm.jenkins.UploaderV2.upload(UploaderV2.java:104)
    at de.dentrassi.pm.jenkins.DroneRecorder$UploadFiles.invoke(DroneRecorder.java:312)
    at de.dentrassi.pm.jenkins.DroneRecorder$UploadFiles.invoke(DroneRecorder.java:228)
    at hudson.FilePath.act(FilePath.java:990)
    at hudson.FilePath.act(FilePath.java:968)
    at de.dentrassi.pm.jenkins.DroneRecorder.perform(DroneRecorder.java:213)
    at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
    at hudson.model.Build$BuildExecution.post2(Build.java:185)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
    at hudson.model.Run.execute(Run.java:1763)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:410)
Build step 'Package Drone Deployer' marked build as failure

If the plugin is not configured, it should provide a nicer error message.

nfalco79 commented 7 years ago

this was fixed