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

Bamboo Specs fails to deploy deployment projects associated to plan branches, with a trigger

      Summary

      Bamboo Specs fails to deploy deployment projects associated to plan branches, with a trigger.

      Steps to Reproduce

      1. Create a build plan.
      2. Create a plan branch.
      3. Create a deployment project that associates to the plan branch.
      4. In the environment, create a trigger of type "After Successful stage".
      5. Export the deployment project using Specs.
      6. Import the Specs Java file.

      Expected Results

      An environment as the one manually created.

      Actual Results

      Specs deployment fails with the following error:

      Exception in thread "main" com.atlassian.bamboo.specs.api.exceptions.BambooSpecsPublishingException: An error occurred while publishing deployment proj2: Plan cannot be found by id 'x4k5p13lj1mp' with type 'interface com.atlassian.bamboo.plan.TopLevelPlan'
      2018-09-03 14:04:49,259 INFO [BambooServer] An error occurred while publishing deployment proj2: Plan cannot be found by id 'x4k5p13lj1mp' with type 'interface com.atlassian.bamboo.plan.TopLevelPlan'
      	at com.atlassian.bamboo.specs.util.BambooServer.translateRestException(BambooServer.java:170)
      2018-09-03 14:04:49,260 INFO [BambooServer] (for more information, enable more detailed logging with system property -Dbamboo.specs.log.level=DEBUG)
      	at com.atlassian.bamboo.specs.util.BambooServer.translateException(BambooServer.java:140)
      	at com.atlassian.bamboo.specs.util.BambooServer.publish(BambooServer.java:97)
      	at Specs.PlanSpecBSP39580.main(PlanSpecBSP39580.java:70)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
      Caused by: com.atlassian.bamboo.specs.exceptions.BambooSpecsRestRequestException: Plan cannot be found by id 'x4k5p13lj1mp' with type 'interface com.atlassian.bamboo.plan.TopLevelPlan'
      	at com.atlassian.bamboo.specs.util.RestHelper.lambda$sendRequest$2(RestHelper.java:89)
      	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:222)
      	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:164)
      	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:139)
      	at com.atlassian.bamboo.specs.util.RestHelper.sendRequest(RestHelper.java:92)
      	at com.atlassian.bamboo.specs.util.RestHelper.post(RestHelper.java:201)
      	at com.atlassian.bamboo.specs.util.SendQueue$1.run(SendQueue.java:23)
      
      

      Workaround

      In scenarios like this one, avoid using Specs. Creating and editing the project/environment from the UI will work properly.

              mgardias Marcin Gardias
              pdemitrio Patricio
              Affected customers:
              1 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: