Details
-
Bug
-
Resolution: Fixed
-
Low
-
6.0.3
-
Severity 2 - Major
-
Description
Summary
Publishing a plan from Bamboo Specs with the same Artifact Subscription multiple times will cause the subscription (Artifact dependency) to be duplicated despite the unique key of artifact / destination being identical. Example setup:
Stage stage1 = new Stage("Stage 1") .jobs(new Job("Job1", "JOB1") .tasks(new ScriptTask().inlineBody("echo hello")) .artifacts(new Artifact() .name("images") .copyPattern("*.jpg") .shared(true)) ); Stage stage2 = new Stage("Stage 2") .jobs(new Job("Job2", "JOB2") .tasks(new ScriptTask().inlineBody("echo hello")) .artifactSubscriptions(new ArtifactSubscription() .artifact("images") .destination("images/")) );
Steps to Reproduce
- Use the attached PlanSpec.java and publish the spec twice through Bamboo Specs.
Expected Results
Only one Artifact dependency exists on the plan at Job Configuration > Artifacts.
Actual Results
Two identical Artifact dependencies exists on the plan at Job Configuration > Artifacts.
Notes
Attempting to create duplicate artifact dependencies through the UI fails. Validation is successfully enforced.