[FIXED JENKINS-21624] Misconfiguration leads to error.

If the "Attached archived artifacts" option is selected, but no
artifacts are configured to be archived by the job, the upload
fails with a `NullPointerException`.

Instead, we should detect that case and log a message indicating
that nothing is going to be uploaded.