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

Deployment Release artifact not downloadable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 6.6.2, 6.8.0
    • Artifacts
    • None

      Summary

      For a development plan with Artifact Handler set to Agent-local artifact handler, on subsequent deployment with Artifact Handler set to Bamboo remote handler and Server-local artifact handler, the deployment Release artifact will still not be downloadable.

      Steps to reproduce

      1. Create a build plan
      2. Set the artifact handler to Agent-local artifact handler for shared artifacts and non-shared artifacts
      3. Create a Deployment environment for this build
      4. Add Trigger for "After successful build plan" in the deployment environment setup
      5. Build the plan on a remote agent
      6. The deployment fails to download artifacts (this is expected due to the Agent-local artifact handler setting)_
      7. Update the Artifacts handler to Bamboo remote handler and Server-local artifact handler for shared artifacts and non-shared artifacts
      8. Rebuild the same build number and the deployment will trigger again

      Expected Results

      1. The deployment is successful
      2. The Release contents for the release is downloadable

      Actual Result

      1. The deployment fails
      2. The Release contents for the release is not downloadable

      Workaround

      1. Run the query to view the related artifact
        SELECT artifact_id, link_type, build_number
          FROM artifact 
          WHERE  plan_key='PLAN KEY' AND build_number=BUILD NUMBER
        

        Output

        artifact_id	link_type	                                                                     build_number
        11730992	com.atlassian.bamboo.plugin.artifact.handler.remote:AgentLocalArtifactHandler	     1
        11730993	com.atlassian.bamboo.plugin.artifact.handler.remote:BambooRemoteArtifactHandler      1
        
      2. To view the artifact reference in the deployment_version_item_ba table run;
        SELECT ba.version_bam_artifact_item_id, ba.artifact_id, ba.build_number
          FROM deployment_version_item_ba  ba
          JOIN deployment_version_item item
          ON item.deployment_version_item_id = ba.version_bam_artifact_item_id
          JOIN deployment_version dv
          ON dv.deployment_version_id = item.deployment_version_id
          WHERE dv.name='RELEASE IN QUESTION'
        

        Output

        version_bam_artifact_item_id	artifact_id	build_number
        12091403	                11730992	1

       Notes

      The bug is that in the deployment_version_item_ba table the artifact_id still references the articat_id ( eg. 11730992) produced by AgentLocalArtifactHandler in the artifact table and not the artifact_id produced by BambooRemoteArtifactHandler.
      To fix this update the artifact_id to the  artifact_id  produced by BambooRemoteArtifactHandler for this build

      UPDATE
       deployment_version_item_ba
      SET
       artifact_id = 11730994
      WHERE
       version_bam_artifact_item_id = 12091403

      and rerun the build.

              Unassigned Unassigned
              voseghale VICTOR-OSEGHALE (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: