Bamboo Specs not working at all
Asked by Hendrik Beijeman:

Dear all,

I followed the documentation examples for bamboo specs.

When I create a linked repository manually or via build/specs, and I press "scan", the text is not updated and says

"This repository was never scanned." after a brief busy.

Furthermore, the site displays:  
"No specs logs yet  
Bamboo hasn't detected any specs in your repository"

The bamboo logs also don't show anything at all related to specs or repository updates.

Bamboo 6.6.2 build 60606

Bitbucket v5.13.1

What could be wrong here?


Answers:
author: Mark Ryan
body: Maybe a little late as a reply (although I see people were still struggling with this as late as October!) but in trying to get Bamboo Specs working I came across this thread and shortly afterwards worked out what (for me) turned out to be the issue and the answer.

In the log files, there's something like this :

```
2019-12-27 12:21:52,765 INFO [15-BAM::SpecsDetection:pool-22-thread-1] [RssDetectionRunnable] Exception while executing RSS detection for repository 2654209
java.lang.UnsupportedOperationException: JGit implementation does not support this operation, please use native Git
at com.atlassian.bamboo.plugins.git.JGitOperationHelper.obtainLatestRevision(JGitOperationHelper.java:797)
```

Now I already had a native git installed but just needed to ensure this was available as a 'Server Capability':

> Administration -\> Overview -\> Server capabilities -\> 'Add Capability' -\> Select Git \& correct path, etc ...

Once this 'capability' was available, the scanning of the linked repo containing the specs worked fine.

Hope that helps anyone else in the same situation.

Enjoy

Mark


author: Bart Louwers
body: This issue is affecting us as well.

Edit: manually scanning the repository worked.

comments: author: Alexey Chystoprudov
body: what's your repository type?


author: leozilla
body: I have the same issue. Is there already a solution?


author: Omar Herrera
body: Hi [@Hendrik Beijeman](/t5/user/viewprofilepage/user-id/2237337) let me know if you are triying out yml specs or java specs?

I have 6 months working with yml specs ,please check this similiar issue [on this thread](https://community.atlassian.com/t5/Bamboo-questions/Bamboo-specs-Enabling-scan-for-bamboo-specs-disables-pushtrigger/qaq-p/740264#M17615)

Cheers

Omar H.

comments: author: Hendrik Beijeman
body: Hello, sorry for the late reply.

I'm using bamboo specs


author: Chris Hatton
body: Hendrik; the question was **yml** or **java** - those are both flavours of Bamboo specs - which one are you using?


author: Anthony Yeong
body: have same issue with Java spec. Is there some mandatory structure or file which needs to be in the repo? I uses the java spec tutorial as baseline.


author: Harsha Nanayakkara
body: Plans not getting created when added/updated YML file to bitbucket repo. I can see the following error message in the log file.

"Bamboo Specs have already been executed for a newer revision"


author: Alexey Chystoprudov
body: Can you please tell if bamboo-specs folder is in the root of your repository?

Are you able to update plan configuration from local environment with command

    mvn -Ppublish-specs

?

More details in this tutorial [https://confluence.atlassian.com/bamboo/tutorial-create-a-simple-plan-with-bamboo-java-specs-894743911.html](https://confluence.atlassian.com/bamboo/tutorial-create-a-simple-plan-with-bamboo-java-specs-894743911.html?)

comments: author: pradeep kumar
body: I have the same error and the bamboo-specs folder is in the root


author: Victor Debone
body: Hello [@pradeep kumar](/t5/user/viewprofilepage/user-id/2718848),

How does the content of your \`bamboo-specs\` folder looks like? Can you give more details of which files does it contain?

Victor :)


author: Alexandre Sim?es
body: I have the same problem.

I've configured Bamboo Server with the Bitbucket Cloud Repo and set up the webhook.

When clicked "Test connection", it says "Connection successful".

In the repository "tutorial" I've a folder "bamboo-specs". Inside there is a file "bamboo.yml".

tutorial/bamboo-specs/bamboo.yml

file "bamboo.yml":

```
---
version: 2
plan:
  project-key: ROCKET
  name: Launch Ship
  key: SHIP

stages:
  - First Build Stage:
      jobs:
        - Build Ship Server

Build Ship Server:
  tasks:
    - script:
      - echo 'Hello world!'
```

I've added to my project "TutorialRepo" (Kye: "ROCKET") in the Bamboo Specs repositories the repository "tutorial" and enabled the "Scan for Bamboo Specs" and scanned by hand.

It never gave any error, and always says:

"This repository was never scanned.

No specs logs yet

Bamboo hasn't detected any specs in your repository."

I'm using Bamboo 6.9.0.

I've double checked and consulted online about this and still nothing...  


author: Alexey Chystoprudov
body: It should be /bamboo-specs/bamboo.yml not /tutorial/bamboo-specs/bamboo.yml


author: Alexandre Sim?es
body: ![Capturar.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/52504i51006750CC8908A4/image-size/large?v=v2&px=999 "Capturar.PNG")

So my repository is "tutorial". Inside, then, I've "bamboo-specs/bamboo.yml".


author: Alexey Chystoprudov
body: [@Alexandre Sim?es](/t5/user/viewprofilepage/user-id/3014059) I would suggest to contact support team and provide server logs to find the root cause


author: Hendrik Beijeman
body: I'm having the same problem (as before), and no matter what I try, it doensn't work. I can publish the java specs manually with maven, but for some reason Bamboo server doesn't seem to pick it up automatically.

The annoying thing is, that it gives no indication visually or in the logs of what's wrong, so it can be fixed.

This is the layout:

repository root

[bamboo-specs](http://reponl.eu.omron.net/projects/IPC1338/repos/buildspecs/browse/bamboo-specs)/

pom.xml

src/main/java

\<...\>Spec.java

etc

It was all generated from the tutorial with Maven and archtetype.


author: Alexey Chystoprudov
body: [@Hendrik Beijeman](/t5/user/viewprofilepage/user-id/2237337) can you please enable DEBUG log level for class com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl. You can do it without Bamboo restart at BAMBOO_URL/admin/configLog4j.action.

Then click Scan button for repository.

Share Bamboo logs starting from line

AccessLog ...rest/api/latest/repository/REPO_ID/scanNow


author: Victor Debone
body: Hello [@Alexandre Sim?es](/t5/user/viewprofilepage/user-id/3014059)

Can you double check if your commits with the file \`bamboo-specs/bamboo.yml\` are in Bitbucket Cloud?

Also [@Hendrik Beijeman](/t5/user/viewprofilepage/user-id/2237337), is your last commit locally the same commit you have in your Bitbucket? With your specs changes?

Victor


author: Hendrik Beijeman
body: Hello Alexey, Victor,

Thank you very much for your quick response!

We've just tested with the log message to DEBUG, as Alexey instructed. Stragely, nothing (specs-related) appears in the atlassian-bamboo.log file.

I did not restart (I also don't have the permission to).

The result is the same - "allow repository to be scanned" is "on". Status is "repository is never scanned", then when forcing with the scan button - a notification pops up that its scannign the repo. And after that, same status - repository is never scanned.

We jus ttried it with the yaml file(s) as well. Same result, except that the "scan duration" is almost immediately while with java specs it takes a few seconds.

We're running [Atlassian Bamboo](http://www.atlassian.com/software/bamboo/) version 6.8.0 build 60803 - 30 Jan 19 in a hosted, corporate environment, no cloud.

Please advise!

Kind regards,

Hendrik


author: Alexey Chystoprudov
body: One more action. Enable DEBUG log level for class com.atlassian.bamboo.configuration.external.RssDetectionServiceImpl and click Scan button again. Then check logs

Expected log messages

```
2019-04-26 10:59:57,599 DEBUG [http-nio-6990-exec-1] [RssDetectionServiceImpl] Enqueuing Bamboo Specs detection for repository: 5111809
2019-04-26 10:59:57,600 DEBUG [http-nio-6990-exec-1] [AccessLogFilter] END: 204 admin POST http://localhost:6990/bamboo/rest/api/latest/repository/5111809/scanNow 312620kb-2087kb 2ms
...
2019-04-26 10:59:57,749 DEBUG [15-BAM::SpecsDetection:pool-22-thread-1] [RssDetectionServiceImpl] Skipping Specs detection. Specs revision not detected in repository 'no specs' on branch 'master'.
```


author: Hendrik Beijeman
body: Hello Alexey,

I don;t see my previous answer, I added some screenshots.

In any case, I added that logline, and it made no difference.

It almost seems as if the entire feature, or support thereof, is missing from the local installation. Is there an option during install to disable this? Can I check somehow for its presence?

Kind regards,

Hendrik


author: Alexey Chystoprudov
body: It's possible to turn this feature off at Security settings


author: Hendrik Beijeman
body: Yes, I saw, but its already on.


author: Alexey Chystoprudov
body: Let me confirm

You enabled DEBUG logging for **com.atlassian.bamboo.configuration.external.RssDetectionServiceImpl**

but don't see log when click Scan button

```
[RssDetectionServiceImpl] Enqueuing Bamboo Specs detection for repository: 5111809
```


author: Hendrik Beijeman
body: Correct. I presume I should see some activity in the logs, when I push to the repo or manually press scan. Yet there is no event/trigger whatsoever.

Here is the complete list:

Emergency INFO  
JavaScript DEBUG  
com.amazonaws WARN  
com.amazonaws.services.s3 INFO  
com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl DEBUG  
com.atlassian.bamboo.configuration.external.RssDetectionServiceImpl DEBUG  
com.atlassian.bamboo.persister.xstream.IgnoreMissingFieldXStream INFO  
com.atlassian.bamboo.plugins.hg.sshproxy WARN  
com.atlassian.bamboo.plugins.ssh WARN  
com.atlassian.bamboo.ssh WARN  
com.atlassian.bamboo.user.BambooUserManagerImpl WARN  
com.atlassian.botocss WARN  
com.atlassian.crowd INFO  
com.atlassian.marketplace.client.MarketplaceClient WARN  
com.atlassian.plugin WARN  
com.atlassian.plugin.osgi WARN  
com.atlassian.plugin.osgi.container.felix.FelixOsgiContainerManager WARN  
com.atlassian.plugin.servlet.PluginResourceDownload WARN  
com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter WARN  
com.atlassian.plugin.webresource.DefaultResourceDependencyResolver ERROR  
com.atlassian.streams WARN  
com.atlassian.tunnel WARN  
com.atlassian.usermanagement.userprovisioning INFO  
com.atlassian.util.profiling DEBUG  
com.opensymphony.xwork2.util.LocalizedTextUtil ERROR  
com.opensymphony.xwork2.util.OgnlValueStack ERROR  
com.spotify.docker.client WARN  
cz.vutbr.web WARN  
org.acegisecurity WARN  
org.apache INFO  
org.apache.activemq.transport.failover.FailoverTransport WARN  
org.apache.sshd WARN  
org.apache.struts2.config.BeanSelectionProvide WARN  
org.apache.velocity WARN  
org.eclipse.jetty INFO  
org.hibernate INFO  
org.hibernate.SQL INFO  
org.hibernate.impl.SessionImpl ERROR  
org.hibernate.metamodel.internal.MetadataContext ERROR  
org.hibernate.orm.deprecation ERROR  
org.springframework WARN  
org.springframework.beans.factory.support.DependencyInjectionAspectSupport WARN  
org.twdata.pkgscanner.ExportPackageListBuilder ERROR  
webwork WARN  
root INFO


author: Alexey Chystoprudov
body: Then I would give you the same advise and create support ticket to let our support engineers to investigate your configuration and logs