Uploaded image for project: 'Bamboo'
  1. Bamboo
  2. BAM-18489

Artifact subscriptions published from Bamboo Specs will duplicate

    XMLWordPrintable

    Details

      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

      1. 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.

        Attachments

          Activity

            People

            Assignee:
            mgardias Marcin Gardias
            Reporter:
            jowen@atlassian.com Jeremy Owen
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: