-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
6.6.2, 6.8.0
-
None
-
4
-
Severity 2 - Major
-
0
-
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
- Create a build plan
- Set the artifact handler to Agent-local artifact handler for shared artifacts and non-shared artifacts
- Create a Deployment environment for this build
- Add Trigger for "After successful build plan" in the deployment environment setup
- Build the plan on a remote agent
- The deployment fails to download artifacts (this is expected due to the Agent-local artifact handler setting)_
- Update the Artifacts handler to Bamboo remote handler and Server-local artifact handler for shared artifacts and non-shared artifacts
- Rebuild the same build number and the deployment will trigger again
Expected Results
Actual Result
- The deployment fails
- The Release contents for the release is not downloadable
Workaround
- 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
- 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.