I have a build plan in which different jobs are configured to build components of our application. Each job generates an artifact. My deployment plan has a task to download all artifacts from the build plan. This works fine in general use.
But, I came across a case where one component had no new updates and thus no new artifact was generated and the build plan succeeded, triggering the deployment plan. But, the deployment plan fails as there is no generated artifact. I couldn't find a way to make deployment plan not fail in such a scenario. Other option is to find a way to modify the job in the build plan to always generate an artifact, even if there's no update.
My build job looks like this
- Source Code Checkout
- npm command
- Script to create artifacts directory
- Command(tar) to generate artifacts file
My Deployment Tasks are
- Artifacts Download (All artifacts)
- SCP
- Run configuration script