youngmon/atlassian-qna huggingface dataset:
Number of Bamboo Projects/Plans/Agents
Asked by CS:

I am trying to get a sense of the limits of an optimal Bamboo implementation. Obviously builds vary a great deal, hardware differs etc. That said, what are the largest successful production Bamboo implementations at present? Specifically, how many projects/plans and agents are in use?


Answers:
author: Alexey Chystoprudov
body: Bamboo is one of the most scalable solution on market:

* up to 250 online agents.
* some clients have Bamboo instances with hundreds of projects and thousands of plans

comments: author: CS
body: Sure understood, Bamboo is scalable. I work with an implementation that has over 1,000 projects and over 15,000 plans. What I am considering is at what point a more optimal solution would involve splitting of into different sets of servers and corresponding agents. So I am interested in specific sizes of larger implementations.
Migrate from cloud
Asked by AUGUSTO:

Hi guys, i migrated my bamboo cloud to server following the official docs, and all worked like a charm.

My problem begins when i try to run a deployment projects, i get an error like " Error when starting a new instance"

Here are my stack trace:  

ERROR \[scheduler_Worker-10\] \[ElasticInstancesMonitorJob\] Failed to adjust the number of elastic agents.  
com.atlassian.aws.AWSException: Error when starting a new instance  
at com.atlassian.bamboo.agent.elastic.server.ElasticFunctionalityFacadeImpl.startupAgents(ElasticFunctionalityFacadeImpl.java:219)  
at com.atlassian.bamboo.agent.elastic.schedule.ElasticInstancesMonitorJob.execute(ElasticInstancesMonitorJob.java:50)  
at org.quartz.core.JobRunShell.run(JobRunShell.java:223)  
at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:51)  
at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)  
at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)  
at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)  
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)  
Caused by: java.lang.IllegalArgumentException  
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:108)  
at com.atlassian.aws.ec2.model.SubnetId.\<init\>(SubnetId.java:37)  
at com.atlassian.aws.ec2.model.SubnetId.from(SubnetId.java:54)  
at com.atlassian.aws.ec2.model.SubnetId$2.apply(SubnetId.java:30)  
at com.atlassian.aws.ec2.model.SubnetId$2.apply(SubnetId.java:26)  
at com.google.common.collect.Iterators$8.transform(Iterators.java:799)  
at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)  
at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:271)  
at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:226)  
at com.atlassian.aws.ec2.model.ResourceId.from(ResourceId.java:59)  
at com.atlassian.aws.ec2.model.SubnetId.from(SubnetId.java:72)  
at com.atlassian.bamboo.agent.elastic.server.ElasticFunctionalityFacadeImpl.getVpcsAndSubnets(ElasticFunctionalityFacadeImpl.java:273)  
at com.atlassian.bamboo.agent.elastic.server.ElasticFunctionalityFacadeImpl.ensureSecurityGroupsExist(ElasticFunctionalityFacadeImpl.java:291)  
at com.atlassian.bamboo.agent.elastic.server.ElasticFunctionalityFacadeImpl.startupAgents(ElasticFunctionalityFacadeImpl.java:181)  
... 7 more


Answers:
author: Alexey Chystoprudov
body: looks like configuration issue. Please create request at support.atlassian.com


Tags: bamboo-administration
Bamboo nunit-console not running [SetUp] section
Asked by jon_gordon:

Hello,

Platform: macOS 10.12.2  
Product: Bamboo 5.14.3.1 build 51416

I am having huge trouble trying to get Bamboo to recognise nunit-console.exe run via mono as a recognisable executable for NUnit Runner so have split the task into a script and NUnit parser instead.

In the script, I am simply running:  
MONO_IOMAP=all NUNIT-CONSOLE path/to/csproj

When I call the exact same line from a terminal, my test suite executes and passes but everytime it is run through Bamboo, I get a System.NullReferenceException and the line numbers provided suggest the \[Setup\] section is not being called.   
Indeed, if I remove the \[Setup\] attribute from my test, I get the same error in terminal then.

Output from both terminal and bamboo show it is running the same version of nunit-console (of course) so I do not know why I am getting different outcomes.

Any ideas?


Answers:
author: Alexey Chystoprudov
body: Just guessing.

Try to pass MONO_IOMAP=all as Environment variable in separate field of Script task

comments: author: jon_gordon
body: That, unfortunately, does not change anything.

I do not understand why the result is different - it's looking at the same .csproj file and running the same nunit-console executable through the same version of mono. What is causing the test to run differently when the script task is run by Bamboo?  
If anyone can shed any light on what is different in general about running scripts through Bamboo, I might be able to put 2 and 2 together...?


Tags: mac

nunit
Problem after installing Bamboo
Asked by Thiago Escobar:

I installed bamboo as a service on my centos 6 server, but when i start it and try to access the url (localhost:8085) there is nothing running. i accessed the logs and found this error message.   

<br />

SEVERE \[localhost-startStop-1\] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class com.atlassian.bamboo.session.SeraphHttpSessionDestroyedListener  
java.lang.UnsupportedClassVersionError: com/atlassian/bamboo/session/SeraphHttpSessionDestroyedListener : Unsupported major.minor version 52.0 (unable to load class com.atlassian.bamboo.session.SeraphHttpSessionDestroyedListener)

can anyone please help me get this running?


Answers:
author: Bruno Rosa
body: Hi Thiago, the **Unsupported major.minor version 52.0** error happens when we try to run a class that was compiled using the Java 8 compiler into a lower Java version e.g. Java 7 or Java 6. This is the case with the Bamboo Server (and remote agents) after Bamboo 5.10.x. Java is backward compatible, meaning we can run a Java class file (or JAR file) compiled in a lower version (Java 6) into a higher version e.g. Java 8, but it doesn't mean we can run a class compiled using Java 7 into Java 5. Why? because higher versions usually have features that are not supported by lower versions.

If you have multiple Java versions installed, please make sure that the latest one comes first in the PATH environment variable. This is to say, you need to ensure Bamboo is starting up using Java 8, otherwise it won't work.

comments: author: Thiago Escobar
body: i do have more than one java version installed. how do i set the PATH so the latest comes first? I thought that only setting the JAVA_HOME variable to the correct path would do the trick, but i am probably mistaken ![sad](/html/@C495B4504065515364EB1894F812B34C/images/emoticons/sad.png "sad")


author: Bruno Rosa
body: Thiago, if you're running Bamboo on a Linux box, this is what I mean: <http://superuser.com/questions/135580/multiple-java-environment-on-the-same-linux-machine>. On the other hand, if you want, you can also force Bamboo to start using a specific Java version. In this case you can edit the **\<BAMBOO_INSTALL\>/bin/start-bamboo.sh** file and add the following to the first line of the file:
>
> ```
> JAVA_HOME="path/to/java"
> ```

Please replace the path with the actual path to Java 8.


Tags: bamboo-administration
Is there any way to automate the process of re-rerunning failed tests
Asked by Dayanath:

*This question is in reference to Atlassian Documentation: [Rerunning a failed stage](https://confluence.atlassian.com/pages/viewpage.action?pageId=289276867)*

I want to automate the process of re-running only the failed tests if the failed tests are more than a predefined percentage.


Answers:
author: Dayanath
body: Thought you have some idea about this.

Sorry for the inconvenience caused.


author: Nic Brough -Adaptavist-
body: Please don't mention me just because you've asked a question. Why should I choose to answer it over anyone else's just because you've spammed me with something that I might not even be able to help with?


author: Dayanath
body: @Nic Brough \[Adaptavist\]  
@Jamie Echlin (Adaptavist)
How do people retain bamboo builds which have gone into production, without them being caught up in the bamboo retention policy to make effective use of disk capacity on the bamboo server?
Asked by Bedelia Wolverton-Kettrick:

When using the global expiry policy in bamboo to make effective use of storage capacity on the bamboo server. We would use labels to indicate a build to be preserved. We have a concern that the labels however could be deleted without our prior knowledge, leading to a build which is in production being expired and removed.

Has anyone found a way to restrict deletion of labels once applied to perhaps a group of administrators to mitigate the risk of build being expired incorrectly due to deleted labels?

Many Thanks


Answers:
author: Alexey Chystoprudov
body: One of the approach to track build results used for release is Deployments feature. User links build result to named release and configure expiry to skip such builds. If you don't use Deployments feature you can use this approach instead of labels.

<https://confluence.atlassian.com/bamboo/deployment-projects-338363438.html>

comments: author: Bedelia Wolverton-Kettrick
body: We do use deployment projects, but I'm unsure how you can configure the expiry to skip such builds without using labels, can you elaborate please Alexey?


author: Alexey Chystoprudov
body: Use global expiry - <https://confluence.atlassian.com/display/BAMBOO/Configuring+global+expiry>


author: Bedelia Wolverton-Kettrick
body: Thanks Alexey,

My concern is that the label could potentially at a later date be deleted accidentally or maliciously.

Then when the expiry policy executes it's rules the build will be expired as it no longer has the label.

Has anyone found a way to mitigate this risk?


Tags: bamboo-administration
How do people link change records with bamboo deployments?
Asked by Bedelia Wolverton-Kettrick:

We're using Git for source control, Bamboo for builds, Bamboo for deployments and Remedy ARS for change management.  
I'm looking for automated trace-ability between the Remedy ARS Change Record and the Bamboo deployment to show which change record authorised deployment.  
As we don't use JIRA for change records we cannot simply use the JIRA Bamboo integration.

Does anyone in the community have any working examples of a similar set-up with change records in a tool with no simple interface to bamboo yet providing automated trace-ability from deployment to change record?

Many Thanks


Answers:
author: Bedelia Wolverton-Kettrick
body: So Divin, does the script preserve the change record details within Bamboo somehow? or are you recording the bamboo details in the change record? Can you elaborate for me please?

comments: author: Divin Honnappa
body: In my case I'm having the script after I copy files to server. When I'm calling the service there are some bamboo variables that I pass to the API(artifact id, Version number and location). You can see the bamboo variables when the deployment project is running. The API collects info from change ticket and sends out email with the ticket number to the manager to approve the change request.

I think we can have the script to log the ticket number as well at the end or we can have some kind of message sent out in the form of JIRA comment. But since you're not using JIRA and if you want to just use bamboo, I think it has to be in log or some kind of commit back to your git repo with the ticket number.


author: Divin Honnappa
body: We have an API service that collects details from bamboo and requests the change ticket.

At the end of deployment process we have a script that calls this service and pass the bamboo variables to that service.


Tags: bamboo-administration
Bamboo agents after migration from Windows to Linux
Asked by David FALLAS:

In preparation for migrating a production Bamboo system from Windows Server 2008 to Linux (Ubuntu) we have set up a test Bamboo system on Linux and imported the backup zip file from the existing Bamboo production system.

We have installed a remote agent on a new Windows Server 2012 machine which appears to successfully register itself with the test Bamboo system on Linux.

I am however uncertain about what steps to take next. All of the current production build plans and history have imported into the test system correctly, but of course all of the jobs that were configured to build .Net applications now fail because they cannot find an agent to run MSBuild etc.

My question therefore is:

Do I need to delete all of the .Net builds on the new test system and re-create them from scratch using the remote agent running on Windows Server 2012 - or - is there a way to 'switch' them from the previous default agent (which no longer has MSBuild capabilities as it is running on Linux) to the remote agent which does have MSBuild capabilities?


Answers:
author: rsperafico
body: Hello David,

You will be required to add the Microsoft capability in Bamboo to the remote agent on Windows Server 2012 machine. Once you do, you need to make sure the Microsoft tasks within the Jobs are referring to this new capability, otherwise, they will still be making reference to the capability from your previous Bamboo instance on Windows Server 2008.

Kind regards,

Rafael

comments: author: David FALLAS
body: Hello Rafael,

Thank you for your quick response. Your answer put me on the right path. Though I did have to remove all of the capabilities from the default local agent (now Linux) first.

The remote agent appears to have an ability to 'auto detect' capabilities which now display correctly (i.e. I didn't need to add them).

Once the above was complete, jobs then declared `no agent can run this job`. I needed to go through each of them to select the respective MSBuild executable from the drop-down list in all MSBuild task(s).


Tags: bamboo-administration
how to obtain the artifact directory of a plan? (bamboo v5.14)
Asked by P Palm:

The artifact folder created in bamboo v5.7.1 used to be:   
\~/bamboo-home/artifacts/FC-FB/shared/build-00002

In bamboo v5.14 the artifact folder appears be:  
\~/bamboo-home/artifacts/plan-27131907/shared/build-00002

<br />

During our builds, a script is referring to the artifact path, using the bamboo variable ${bamboo.planKey}.  
But as you can see, the plankey is no longer a part of the artifact directory.

How can I correctly obtain the artifactory directory path from within a build plan script?  
I can't find a variable that is matching the part 'plan-27131907'

Best regards,  
Patrick


Answers:
author: rsperafico
body: Hello,

Please, refer to <https://confluence.atlassian.com/display/BAMKB/Artifacts+in+Bamboo+Server>

Kind regards,

Rafael


author: P Palm
body: Thanks Rafael Sperafico,

That was the exact info I needed.


Tags: bamboo-administration
How can I tell if a Bamboo export is still running?
Asked by Jason Horn:

I am running Bamboo behind Apache. I kicked off an export, but I think my proxy has timed out (getting 502 on the /admin/export page) before the export has completed. Is there anything I can look at to see if the export is still running? I am running bamboo on RHEL linux.

Thanks!


Answers:
author: rsperafico
body: Hello Jason,

You could do the following:

1. run the following REST API call

   ```
   curl -k -u BAMBOO_ADMIN -p -H "Content-type: application/json" -X GET BAMBOO_BASE_URL/rest/api/latest/info
   ```

   As a response, you would get:

   ```
   &lt;info&gt;  &lt;version&gt;5.14.1&lt;/version&gt;  &lt;edition/&gt;  &lt;buildDate&gt;2016-11-04T08:05:38.000-02:00&lt;/buildDate&gt;  &lt;buildNumber&gt;51413&lt;/buildNumber&gt;  &lt;state&gt;PAUSED&lt;/state&gt;&lt;/info&gt;
   ```

2. look for the following entries on Bamboo logs:

   ```
   201X-XX-XX 13:23:31,235 INFO [http-bio-8085-exec-11] [XmlMigrator] Finished updating zip201X-XX-XX 13:23:31,235 INFO [http-bio-8085-exec-11] [XmlMigrator] Ensuring the the file has been unmounted201X-XX-XX 13:23:31,237 INFO [http-bio-8085-exec-11] [XmlMigrator] Unmounted &lt;bamboo-home&gt;/exports/export_bambooVersion_release_20XXXX20.zip201X-05-20 13:23:31,237 INFO [http-bio-8085-exec-11] [XmlMigrator] Export completed. 0:00:31.788
   ```

---

Kind regards,

Rafael


author: Jonas Andersson
body: I see this quite often but i allow the traffic to pass without rewrites on the high portnumbers which were never used by our organization anyway. This has been a blessing while doing POC of Atlassians other tools, as it allowed me to quickly link applications that not yet had shared SSL certs in each others keystores, without the imports and restart of the whole application stack. This means that if i know i am about to do a reindex/backup/restore i connect to http://bamboo:8085 rather than <https://bamboo>

The correct workaround would be to increase the session timeout on the apache, but if any of the applicationservers behind the proxy goes down, it might build up connections that zombies, ultimately reaching the apaches max connections, and killing the service.


Tags: bamboo-administration
Rerun a part of a completed build.
Asked by Joseph Barker:

Can I rerun part of a completed build after it is done? ie. I have a stage to compile my code and create artifacts for the installers to use in the next stage. The installers pass the build but on testing I find that the artifact checkout for one job was incorrect. The compile of the code was good and the artifact was good but my config for the pulling of the artifact was wrong. How can I rerun just that job or just that stage, using the already completed prior stage.


Answers:
author: Divin Honnappa
body: I was having the same problem with stages. Even though the artifact is build and I even added a script task to check that it exists, but the next stage was not picking up the artifact.

For my case, artifact was built in a target location of checkout directory. In the scp task for installation, I selected from local files and provided the artifact details (eg target/{artifact.id}.war).

comments: author: Joseph Barker
body: The artifact checked out to the correct folder. However, the folder I entered was wrong. I just want to rerun the stage with the new checkout location for the artifact. If there is a way to do that awesome if not I can try breaking the stages apart into plans and add dependencies just in case I ever need to rerun the installers but not the full compile of code again.

Thanks for the quick reply.

Joseph.


author: Divin Honnappa
body: It's usually a pain when you see the artifact is building correctly and into right location but the next stages says the artifact is not found in that location even though the config is correct.

I would say break your stages into two plans for your case. Because I've seen cases where the second stage did recognize the artifact sometimes and sometimes it didn't for same configuration.

-Divin


Tags: bamboo-administration
How to get list of all projects and plan names from bamboo server
Asked by jagannathan:

I need to pull all Project and plan file name in bamboo server to get total count.

Using rest api or cli . Please help


Answers:
author: rsperafico
body: Hello jagannathan,

```
curl -k -u [USERNAME] -p -H "Content-Type: application/json" -X GET [BAMBOO-BASE-URL]/rest/api/latest/project
```

<https://docs.atlassian.com/bamboo/REST/5.14.3.1/#d2e1539>

Kind regards,

Rafael

comments: author: jagannathan
body: Thanks for helping . But when I ran this command on Bamboo server. Im getting below error.

**curl: (3) \[globbing\] errpr: bad range specification after pos 2**

How to proceed further. please help me


author: rsperafico
body: Hello jagannathan,

Have you replace the \[USERNAME\] (i.e. admin) with a Bamboo's username and \[BAMBOO-BASE-URL\] with the URL to your Bamboo instance (i.e. <http://localhost:8085)> ?

Doing the replaces, you would have:

```
curl -k -u admin -p -H "Content-Type: application/json" -X GET http://localhost:8085/rest/api/latest/project
```

Kind regards,

Rafael


author: jagannathan
body: Thanks Rafael. It's working.

Since I'n not admin in bamboo server it is getting listed only to the projects which I have access. Is my assumption is correct ?

Is there a similar way to get list of all plans list.

Regards,

Jagan


author: rsperafico
body: > it is getting listed only to the projects which I have access

Yes, you are correct on your assumption.
> Is there a similar way to get list of all plans list.

```
curl -k -u admin -p -H "Content-Type: application/json" -X GET http://localhost:8085/rest/api/latest/project/&lt;PROJECT_KEY&gt;?expand=plans
```

<https://docs.atlassian.com/bamboo/REST/5.14.3.1/#d2e1553>


Tags: bamboo-administration
different server ids migrating bamboo cloud to on premise server?
Asked by Brad McCoy:

how to go about license key when we have two different server ids migrating bamboo cloud to on premise server?


Answers:
author: Nic Brough -Adaptavist-
body: Cloud and Server licences are totally separate things, and the licences are not transferable.   

In the case of migrating Cloud to Server, then technically, you need to buy your server licence, migrate, and then cancel your Cloud subscription. In real life, get an evaluation licence for the server, do your test migration runs, migrate, cancel your Cloud subscription, and then buy the server licence before the evaluation expires.

comments: author: Brad McCoy
body: Hi thanks for you quick answer, i should have put more detail into my question, we were under the impression that because Atlassian are discontinuing there bamboo cloud they are offering a free license for us to migrate over with as per the guide:

<https://confluence.atlassian.com/migration/bamboo-server>

"If you're migrating from Bamboo Cloud, we're offering you a free perpetual Bamboo Server license. You can get it from your [MyAtlassian account](https://my.atlassian.com/).

For more information, see [the Bamboo End of Life documentation](https://confluence.atlassian.com/bamboocloud/bamboo-cloud-eol-827125716.html)."

When we sign into MyAtlassian it allocates the server ID which is different to our new instance we made on our on premise windows server..

With those details does that change your answer?

Thanks again,

Brad


author: Nic Brough -Adaptavist-
body: Not really. It just means you need to tell your Atlassian account the new server id in the step "buy your server licence"