-
Bug
-
Resolution: Fixed
-
Medium
-
5.10.0, 5.13.0.1
-
6
-
Severity 3 - Minor
-
0
-
Summary
When the build plan is changed in Deployment Project setting, Deployment Artifact Download task does not update with the latest shared artifact
Steps to Reproduce
- Create build plan PLAN-ONE
- Create two artifacts "ArtifactOne" and "ArtifactTwo"
- Perform a build on PLAN-ONE
- Create a Deployment project for PLAN-ONE
- Set Artifact Download to download "ArtifactOne" to Destination Path "One" and "ArtifactTwo" to "Two"
- Clone the plan to create PLAN-TWO and trigger a build
- Edit Deployment project in Step 4 to use build plan PLAN-TWO
- Create a release and deploy it
Expected Results
Artifact Download task will download "ArtifactOne" to Destination Path "One" and "ArtifactTwo" to "Two"
Actual Results
The below exception is thrown in the atlassian-bamboo.log:
2016-09-14 23:37:41,891 ERROR [http-nio-8085-exec-25] [ChainPluginSupportHelper] Task context data provider failed:java.lang.IllegalArgumentException: Unable to find an artifact definition for name: ArtifactTwo 2016-09-14 23:37:41,892 INFO [http-nio-8085-exec-25] [DefaultErrorHandler] Recording an error: com.atlassian.bamboo.plugins.bamboo-artifact-downloader-plugin:artifactdownloadertask : 1245185-1409025 : Unable to find an artifact definition for name: ArtifactTwo 2016-09-14 23:37:41,893 WARN [http-nio-8085-exec-25] [DeploymentExecutionServiceImpl] java.lang.RuntimeException: java.lang.IllegalArgumentException: Unable to find an artifact definition for name: ArtifactTwo at com.atlassian.bamboo.chains.ChainPluginSupportHelper.prepareRuntimeTaskData(ChainPluginSupportHelper.java:64) at com.atlassian.bamboo.deployments.execution.service.DeploymentExecutionServiceImpl.lambda$null$16(DeploymentExecutionServiceImpl.java:219) at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:206) at com.atlassian.bamboo.variable.CustomVariableContextRunnerImpl.execute(CustomVariableContextRunnerImpl.java:33) at com.atlassian.bamboo.deployments.execution.service.DeploymentExecutionServiceImpl.lambda$execute$17(DeploymentExecutionServiceImpl.java:218) ... Caused by: java.lang.IllegalArgumentException: Unable to find an artifact definition for name: ArtifactTwo at com.atlassian.bamboo.plugins.artifact.ArtifactDownloaderRuntimeDataProvider.populateRuntimeTaskData(ArtifactDownloaderRuntimeDataProvider.java:128) at com.atlassian.bamboo.chains.ChainPluginSupportHelper.prepareRuntimeTaskData(ChainPluginSupportHelper.java:40)
Notes
- The deployment will be hang and need to be stop manually
- The Artifact Download does not show the original setting in Step 5. All artifacts option is selected. If the Deployment Project is edited to use back PLAN-ONE, the Artifact Download task will show the correct setting again
- If "ArtifactTwo" is deleted in PLAN-TWO before Step 7 is performed, Bamboo will have a warning:
Shared artifact 'ArtifactTwo' not found in the new source plan. Artifact is used in environment 'staging'
Workaround
Need to reconfigure Deployment Artifact Download task in Step 5 again