Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: BUILD-STABILITY-1.1.2
    • Fix Version/s: BUILD-STABILITY-1.2
    • Component/s: Build Stability
    • Labels:
      None
    • Environment:
      Bamboo 3.0
    • Number of attachments :
      0

      Description

      When I call the following url, I can get 4 latest builds of the PROJECT:
      http://hostname:port/rest/api/latest/build/PROJECT?os_authType=basic&expand=builds[0:3].build

      But it looks like plugin calls this:
      http://hostname:port/rest/api/latest/build/PROJECT/latest?os_authType=basic

      • and gets only one last build result.

      Look here:
      http://confluence.atlassian.com/display/BAMBOO/Bamboo+REST+Resources#BambooRESTResources-BuildServiceSpecificPlan
      http://confluence.atlassian.com/display/BAMBOO/Using+the+Bamboo+REST+APIs

      (I don't know how to get all results starting at some date in one request - it seems 'sonar.build-stability.days' setting is incompatible with REST API of the Bamboo ...)

        Activity

        Hide
        Fabrice Bellingard added a comment -

        Actually, it seems that the plugin does not work with the latest versions of Bamboo, so this ticket should have a wider scope and try to get back the support of Bamboo.

        Tests can be done with https://bamboo-ci.codehaus.org

        Show
        Fabrice Bellingard added a comment - Actually, it seems that the plugin does not work with the latest versions of Bamboo, so this ticket should have a wider scope and try to get back the support of Bamboo. Tests can be done with https://bamboo-ci.codehaus.org
        Show
        Julien HENRY added a comment - - edited REST API has been changed: https://developer.atlassian.com/display/BAMBOODEV/Changes+for+Bamboo+3.0#ChangesforBamboo3.0-RESTChanges
        Hide
        Julien HENRY added a comment -

        Fixed by upgrading to Bamboo 3.0 REST API.

        First query to get latest build:
        /rest/api/latest/result/PROJECT/?os_authType=basic&expand=results[0].result

        then get previous builds by decreasing number until date is too old:
        /rest/api/latest/result/PROJECT/XX?os_authType=basic&expand=results.result

        Show
        Julien HENRY added a comment - Fixed by upgrading to Bamboo 3.0 REST API. First query to get latest build: /rest/api/latest/result/PROJECT/?os_authType=basic&expand=results [0] .result then get previous builds by decreasing number until date is too old: /rest/api/latest/result/PROJECT/XX?os_authType=basic&expand=results.result
        Hide
        Fabrice Bellingard added a comment -

        Manually tested!

        Show
        Fabrice Bellingard added a comment - Manually tested!
        Hide
        S?awomir Janecki added a comment -

        I've used proper URL to Bamboo and I have this error: What I am doing wrong?

        build 08-May-2014 19:15:22 19:15:22.491 INFO - Sensor org.sonar.plugins.buildstability.BuildStabilitySensor@7b4c3e...
        build 08-May-2014 19:15:22 19:15:22.491 INFO - CI URL: Bamboo:http://bamboo.valid.pl/browse/STATICR-STATICRPLAN
        build 08-May-2014 19:15:24 19:15:24.481 ERROR - null
        build 08-May-2014 19:15:24 java.lang.NullPointerException: null
        build 08-May-2014 19:15:24 at org.sonar.plugins.buildstability.ci.bamboo.BambooBuildUnmarshaller.toModel(BambooBuildUnmarshaller.java:67) ~[na:na]
        build 08-May-2014 19:15:24 at org.sonar.plugins.buildstability.ci.bamboo.BambooBuildUnmarshaller.toModel(BambooBuildUnmarshaller.java:36) ~[na:na]
        build 08-May-2014 19:15:24 at org.sonar.plugins.buildstability.ci.CiConnector.getBuild(CiConnector.java:80) ~[na:na]
        build 08-May-2014 19:15:24 at org.sonar.plugins.buildstability.ci.CiConnector.getBuild(CiConnector.java:84) ~[na:na]
        build 08-May-2014 19:15:24 at org.sonar.plugins.buildstability.ci.CiConnector.getBuildsSince(CiConnector.java:113) ~[na:na]
        build 08-May-2014 19:15:24 at org.sonar.plugins.buildstability.BuildStabilitySensor.analyse(BuildStabilitySensor.java:105) ~[na:na]
        build 08-May-2014 19:15:24 at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:72) [sonar-batch-4.1.2.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:114) [sonar-batch-4.1.2.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:150) [sonar-batch-4.1.2.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-plugin-api-4.1.2.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-plugin-api-4.1.2.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:211) [sonar-batch-4.1.2.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:206) [sonar-batch-4.1.2.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:199) [sonar-batch-4.1.2.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-plugin-api-4.1.2.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-plugin-api-4.1.2.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:58) [sonar-batch-4.1.2.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45) [sonar-batch-4.1.2.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:82) [sonar-batch-4.1.2.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-plugin-api-4.1.2.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-plugin-api-4.1.2.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:144) [sonar-batch-4.1.2.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.batch.bootstrap.BootstrapContainer.doAfterStart(BootstrapContainer.java:132) [sonar-batch-4.1.2.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-plugin-api-4.1.2.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-plugin-api-4.1.2.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:92) [sonar-batch-4.1.2.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:74) [sonar-batch-4.1.2.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:45) [sonar-runner-batch4240179184850664026.jar:na]
        build 08-May-2014 19:15:24 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_21]
        build 08-May-2014 19:15:24 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_21]
        build 08-May-2014 19:15:24 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_21]
        build 08-May-2014 19:15:24 at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_21]
        build 08-May-2014 19:15:24 at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87) [sonar-runner-dist-2.3.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75) [sonar-runner-dist-2.3.jar:na]
        build 08-May-2014 19:15:24 at java.security.AccessController.doPrivileged(Native Method) [na:1.7.0_21]
        build 08-May-2014 19:15:24 at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69) [sonar-runner-dist-2.3.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50) [sonar-runner-dist-2.3.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102) [sonar-runner-dist-2.3.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.runner.api.Runner.execute(Runner.java:90) [sonar-runner-dist-2.3.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.runner.Main.executeTask(Main.java:70) [sonar-runner-dist-2.3.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.runner.Main.execute(Main.java:59) [sonar-runner-dist-2.3.jar:na]
        build 08-May-2014 19:15:24 at org.sonar.runner.Main.main(Main.java:41) [sonar-runner-dist-2.3.jar:na]
        build 08-May-2014 19:15:24 19:15:24.482 INFO - Sensor org.sonar.plugins.buildstability.BuildStabilitySensor@7b4c3e done: 1991 ms

        Show
        S?awomir Janecki added a comment - I've used proper URL to Bamboo and I have this error: What I am doing wrong? build 08-May-2014 19:15:22 19:15:22.491 INFO - Sensor org.sonar.plugins.buildstability.BuildStabilitySensor@7b4c3e... build 08-May-2014 19:15:22 19:15:22.491 INFO - CI URL: Bamboo: http://bamboo.valid.pl/browse/STATICR-STATICRPLAN build 08-May-2014 19:15:24 19:15:24.481 ERROR - null build 08-May-2014 19:15:24 java.lang.NullPointerException: null build 08-May-2014 19:15:24 at org.sonar.plugins.buildstability.ci.bamboo.BambooBuildUnmarshaller.toModel(BambooBuildUnmarshaller.java:67) ~ [na:na] build 08-May-2014 19:15:24 at org.sonar.plugins.buildstability.ci.bamboo.BambooBuildUnmarshaller.toModel(BambooBuildUnmarshaller.java:36) ~ [na:na] build 08-May-2014 19:15:24 at org.sonar.plugins.buildstability.ci.CiConnector.getBuild(CiConnector.java:80) ~ [na:na] build 08-May-2014 19:15:24 at org.sonar.plugins.buildstability.ci.CiConnector.getBuild(CiConnector.java:84) ~ [na:na] build 08-May-2014 19:15:24 at org.sonar.plugins.buildstability.ci.CiConnector.getBuildsSince(CiConnector.java:113) ~ [na:na] build 08-May-2014 19:15:24 at org.sonar.plugins.buildstability.BuildStabilitySensor.analyse(BuildStabilitySensor.java:105) ~ [na:na] build 08-May-2014 19:15:24 at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:72) [sonar-batch-4.1.2.jar:na] build 08-May-2014 19:15:24 at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:114) [sonar-batch-4.1.2.jar:na] build 08-May-2014 19:15:24 at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:150) [sonar-batch-4.1.2.jar:na] build 08-May-2014 19:15:24 at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-plugin-api-4.1.2.jar:na] build 08-May-2014 19:15:24 at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-plugin-api-4.1.2.jar:na] build 08-May-2014 19:15:24 at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:211) [sonar-batch-4.1.2.jar:na] build 08-May-2014 19:15:24 at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:206) [sonar-batch-4.1.2.jar:na] build 08-May-2014 19:15:24 at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:199) [sonar-batch-4.1.2.jar:na] build 08-May-2014 19:15:24 at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-plugin-api-4.1.2.jar:na] build 08-May-2014 19:15:24 at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-plugin-api-4.1.2.jar:na] build 08-May-2014 19:15:24 at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:58) [sonar-batch-4.1.2.jar:na] build 08-May-2014 19:15:24 at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45) [sonar-batch-4.1.2.jar:na] build 08-May-2014 19:15:24 at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:82) [sonar-batch-4.1.2.jar:na] build 08-May-2014 19:15:24 at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-plugin-api-4.1.2.jar:na] build 08-May-2014 19:15:24 at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-plugin-api-4.1.2.jar:na] build 08-May-2014 19:15:24 at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:144) [sonar-batch-4.1.2.jar:na] build 08-May-2014 19:15:24 at org.sonar.batch.bootstrap.BootstrapContainer.doAfterStart(BootstrapContainer.java:132) [sonar-batch-4.1.2.jar:na] build 08-May-2014 19:15:24 at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) [sonar-plugin-api-4.1.2.jar:na] build 08-May-2014 19:15:24 at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77) [sonar-plugin-api-4.1.2.jar:na] build 08-May-2014 19:15:24 at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:92) [sonar-batch-4.1.2.jar:na] build 08-May-2014 19:15:24 at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:74) [sonar-batch-4.1.2.jar:na] build 08-May-2014 19:15:24 at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:45) [sonar-runner-batch4240179184850664026.jar:na] build 08-May-2014 19:15:24 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~ [na:1.7.0_21] build 08-May-2014 19:15:24 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~ [na:1.7.0_21] build 08-May-2014 19:15:24 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~ [na:1.7.0_21] build 08-May-2014 19:15:24 at java.lang.reflect.Method.invoke(Method.java:601) ~ [na:1.7.0_21] build 08-May-2014 19:15:24 at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87) [sonar-runner-dist-2.3.jar:na] build 08-May-2014 19:15:24 at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75) [sonar-runner-dist-2.3.jar:na] build 08-May-2014 19:15:24 at java.security.AccessController.doPrivileged(Native Method) [na:1.7.0_21] build 08-May-2014 19:15:24 at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69) [sonar-runner-dist-2.3.jar:na] build 08-May-2014 19:15:24 at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50) [sonar-runner-dist-2.3.jar:na] build 08-May-2014 19:15:24 at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102) [sonar-runner-dist-2.3.jar:na] build 08-May-2014 19:15:24 at org.sonar.runner.api.Runner.execute(Runner.java:90) [sonar-runner-dist-2.3.jar:na] build 08-May-2014 19:15:24 at org.sonar.runner.Main.executeTask(Main.java:70) [sonar-runner-dist-2.3.jar:na] build 08-May-2014 19:15:24 at org.sonar.runner.Main.execute(Main.java:59) [sonar-runner-dist-2.3.jar:na] build 08-May-2014 19:15:24 at org.sonar.runner.Main.main(Main.java:41) [sonar-runner-dist-2.3.jar:na] build 08-May-2014 19:15:24 19:15:24.482 INFO - Sensor org.sonar.plugins.buildstability.BuildStabilitySensor@7b4c3e done: 1991 ms

          People

          • Assignee:
            Julien HENRY
            Reporter:
            David Matejcek
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: