Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-17882

Deployment Artifact Download isn't updated with the latest shared artifact when the build plan is switched

XMLWordPrintable

      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

      1. Create build plan PLAN-ONE
      2. Create two artifacts "ArtifactOne" and "ArtifactTwo"
      3. Perform a build on PLAN-ONE
      4. Create a Deployment project for PLAN-ONE
      5. Set Artifact Download to download "ArtifactOne" to Destination Path "One" and "ArtifactTwo" to "Two"
      6. Clone the plan to create PLAN-TWO and trigger a build
      7. Edit Deployment project in Step 4 to use build plan PLAN-TWO
      8. 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

      1. The deployment will be hang and need to be stop manually
      2. 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
      3. 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

              mgardias Marcin Gardias
              klfoong Foong (Inactive)
              Votes:
              20 Vote for this issue
              Watchers:
              22 Start watching this issue

                Created:
                Updated:
                Resolved: