youngmon/atlassian-qna huggingface dataset:
Set Linked Repository with Bamboo Java Specs
Asked by Tomasz Kwiecie?:

Hello,

There is article on how create Linked Repository using Java Specs:

<https://confluence.atlassian.com/bamkb/create-linked-repository-with-bamboo-java-specs-1014269419.html>

But how can I set "Group access" and "Bamboo Specs repositories access" access using Java Specs?

I can setup these using UI but its not an option in Configuration as Code approach.

![image.png](/t5/image/serverpage/image-id/220413i7CF2E0BF5DFE1DF4/image-dimensions/241x361?v=v2 "image.png")

Brgds,

Tomasz


Answers:
author: Eduardo Alvarenga
body: Hello [@Tomasz Kwiecie?](/t5/user/viewprofilepage/user-id/5052435)

Welcome to **Atlassian Community**!

Unfortunately, ACL for Linked repositories is not available in Java Specs format. For that you will have to use the UI or the REST API:

* <https://developer.atlassian.com/server/bamboo/rest/api-group-api/#api-api-latest-permissions-repository-id-users-name-put>
* <https://developer.atlassian.com/server/bamboo/rest/api-group-api/#api-api-latest-permissions-repository-id-groups-name-put>
* <https://developer.atlassian.com/server/bamboo/rest/api-group-api/#api-api-latest-permissions-repository-id-roles-name-put>
* <https://developer.atlassian.com/server/bamboo/rest/api-group-api/#api-api-latest-repository-repositoryid-rssrepository-post>

We have a **Feature request** that asks for a Specs export feature for Linked Repositories. Please **vote** and comment on it so the developers can consider it in a future release.

* [\[BAM-21825\] Export Linked Repository to Java or YAML Specs format](https://jira.atlassian.com/browse/BAM-21825)

Cheers,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**

comments: author: Tomasz Kwiecie?
body: Hi [@Eduardo Alvarenga](/t5/user/viewprofilepage/user-id/4365410)

Thank you for quick response.

I've already voted for this Jira ticket.

I will proceed with "normal" repository in my build plans for now.

Brgds,

Tomasz


Tags: java

repository
Bamboo integration with okta for SSO
Asked by venkat:

I would like to know which version of bamboo will integrate directly with okta for single sign-on without depending on additional add-on in bamboo.


Answers:
author: Eduardo Alvarenga
body: Hello @\[deleted\]

Welcome to **Atlassian Community**!

Bamboo 8.1 was the first release to support full SSO. Please check its release notes page for more details:

* [Bamboo Data Center now with support for single sign-on](https://confluence.atlassian.com/bamboo/bamboo-8-1-release-notes-1103070461.html#Bamboo8.1ReleaseNotes-ssoBambooDataCenternowwithsupportforsinglesign-on)

Cheers,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**
How to disable build trigger with new branch creation
Asked by ananda3:

After bamboo spec enablement for repo, any time someone creates a branch on the server, it immediately triggers a build. Even without any commits or code changes. Can we avoid building until an initial commit is pushed?

Before, Bamboo Spec enablement this was working as expected.


Answers:
author: Eduardo Alvarenga
body: Hello [@ananda3](/t5/user/viewprofilepage/user-id/5048241)

Welcome to **Atlassian Community**!

You can disable automatic branch creation by modifying the Plan settings under Branches:

```
Create plan branch
  ( ) Manually
  ( ) When a pull request is created
  ( ) When new branch in repository is created
  ( ) When new branch in repositoru is created and matches expression 
```

<br />

Sincerely,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**

comments: author: ananda3
body: [@Eduardo Alvarenga](/t5/user/viewprofilepage/user-id/4365410)

I think this is not matching with the problem statement, we want to have new branch created but don't want to trigger the build with just new branch creation. We want build to be triggered when there is a commit in the created branch.

Currently, whenever a branch is getting created, it triggers the build in that plan branch.


author: Eduardo Alvarenga
body: Hello [@ananda3](/t5/user/viewprofilepage/user-id/5048241)

Thank you for providing more details on your request.

Bamboo will trigger a build by default on a Plan Branch creation. There is a Feature Request that covers your scenario, but unfortunately, that is still collecting votes for future implementation. We recommend you vote and watch that FR so you get notified once it move forward on its implementation.

* [BAM-12944 - Set "Repository triggers the build" but builds still happen automatically on every branch create](https://jira.atlassian.com/browse/BAM-12944)

As a workaround, you can add a single script task at the top of the very first Stage of your Plan that will exit if it's the first time the build is happening.

**Windows**:  

```
if ( ${bamboo.buildNumber} -eq 1 )?{? $host.ui.WriteErrorLine("First build on branch killed to avoid unnecessary build")? exit 1}
```

**Linux**:  

```
if [ ${bamboo_buildNumber} -eq 1 ] ; then  echo "First build on branch killed to avoid unnecessary build"  exit 1fi?
```

As a result, the first run after creating a branch will fail immediately and you will avoid unnecessary work.

Sincerely,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**


author: Rainer Sinkwitz
body: Must be build**N**umber, not buildnumber (linux example)


Tags: branch

build

spec
Bamboo Spec execution is treated as green build
Asked by ananda3:

Can we configure something where "Testless Build" related to Bamboo Spec execution is ignored as Green Build.

This is messing up with our Merge Checks.

Problem: With PR build run being failed, Bamboo Spec Changes are treated as Green build and that is allowing devs to merge their PR.


Answers:
author: Eduardo Alvarenga
body: Hello [@ananda3](/t5/user/viewprofilepage/user-id/5048241)

Welcome to **Atlassian Community**!

You can add an exclude pattern to the Linked Repository under **Change detection options** -\> **"Exclude all changes that matches"** such as:

```
^(\/bamboo-specs)\/.*
```

That way, any changes made to the bamboo-specs folder will be ignored by Bamboo and will not produce a build.

But, if you have legitimate changes to the Specs folder, you will have to override the approval and merger process on your VCS as they will not trigger a build.

You will also have to run a manual Specs scan on the repository either via the UI:

* **Bamboo Administration** -\> **Linked Repository** -\> ***\<Repository\>*** -\> **Specs Status** -\> **Scan**

Or via the API:

* <https://developer.atlassian.com/server/bamboo/rest/api-group-api/#api-api-latest-repository-repositoryid-scannow-post>

Kind regards,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**

comments: author: ananda3
body: [@Eduardo Alvarenga](/t5/user/viewprofilepage/user-id/4365410)

Thanks for sharing workaround. There is a follow-up question, so once scan button is clicked from LinkedRepo, wouldn't that create the testless build?


author: Eduardo Alvarenga
body: Hello [@ananda3](/t5/user/viewprofilepage/user-id/5048241),

By having a Linked Repository that would exclude the "bamboo-specs" folder and running a Specs scan manually, Bamboo will only run a "Testless build" in case the specs code has changed from the previous version on that particular branch and if that's divergent from the default branch. That run is only to apply the new Specs code and will not actually Run the build Plan.

Regards,  
Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**  
[![ananda3](https://secure.gravatar.com/avatar/6acd1eb30c0e6feeb97c56a7eb4f1ba3?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FA-5.png "ananda3")](https://community.atlassian.com/t5/user/viewprofilepage/user-id/5048241)


author: ananda3
body: Hello [@Eduardo Alvarenga](/t5/user/viewprofilepage/user-id/4365410)

Appreciate your help!!

The overall problem with this Testless Build run is that it is interfering with the merge checks. As an example the merge check is enabled where we are ensuring that master has 1 green build, so when spec changes are getting executed as Testless Build, it overrides the existing RED build and bamboo server ignores that RED and considers spec changes related build as green and allows folks to merge.


Tags: build

spec

test
Name of the parent process when running Bamboo
Asked by Jan Hlavac:

Hello!  

I'm looking for a parent process name that would help me recognize whether or not is Atlassian Bamboo running just by looking at all running processes  

Since Bamboo is written in Java, I expect the parent process would be Java process itself.  

Therefore if there is Bamboo running and only one Java process is present, I can assume that this parent process is running Bamboo. Is that correct?  

Thank you!  

Best regards,  
Jan


Answers:
author: Eduardo Alvarenga
body: Hey [@Jan Hlavac](/t5/user/viewprofilepage/user-id/5048044)

You are right. If you have only one Atlassian application running on the server, and no other Java programs around, searching for "bamboo" and "java" on the process list would be enough.

As a pro-tip, you can declare a custom Java property without any real application value, just to ease your search, such as ***-Dprocess-name=Bamboo***. Then use that string as your search pattern.

* [Configuring your system properties](https://confluence.atlassian.com/bamboo/configuring-your-system-properties-289277345.html)

Thank you,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**

comments: author: Jan Hlavac
body: Hello [@Eduardo Alvarenga](/t5/user/viewprofilepage/user-id/4365410)  

That seems to be exactly what I was looking for, and thanks for confirming my assumptions with the "java" process.  

I will also look into Java properties, this could be useful later as well.  

Thank you for your help!  

<br />

<br />

<br />


Tags: process
How to get job key of my BP using Bamboo REST API?
Asked by Valerii:

Hi Team,

I have {projectKey} and {buildKey}, is it possible to get {jobKey} of this BP using Bamboo REST API?

I found how to get the value as {projectKey}-{buildKey}-{jobKey} . But I need only jobKey.


Answers:
author: Eduardo Alvarenga
body: Hello [@Valerii](/t5/user/viewprofilepage/user-id/4984397)

This jq filter will do the job:

```
$ curl -u admin:admin -H "Accept: application/json" -X GET \
  'https://bamboo825.mydomain.net/rest/api/latest/plan/ABC-DFG?expand=stages.stage.plans.plan' \
    | jq '.stages.stage | .[].plans.plan | .[].planKey | .jobKey = ( .key | split("-") | .[2])'

{
"key": "ABC-DFG-JOB1",
"jobKey": "JOB1"
}
{
"key": "ABC-DFG-FJ",
"jobKey": "FJ"
}
{
"key": "ABC-DFG-P4C",
"jobKey": "P4C"
}
{
"key": "ABC-DFG-HW",
"jobKey": "HW"
}
```

Best regards,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**


Tags: api

rest-api
bamboo plugin: task cant run on remote agent
Asked by Emilyvs:

i have a plugin that adds a task but i give

```
never resolved service '&applicationProperties' with filter '(&(objectClass=com.atlassian.sal.api.ApplicationProperties)(objectClass=com.atlassian.sal.api.ApplicationProperties))'
2022-10-06 12:01:01,465 ERROR [Spring DM Context Creation Timer] [OsgiPlugin] Unable to start the plugin container for plugin [plugin]
org.springframework.context.ApplicationContextException: Application context initialization for [plugin]
```

when ran on a remote agent.

how could i fixed it?


Answers:
author: Emilyvs
body: just delete the file the sdk generates and it works


Tags: app

developer
Change Branches Triggers via YAML specs
Asked by Matt:

Hi,

I have been playing around with bamboo specs in yaml to manage our CI.

Now I just stumbled accross a setting that is there in the UI but does not seem to be accessible via the specs at least not in yaml.

Is there a way to change for a plan the settings of Branches -\> Triggers (by default seems to be "Same as defined in parent") to "None. run new plan branches manually" when creating the plans via yaml bamboo specs ?

If not is there a way to accomplish the same result (i.e. only trigger the plans manually or at scheduled time)?

I skimmed through the documentation and could not find anyway to do so.

So far the branches part of my plan is:  

triggers:  
- polling:  
cron: 0 0 21 ? \* \*  
branches:  
create: manually  
delete:  
after-deleted-days: 2  
after-inactive-days: 5  
link-to-jira: true

<br />

but I would expect something like this (tried it and did not work :/):  
triggers:  
- polling:  
cron: 0 0 21 ? \* \*  
branches:  
create: manually  
delete:  
after-deleted-days: 2  
after-inactive-days: 5  
link-to-jira: true  
trigger: manually \<----- This matching the Triggers part of the Branches tab  

Attached what I would like to see if created as expected:![TriggersBamboo.png](/t5/image/serverpage/image-id/219259i8051F92FC10171B5/image-size/large?v=v2&px=999 "TriggersBamboo.png")

Thanks!  
Cheers,

Matt


Answers:
author: Eduardo Alvarenga
body: Hello [@Matt](/t5/user/viewprofilepage/user-id/5046823)

Welcome to **Atlassian Community**!

You have to use **branch-overrides** to achieve that. In the example below I'm assuming a default polling cron and a "Bitbucket Server Trigger" for the "master" branch (default) and an empty list for any other branches (.\*), meaning no triggers at all.

```
branch-overrides:
  - master:
    triggers:
    - bitbucket-server-trigger
    - polling:
      cron: 0 0 21 ? * *
  - .*:
    triggers: []
```

Thank you,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**

comments: author: Matt
body: Hi, it seems to do the trick.

Thanks!


Tags: trigger

yaml
extract_capabilities.sh script throws error
Asked by William Flow:

I use the script found at <https://confluence.atlassian.com/bamkb/how-to-export-a-remote-agent-capability-list-to-bamboo-capatilities-properties-format-1108676050.html>

    #!/bin/bashUSER=adminPASS=adminBAMBOO_SERVER="https://bamboo80.mydomain.net"CURL="curl -s -k -X GET"DELIMITER="@#CaPaBiliTy#@" # Set this to a string you know that will not appear on any Agent nameAGENTS=$(${CURL} -u ${USER}:${PASS} "${BAMBOO_SERVER}/rest/api/latest/agent/remote" | jq -r '.[] | .name|=gsub(" "; "_") | [.id, .name] | join('\"${DELIMITER}\"')')get_capability() {  ${CURL} -u ${USER}:${PASS} "${BAMBOO_SERVER}/rest/api/latest/agent/${1}/capability" \    | jq -r '.[] | .key|=gsub(" "; "\\ ") | .value|=gsub("\\\\";"\\\\") | [.key, .value] | join("=")' | sort}for AGENT in ${AGENTS[@]}; do  agent=(${AGENT/${DELIMITER}/ });  get_capability ${agent[0]} > bamboo-capabilities.properties-${agent[1]}done

I edit it with my username, password, and site, set it as an executable then run it and get error:

parse error: Invalid numeric literal at line 1, column 10

Shouldn't something you post on your site work out of the box?


Answers:
author: Eduardo Alvarenga
body: Hello [@William Flow](/t5/user/viewprofilepage/user-id/4551025)

That's a jq message. It means the input is not the one expected by the filter. Have you tried running each part of the script individually without piping it to *jq* and seeing the results?

As noted on the page, that script requires *jq 1.6*. Make sure to use that version or later.

Best regards,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**

comments: author: William Flow
body: I checked it looked right but no problem I re-wrote the script to make it work
Where are the support links for Bamboo?
Asked by Bob Rzadzki:

New Bamboo Data Center (9.0.0) installed recently, going through some growing pains. Twice now, the logs have pointed me to a page at Atlassian that isn't live. For example:

<https://confluence.atlassian.com/bamboo0900/bamboo-documentation-1167720713.html>

Is a dead link.

What's going on here? Where can I find the docs, troubleshooting guide, etc.?


Answers:
author: Eduardo Alvarenga
body: Hey [@Bob Rzadzki](/t5/user/viewprofilepage/user-id/331547)

Good to see you around again.

What do you mean by "dead link", is that a 404? Can you post a screenshot of Bamboo pointing you to that page and also the page itself?

Kind regards,

Eduardo Alvarenga  
Atlassian Support APAC


author: Peter Van de Voorde
body: Hey Bob,  

you can find the latest docs here: <https://confluence.atlassian.com/bamboo>   

Cheers,  
Peter
Issue in Installing Jira ON PREMISES
Asked by wejdan_alohaideb:

Hi all,

I am trying to install Jira On premises on my PC

but i get following ERROR: Could not open file legal\\java.xml.crypto\\ADDITIONAL_LICENSE_INFO

Have anyone faced this issue before? or anyone can help me to fix this

your help is appreciated


Answers:
author: Fabio Racobaldo _Herzum_
body: Hi [@wejdan_alohaideb](/t5/user/viewprofilepage/user-id/5044351) ,

welcome to the Atlassian community!

It seems an error relted to your jdk <https://bugs.java.com/bugdatabase/view_bug.do?bug_id=7094155> . Try to install jdk 1.8

Fabio

comments: author: wejdan_alohaideb
body: Thank you Fabio, I checked my javaer version and it is jdk 1.8.

what I did to fix the issue is restarting my PC. but right now I am able to start jira application on tomcat server. logs says "Failed to create server shutdown socket on address \[localhost\] and port \[8005\] (base port \[8005\] and offset \[0\])  
java.net.BindException: Address already in use: NET_Bind"


author: Nic Brough -Adaptavist-
body: That error message is not coming from the Bamboo or Jira install you claim to be running. It suggests your Java install has been damaged.

comments: author: wejdan_alohaideb
body: What do you mean by this, do I need to reinstall java?
How to check which build in bamboo are using maven dependencies
Asked by Vaibhav Dingreja:

I am a bamboo admin, and i want to know how can i check the build plans using maven or ant or node js dependencies and which version of it. Is their a script for it?


Answers:
author: Eduardo Alvarenga
body: Hello [@Vaibhav Dingreja](/t5/user/viewprofilepage/user-id/4814364)

When you say "using maven or ant or node js dependencies" are you referring to Bamboo [Executable Capabilities](https://confluence.atlassian.com/bamboo/defining-a-new-executable-capability-289277164.html)? If that's the case you can go get a list of each consuming plan by going to:

* **Bamboo Administration** -\> **Executables** -\> **\<*Executable Capability\>*** -\> **Jobs** or  
  **Deployment environments** (tabs)

If you are looking for something else, please provide us with a bit more context.

Thank you,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**
How to specify a non-default repository for a vcs.commit or .branch task in yaml spec
Asked by margo:

Hello,

This question can be ignored, the issue was caused by the repository id being part of the yaml spec file. changing this to defaultRepository like shown below fixed the issue:

```
  - any-task:
      plugin-key:com.atlassian.bamboo.plugins.vcs:task.vcs.commit
      configuration:
        commitMessage:'"bamboo: committing something"'
        selectedRepository: defaultRepository
```

The question remains though: how would one specify a different repository in this case?

Is that only possible by hardcoding the repository ID to selectedRepository?

for some unclear reason sometimes plans using a linked repository suddenly fail at a create branch task with the following error:

```
Error occurred while running Task 'Create branch to commit changes to' of type com.atlassian.bamboo.plugins.vcs:task.vcs.branching.
com.atlassian.bamboo.task.TaskException: Repository id 302514704 is invalid. Please reselect from the configuration screen.
```

We had this before with plans created via UI and were then able to fix this issue by going to the repository page and simply hitting safe again. We of course dont have that option with spec created plans as these cannot be changed via UI.

2 questions:

1. How can we fix this for a spec created job and

2. what exactly is causing this error in the first place?


Answers:
author: Eduardo Alvarenga
body: Hello [@margo](/t5/user/viewprofilepage/user-id/5040616)

You are right. You have to specify the Repository ID in quotes. For example:

```
- any-task:
    plugin-key: com.atlassian.bamboo.plugins.vcs:task.vcs.commit
    configuration:
      commitMessage: message!
      selectedRepository: '1114113'
    description: Commit and push to repository
```

Kind regards,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**


Tags: spec

yaml
How to import missing XSRF token in Bamboo for REST API Calls
Asked by venkat:

After updating Bamboo from 7.2.3 to 8.2.5 encountered this problem ,any suggestions where to import missing XSRF token for REST API Calls.


Answers:
author: Eduardo Alvarenga
body: Hello [@venkat](/t5/user/viewprofilepage/user-id/5040821)

Welcome to **Atlassian Community**!

Please check your previous Bamboo 7.2.3 ***\<bamboo-install\>/conf/server.xml***and look for any Proxy settings (ProxyName, ProxyPort, secure, scheme) on the connector that can be missing on the new instance.

Those settings need to be passed over to the new installation to allow XSRF checks to work.

Also compare the **myBaseUrl** setting on ***\<bamboo-home\>/shared/configuration/*** ***administration.xml*** (Bamboo 8) with the old one found on ***\<bamboo-home\>/xml-data/administration.xml*** (Bamboo 7)

Best regards,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**
To do I build a Status page hub?
Asked by Graham Chilcoat:

How does one build a status page hub like Atlassian has done here?  

<https://status.atlassian.com>


Answers:
author: Graham Chilcoat
body: I connected with Statuspage support. There is nothing that supports that. My theory is they have a separate site and have built their own status embed using the Statuspage API.

comments: author: Graham Chilcoat
body: I'll continue to search for an easier option but a StatusPage Hub would be an amazing new feature.


author: Mikael Sandberg
body: Go to <https://www.atlassian.com/software/statuspage> and click on the "Get it free" to start the guide to set up Statuspage. On the above link you can also learn more about the three types of pages you can create and the pricing model.

comments: author: Graham Chilcoat
body: I know how to create a status page I want to build a Status page hub. Just like this [https://status.atlassian.com](https://status.atlassian.com/).


author: Mikael Sandberg
body: My guess is that that hub is created via Confluence and [Scroll Viewport](https://marketplace.atlassian.com/apps/1211636/scroll-viewport-for-confluence?hosting=cloud&tab=overview), that is what Atlassian is using to create their documentation hub.


Tags: cloud