Jenkins jobs have two sets of job retention policies: one for builds and one for build artifacts. The former seems to be designed to manage the build logs and history cached by Jenkins. The latter seems to be meant for managing the build artifacts produced by said build.
Currently it appears that the artifact deployer plugin is designed to only look at the retention policy for builds and it ignores the retention policy for artifacts. This seems wrong to me.
Example use case
Suppose you want to have a different retention policy for a job for the builds than for the artifacts. For example, build logs tend to be relatively small (a few KB or MB) where as build artifacts tend to be relatively large (many MB or possibly GB) - as is the case in our job configurations. In this case what we'd like to do is configure the build retention policy so it is relatively long (e.g.: keep build logs for 30 days) but the artifact retention policy needs to be kept relatively low (e.g.: keep only the last 2 sets of artifacts).
This all sounds fine and dandy, except that since the artifact deployer plugin only looks at the job retention policy it doesn't respect the smaller retention policy used for artifacts. The only way around this seems to be to lower the build retention policy to the same as the artifact policy - something which we would prefer not to do.
As such I would recommend that the artifact deployer plugin either be modified such that it uses the correct policy settings for its purpose, or at the very least provide some kind of option in its configuration to specify which policy should be followed.