Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Bamboo Specs SharedCredentials

I'm trying to create a bamboo java spec for a simple plan creation. I don't see the plan created after enabling the scan for bamboo spec in linked repository. How to use the existing shared credentials to authenticate? Please let me know.

3 answers

1 accepted

2 votes
Answer accepted

Hi Manasa,

I'm afraid you aren't facing the same issue from the question you mentioned. From what I understood, @Ryan Schaaf is using a Bitbucket Server repository to store his code and, in this case, there is no need to trigger the specs detection using a webhook (it's done through the application links).

As you probably already know, there is no way to create an application link between Bamboo and Bitbucket Cloud yet and that's the reason why the webhook is needed in this case.

On Bamboo 6.5.1 we added an option in Repository Configuration>>Specs Status to manually scan the repository for specs code without using a webhook: 

Screen Shot 2018-07-10 at 15.13.09.png
While the improvement request mentioned by my colleague @Alexey Chystoprudov(BAM-19837) is not implemented, you can be creative and develop an external script calling the same endpoint used by the "Scan" button.

for example:

curl -u <USER>:<PASSWORD> -H 'content-type: application/json' -H 'accept:application/json' -X POST http://<bambooURL>/rest/api/latest/repository/<repositoryID>/scanNow

ps. You can find the <repositoryID> hovering the mouse over the linked repository name.

But first, of course, you'll need to upgrade Bamboo to 6.5.1 to have this endpoint available.

Please let me know what do you think about this workaround.


Hi Gabriel,

As per my observation, when i create a plan using  bamboo.yaml in my project all i need to trigger is the webhook url provided in the Bamboo Specs tab. The plan is getting triggered for every new commit as well without any webhooks after the plan has been created.



   |_ bamboo-specs

          |_ bamboo.yaml


When i create a bamboo plan using a java spec, i need to trigger using the webhook to create the plan/update any changes to plan using the spec. It doesn't trigger any code updates later, manually running the curl for new code commits works. 


- bamboo-specs

   |_ src/main/java/


curl -X POST -H "Content-Type: application/json"

Above curl works for the plan created through java spec for new commits. It doesn't trigger the plan for new code changes just like the one created by yaml.

Please let me know your thoughts!



Hi Manasa,

I'm not sure if we are talking about the same thing here, let's see.

When you call the "" API endpoint (using cURL o via SCM webhook),  Bamboo will trigger the Repository Stored Specs feature that will be responsible for "sweeping around" your repository looking for specs code (it doesn't matter if it is in Java or YAML). It will neglect all code that can possibly be in your repository other than the files inside the repositoryRoot/bamboo-specs/ folder. If Bamboo finds a possible specs code, it will pull and process this code using an environment specifically developed for this purpose.

On the other hand, the "" API is designed to trigger the change detection functionality and check if there were changes in the default repository for the plan specified in the API URL (in this case: TEST-BT) since the previous build. If there were change, the entire repository will be checked out and all the stages/jobs specified in your plan configuration will be executed. This procedure has no relations to Repository Stored Specs and Bamboo will not process you specs project unless this plan was meant to process you Java Specs as a regular Maven/Java project.

From my understanding, this is what you're experiencing right now:

If you have the specs code (Java or YAML) in the repository and curl the "" endpoint, Bamboo Specs will run and create/update your plans but when you call the "" API endpoint, the builds get triggered but your plans are being updated by Bamboo Specs.

Is this correct? 


Hi Gabriel,

So i'm finding a difference in code detection for a JAVA Spec and YAML.

"" endpoint is helping in triggering the spec updates for java and YAML but after the plan is created for any new code commits,

Plan created by YAML

- Triggers a build for all new commits without any webhooks.

Screen Shot 2018-07-11 at 4.20.44 PM.png

Plan created by Java Spec

- Doesn't trigger any build.


Hope its clear, let me know. Thanks!

Hi Manasa,

Now I think I got it! 

This is probably happening because when you use YAML, even though you are not specifying any repository or/and any build trigger in the configuration file, Bamboo will assign the repository you're using to store the specs file as default and will automatically define a repository polling trigger type to it.

If you want to add a trigger to the plan generated by your java RSS specs code, you'll need to specify it in the code, please see the example below:

public class PlanSpec {

public Plan plan() {
final Plan plan = new Plan(new Project()
.key(new BambooKey("PROJ"))
new BambooKey("TEST"))
.pluginConfigurations(new ConcurrentBuilds()
.stages(new Stage("Default Stage")
.jobs(new Job("Default Job",
new BambooKey("JOB1"))
.tasks(new VcsCheckoutTask()
.description("Checkout Default Repository")
.checkoutItems(new CheckoutItem().defaultRepository()))))
.triggers(new RepositoryPollingTrigger())
.planBranchManagement(new PlanBranchManagement()
.delete(new BranchCleanup())
return plan;

.linkedRepositories("JAVA_RSS") - Responsible for assigning a default repository to the plan, in this case, the plan will use a linked repository called "JAVA_RSS" 

.triggers(new RepositoryPollingTrigger()) - Responsible for adding a build trigger to the plan, in this case, a "Repository Polling" trigger which will scan the repo for code change every 180 seconds by default.

Could you please try that? Let us know the results.


Like Steffen Opel _Utoolity_ likes this

Hi Gabriel,

Thanks for the detailed explanation. I tried above and it worked as expected. Is there a way yaml doesn't trigger repository polling by default and can yaml stages and jobs have KEY and NAME defined instead of going with default names?

Please let me know. Thanks!

Hi Manasa,

I'm glad you got this working.

Regarding your question, I'm afraid not, YAML specs was meant to be a simpler alternative and to accomplish this, some sacrifices were required. If you want to have more control of your plans, Java specs is the best option, for sure.

To help our community, please don't forget to accept the correct answer for this thread.


@Gabriel Ribeiro Thank you. I couldn't able to accept your last comment as an answer there is no option available for it.

Hi Gabriel, Thank you for the response. So when i try to run the java spec from my local computer i use my credentials in .credentails file. When i try to add the java spec to a git repository and enable bamboo spec scanner, i don't see the plan created. We have shared credentials to authenticate the repo on Bamboo. Does your code help me with my issue?

Hi Manasa,

I don't think so, your specs code is probably not running because your repository does not have access rights to the project where you're trying to create/edit the plan. When using RSS (repository stored specs) you need to explicitly give permission for the repository to the project (Project settings > Bamboo Specs repositories).


I have added that settings but i still don't see my plan has been created. Do i need to have .credentials file available within bamboo-specs repository?

No, the .credentials file is not used in repository stored specs, this is only used while publishing your plans using maven or the IDE.

  • Is your java specs code inside a bamboo-specs folder in your repository? 
  • Are you using Bitbucket server? If not, are you sure your SCM is being able to reach the RSS webhook endpoint?
  • Are there any error messages regarding specs in Bamboo logs?



- bamboo-specs



Yes my repo has connectivity with the Bamboo.

Did you get any email notification from Bamboo with specs execution, also check folder <BAMBOO_HOME>/xml-data/repository-specs/<REPO_ID>/<EXECUTION_FILE>.log

I din't get any email and tried to check my bamboo-home folder i don't see repository-specs folder.


- build-dir



Let me know if i can check any pattern in the logs for the issue.

Do i have to connect my Bamboo and Bitbucket server using application link only?

where can i find the application link.


Currently, i had Repository host as Git for my Linked Repository configuration on bamboo.

Yes, you have to connect it via AppLink and create Bitbucket Server repository at Bamboo side. Or you can trigger Repository stored specs detection by Scan button (from Bamboo 6.5.1). Or trigger detection with REST call (from Bamboo 6.5)

Is there a way i can make it work if my repository host as GIT? We use Bitbucket cloud. My current Linked Repository - Git configuration on bamboo doesn't generate the plans as per the java spec which has the bamboo scanner enabled, which works from my IDE.

Let me know if there any steps to configure when my repository host is GIt/Bitbucket cloud. Should we need to use the Linked repository if its Git/Bitbucket cloud?


Thank you!

Let me know your version of Bamboo.

If it's lower than 6.5, then there's no support for Bamboo Specs at repository unless Bitbucket Server.

We are using 6.5.0 version.


Screen Shot 2018-07-06 at 2.59.58 PM.png

I see its asking to enable webhook url. Is there a way bamboo spec scan can be enabled without using the webhook? Please let me know.

All right. There's no such functionality for pure Git or Bitbucket Cloud, you can watch and vote for it at this feature request:

I see its the same issue but it worked for him. Let me know if its a different version of bamboo supports it.

 Hi Manasa,

Are you talking about the shared credentials for the repository authentication? If you are using a linked repository, your plan will use the credential set there, if you are using a plan repository, you'll need to define the shared credentials in your specs code:


Plan plan = new Plan(project, planName, planKey)
    .planRepositories(new GitRepository()
        .authentication(new SharedCredentialsIdentifier("identifier")));

(from Bamboo Specs Reference)

But, if you are talking about the permissions used by Bamboo to run your specs code, it does not use any specific user, Bamboo uses a system account with the permissions you set specifically for the repository where you're storing the specs code.


Suggest an answer

Log in or Sign up to answer

Atlassian Community Events