I have Jenkins configured to build and deploy a web application I'm working on as 2 projects: "Build" which compiles the application. It has "Archive the artifacts" set to save the resulting artifacts. "Deploy" which uses "Copy artifacts from another project" to get the artifacts from "Build" then deploy them to the server. The "Build Trigger" is set to "Build Periodically" every hour.
The problem I'd like to solve is that the "Deploy" project does the deployment every hour - even if the the artifacts it's using from the "Build" project haven't changed. This means that in the middle of the night, when no one builds have been done, deploys are still happening. Is there any way I can make the "Deploy" project only run if the artifacts it depends on have changed?