youngmon/atlassian-qna huggingface dataset:
Frequent SSH logins from Bamboo
Asked by Tim_Brigham:

I have Bamboo - 3.4.4 build 2812 - running on a windows box. My Git repositories are on a linux box.

Repositories are configured per plan with a URL like [ssh://coderepo/repo/.](ssh://coderepo/repo/..).

Shallow clones are enabled and the timeout is set to 180 minutes. There are only a couple dozen plans.

I'm getting over 500 SSH logins per hour from my bamboo server from the account we use to pull the code in. The sessions are short, about 1 second each.

I've already pushed up the logging in the log4j to all for both com.atlassian.bamboo.ssh com.atlassian.bamboo.plugins.ssh and org.apache.sshd. I'm not seeing anything that explains this behavior in the atlassiaon-bamboo.log file.  
Any insight would be much appreciated.


Answers:
author: Bryce Johnson
body: Hi Tim, what kind of polling levels have you set on your git repos in your bamboo plans/global repos?

Cheers, Bryce


Tags: ssh
Bamboo export seems to have hanged
Asked by Victor Bello:

I fired up an export of our Bamboo server, how long does this take? We don't have that many plans or data, and it's been going on for an hour.

The backup file has been untouched for most of that with a temp file next to it of 0 byte size. The size of the backup zip hasn't changed either. Is it hanged? Should I reboot the server? What whould happen if I were to reboot in the middle of an export? Can I get bamboo back up and running?

Please let me know soon, I need to get bamboo back up.


Answers:
author: Bryce Johnson
body: 1.) safe to reboot the server and I would do so to get back up and running

2.) nothing happens on the export except that the export file would be bad, which isn't a big deal

Can you find any exceptions in the server's logfile -- and if so to post?

Can you toss in your bamboo version to this report?


author: Victor Bello
body: Thanks for the reply Bryce, after another hour of waiting, the export finished, it ended up being 1.6 GB! I have no idea what it exported, but the server came back up. Again, thanks.

comments: author: Bryce Johnson
body: It's also trying to do your build artefacts on disk on the server. :/ We never used that feature, instead relying on filesystem and database backups instead of going through Bamboo's facility because it would indeed take hours for us to do it. There have been ideas of making just a "plan" export or a "plan by plan" export (and restore).

If you are like me, and like to use a lot of artefact passing or just the saving of certain artefacts for your build, you may want to have a look at and tweak the "build expiry" for each of your plans. You can specifically set the expiry of the build artefacts, history, and logs. Thus, for example, if your plan has artefacts that after an arbitrary amount of time you no longer care about, you could keep an infinite build history and logs while purging artefacts after a week(time setting) or after X amount of builds (whichever is longest).
Bamboo ldap integration
Asked by Guillaume RENARD:

Hello,

I am unable to connect my bamboo with a ldap server.

Could someone provide me a full atlassian-user.xml (without password of course). Thank you very much.

here mine

{code}

\<atlassian-user\>

\<repositories\>

\<hibernate name="Hibernate Repository" key="hibernateRepository" description="Hibernate Repository" cache="true"/\>

\<ldap key="ldapRepository" name="LDAP@ldap\*\*\*" cache="true"\>

\<host\>ldap\*\*\*\</host\>

\<port\>389\</port\>

\<securityPrincipal\>cn=Manager,dc=arte,dc=tv\</securityPrincipal\>

\<securityCredential\>\*\*\*\</securityCredential\>

\<securityProtocol\>plain\</securityProtocol\>

\<securityAuthentication\>simple\</securityAuthentication\>

\<baseContext\>dc=arte,dc=tv\</baseContext\>

\</ldap\>

\</repositories\>

\</atlassian-user\>

{code}

I havent't found a full example on the documentation...

best regards,

Guillaume Renard


Answers:
author: Sultan Maiyaki
body: Seems duplicate question to <https://answers.atlassian.com/questions/117869/unable-to-connect-bamboo-to-ldap>


Tags: openldap
Customer polls/marketing campaigns for adding plugins to OnDemand
Asked by Bryce Johnson:

I think it would be a fantastic idea to have a polling system where customers like myself can come in and vote on 1 plugin per OnDemand product. The results of this poll would be that Atlassian looks at adding that plugin as an offering in OnDemand. You could restrict the plugin list if you wanted to that we can vote on.

I see this as a nice marketing idea as well for OnDemand. Also a good T-shirt idea to add to my library of shirts.


Answers:
author: Gary
body: Heh - would be a great t-shirt Bryce! We are moving forward with the plugins beta for OnDemand and the platform will be available next year. Once we get there, voting on plugins would be an awesome idea - getting third party plugin vendors as well would be great as they would be the ones building the plugins. I'll pass this along internally - awesome feedback.

Cheers,

Gary

comments: author: Bryce Johnson
body: Sounds like there will also be another solution which I'm loving!


author: Adina Moldovan
body: Hi, any updates on this?

Thanks,

Adina


Tags: cloud

confluence-cloud

jira-cloud
How to: bamboo get resources defined within servlet
Asked by Christopher Dancy:

Assume the following servlet definition:

\<servletname="Build My Servlet"

key="myServlet"

class="com.whatever.MyServlet"\>

\<description\>Serves up build stuff\</description\>

\<url-pattern\>/MySummary\</url-pattern\>

\<resource type="freemarker" name="edit"location="/templates/myServletTemplate.ftl"/\>

\</servlet\>

From within the servlet class, and specifically the doGet method, how do I get ahold of that resources? I'd like to grab an instance of ModuleDescriptor somehow so that I can do something like the below but I can't seem to make anything work. Any suggestions would be great. Thanks.

ResourceLocation resourceLocation = moduleDescriptor.getResourceLocation("freemarker", "edit");


Answers:
author: Christopher Dancy
body: I got around this (or rather I did it the "correct" way) by using xwork/action instead of creating custom servlet.


author: James Dumay
body: I don't believe its easy to get a servlets resource without knowing how the guts of the Atlassian Plugin framework works. Have you tried getting the resource by calling getClass().getresourceasstream('/templates/myServletTemplate.ftl')?


Tags: app

resource

servlet
Block build if child builds are queued or in progress
Asked by Magnus Heino:

I know about the "Block build if parent builds are queued or in progress" dependency blocking strategies.

I would like a "Block build if child builds are queued or in progress" strategy. Is that possible to achieve?

We have a system that is made up of modules. Each module has a build plan. Every hour, a deployment plan takes all the latest modules, and deploys them on a server. That plan triggers a bunch of selenium system test child plans. These plans take some time to execute. Is it possible to somehow block the "deployment plan" from redeploying while there are triggered system test child plans that are still running?


Answers:
author: Cameron Ferguson
body: I don't think there is a built in way of doing this... but nothing says you can't get really creative with some odd-ball approach to achieve this :)

A possible solution would be to create a single agent that both parent and child plans rely on that gets tied up while the build is in progress, therefore not allowing one to start while the other is building.

Another solution would be to set up some script/program that queried Bamboo with the Atlassian Command Line Interface to see if that particular task was running.
> bamboo --action getPlan --server <http://localbambooserver:1234> --user bamboo_admin --password bamboo_admin_password --plan PROJECTKEY-PLANKEY

This will spit out something to the affect of
> Key . . . . . . . . . . . . . : PROJECTKEY-PLANKEY  
> Name . . . . . . . . . . . . : Project Key - Plan Name  
> Description . . . . . . . . . : Plan Description  
> Short key . . . . . . . . . . : PLANKEY  
> Short name . . . . . . . . . : Plan Name  
> Enabled . . . . . . . . . . . : true  
> Is active . . . . . . . . . . : true  
> Is building . . . . . . . . . : true  
> Is favourite . . . . . . . . : false  
> Average build time (seconds) : 265.0  
> Link . . . . . . . . . . . . : <http://localbambooserver:1234/rest/api/latest/plan/PROJECTKEY-PLANKEY>

Then you can parse out the "Is Building" line to see if it's "true" or "false". Just test this every 10-15 seconds or so in a script until it's no longer building, then continue on with the rest of the build.

A little bit of a messy approach, but it'll work :)
Is there a way to view status of all plans in a branch?
Asked by Kea Johnston:

Dear Atlasian,

When I log into bamboo, I see a list of all plans in trunk, their statuses, and their last completion date. On my project, we have different departments that are interested only in the outcomes of plans in a particular branch. For example, lets say all plans have a version in all branches. Team N might only be interested in the version of the plan in the "N" branch and not the plans in the "Q" branch. From what I can tell, the only way to get the status of a plan in a different branch is to find the plan in trunk on the main page, click on the little branch icon next to it, and select the "N" branch. You have to do this with each plan individually, which is very impractical for Team "N".

Is there a way I can make a "N" view that just shows the status of all plans in branch "N"?

Thank you!


Answers:
author: PiotrA
body: Hello,

I think what you need is not possible yet in the plain Bamboo. Maybe there exists some 3rd party plugin doing that, but I'm not aware of such. On the other hand, there is this recent improvement request in the Bamboo tracker: <https://jira.atlassian.com/browse/BAM-12584> - I think this is what you are after, and if it is - it would be a good idea for you to place your vote on that issue (and add yourself as a watcher).

Does it make sense? :)

regards,


author: Kea Johnston
body: So, keeping in mind that I'm kind of a bamboo newbie, this seems like it changes the functionality of the branches. I don't want to rearrange the actual builds or repos. I don't want to change the structure of the repositories at all. I just want to view all the plans in a particular branch without having to click on them individually. Am I misunderstanding you?


author: Bryce Johnson
body: One way that I did this was to create a bamboo project for the branches (e.g. JIRA 5.0 Branch, JIRA 4.4 Branch, JIRA Master, etc if I'm building our favorite issue tracker). After you do that, then create a global repository in bamboo for each of those branches. Then create the necessary plans that you want, leveraging the global repos you created. Then clone the one set of plans you created into the other bamboo projects for each branch.

Now, if you happen to want to have heaps of branches going with CI attached, the "plan branches" concept will work better. I don't always like this if I really want entries on the bamboo dashboard for each of those branches. Sounds like you are like me here and want a little better visibility for each of those important branches.

Cheers,

Bryce

comments: author: Kea Johnston
body: Keeping in mind that I'm kind of a bamboo newbie, this seems like it changes the functionality of the branches. I don't want to do anything that will affect the CI process or change the way the CI process is configured. I just want to view all the plans in a particular branch without having to click on them individually. Am I misunderstanding you?

I'm also working on a system that's already set up--all the plans are already created.


Tags: branch
sharing of data across different stages in bamboo
Asked by AmitB:

I would like to separate my build plan into separate stages. How can the installer and unit test stages use the binaries compiled in the initial build stage?


Answers:
author: PiotrA
body: Hi,

I think you should use "artifact sharing" feature in Bamboo. That is, create Bamboo artifact in the 'compile' stage to catch the binaries, and in the successive stages you would 'subscribe' to that artifact. For more information please visit:

* <http://blogs.atlassian.com/2012/02/artifact-sharing-build-automation-bamboo/>
* <https://confluence.atlassian.com/display/BAMBOO/Configuring+artifact+sharing+between+jobs>

regards!


author: Przemek Bruski
body: You can zip them and share between jobs in different stages as a Shared Artifact.

comments: author: AmitB
body: Can Bamboo zip the files, or do I need to do this manuallY?

Or should we just use this plug-in:

<https://marketplace.atlassian.com/plugins/com.pronetbeans.bamboo.filezip>
[greview gerrit plugin]How to restrict bamboo to poll the changes only on a particular branch
Asked by Guest test:

Hi,

We are using greview gerrit plugin to do make our continous builds,process is as soon as some developer submits a change to our gerrit datbase,bamboo greview plugin will see it ,the problem we are facing is ,the plugin is polling changes for a specific project across all branches,we want to restrict the poll to only a specific branch.

I do see a an option for "create branch" in the planconfiguration under branches tab,we filled-in the details for displayname(as name of branch) and branch description under"branch details" and enabled the branch but it doesnt seem to take affect.Anything we are missing or the plugin doesnt have the support.

Plugin we are using currently is from git clone git://github.com/onepremise/gReview.git

Please let me know quickly if any details are needed

Thanks


Answers:
author: James Dumay
body: Hi mate,

If you only want to build a single branch, edit the git repository configuration of the plan and specify a branch and make sure *Automatically manage branches* on the Branches configuration is disabled.

Thanks  
James
Can Bamboo not truncate the "Revision" value in the Build Results Summary page?
Asked by Brent Villalobos:

We just upgraded from Bamboo v3.2 to v4.3 (I know, large leap). One thing that is frustrating our users is that the value to the "Revision" field in the "Build Result Summary" page is cut off. Our revisions are timestamps like "2012/10/11 13:23:20". But in the Web UI, the value shows up as "2012/10...". If you hover over that value, a tooltip says:

"Unable to create URL -- please check your Web Repository configuration"

Users are very annoyed that the web UI trunacates the value. And while they can highlight, copy, and paste the full value, that is uneccessary work.

We haven't written a web repository plugin for our revision control system (a customized system built on top of AccuRev). Will we get the full timestamp listed in the web UI if we do implement that plugin? And if not, is there something else we can do to display the full timestamp in the web UI?


Answers:
author: Sultan Maiyaki
body: Hi Brent,

You might be facing this bug <https://jira.atlassian.com/browse/BAM-12043> tht was discovered when using repository browsers. Check if you find any error in the logs to confirm if that is the case.

comments: author: Brent Villalobos
body: Thanks for the advice, but I don't think that's it. BAM-12043 refers to a bug using a web repository plugin. My beef is with the default Bamboo UI behavior for plans that don't use a web respository plugin. It obviously has the full revision string since I can copy and paste it, so why did Atlassian put a seemingly-arbitrary character limit when displaying it in the web UI?


Tags: repository

source-control

web
Setting environment variables in bamboo
Asked by AmitB:

My build requires an environemnt variable to be set. The environment variable needs to contain the current root source directly (i.e. SRC_ROOT = "c:\\trunk")

I would like to set the environment variable in my **Visual Studio** task in the **Enviroment Variables** field, but would like to set it using the global bamboo variable **build.working.directory** rather than a full path. However, if I set SRC_ROOT=build.working.directory\\trunk it does not work. It only works if I set the actual full path name. Is there a way to make this work?


Answers:
author: Przemek Bruski
body: Use ${bamboo.build.working.directory} instead.

comments: author: AmitB
body: When I add a subdir it does not work: SRC_ROOT="${build.working.directory}\\trunk"

Is this possible?


author: PiotrA
body: try to add bamboo. prefix - all built-in variables start with bamboo.

SRC_ROOT="${bamboo.build.working.directory}\\trunk"


author: Przemek Bruski
body: That's right, sorry about that. See <https://confluence.atlassian.com/display/BAMBOO/Using+global,+plan+or+build-specific+variables> for a complete reference.
How to run Microsoft Coded UI test on Bamboo On Demand?
Asked by Mohamed Yoosuf:

How to run Microsoft Coded UI test on Bamboo On Demand?

When I was try to run its says "No agents meet the Job's requirements. This Job cannot be built in the Elastic Cloud."

Coded UI test should run Microsoft Test Agent.


Answers:
author: shamira dias
body: I have a same problem in configuring Bamboo(On demand) and MS agents.

I am writing my uI test cases using Coded UI.

I hope atlassian has a solution to it


author: Bryce Johnson
body: First, you would need to add Microsoft Test Agent to a new image that you create and add the capability to the image definition in bamboo admin and then finally make that capability a requirement in your build job. Please see the answers here:

[https://answers.atlassian.com/questions/115835/how-can-i-add-a-gradle-capability-to-the-elastic-build-agents-for-on-demand-bamboo](/questions/115835/how-can-i-add-a-gradle-capability-to-the-elastic-build-agents-for-on-demand-bamboo)

comments: author: Mohamed Yoosuf
body: Thanks Bryce.

I completed all the step and ran prepareInstanceForSaving.bat and its successfull. How can I get AMI id of the new image.

Message

processed file: c:\\opt\\bamboo-elastic-agent\\etc\\rc.local  
Successfully processed 38 files; Failed processing 0 files  
If it's your internal image, it's safe to just save it now. Otherwise,  
you may want to remove some build files/authorisation data/Maven caches from c:\\build-dir and c:\\Users\\Bamboo first.  
Press any key to continue . . .


author: shamira dias
body: I have a same problem in configuring Bamboo(On demand) and MS agents.

I am writing my uI test cases using Coded UI.

I hope atlassian has a solution to it


Tags: cloud
Plan dependencies in bamboo
Asked by AmitB:

I would like to build several tools separately which are all based on a common software layer also build in bamboo. What is the best method to do this?

I would like to first build the common software layer, then build each tool in a separate plan which should reside in the same output directory as the common software layer. However, if one tool's build breaks, I would like the others to succeed independently.


Answers:
author: James Dumay
body: Hi AmitB,

If you have a common place to copy the output of each build so that the next build can access it, this should be easily done using [Dependencies](https://confluence.atlassian.com/display/BAMBOO/Setting+up+plan+build+dependencies) and have the common layer Plan trigger the child Plans on build success. In this configuration, it is possible to build the dependencies of each build without having the common layer modules plan passing.

Hope this helps!  
James
How can I add a Gradle capability to the elastic build agents for on-demand Bamboo
Asked by JohnS:

My builds run Gradle, and I am using Bamboo on-demand. Currently, the elastic instances have ant and maven, but not gradle. Is it possible to add Gradle to the default elastic agents?


Answers:
author: Fahd
body: Hi John,

In order to have Gradle as one of image capabilities, you can either implement it using EBS or custom image(based on default image).

See <https://confluence.atlassian.com/display/BAMBOO/Configuring+elastic+instances+to+use+the+EBS> for more information on setting EBS.

Creating custom image:

Linux - <https://confluence.atlassian.com/display/BAMBOO/Creating+a+custom+elastic+image>

WIndows - <https://confluence.atlassian.com/display/BAMBOO/Creating+a+custom+elastic+image+-+Windows>

Hope these help.

Cheers,  
Fahd


author: Oliver Hagel-Doll
body: Is this still the only option to run Gradle builds on elastic agents? Still no proper support as capability?


Tags: cloud
Bamboo builds and dependencies
Asked by Stefan Johansson:

Hello, let's assume I have three .NET projects to build. Each of them produce DLLs that the next depend on to build.

So the build order has to be 1,2,3 obviously. I cannot seem to find any information on how to work with dependencies and Bamboo. If I build project 1, how can the output (DLLs) of that build be used in the build of project 2 and how would they actually be referenced (assuming everything is on BitBucket)?

We are currently using CruiseControl locally and this is straight forward since it's basically like building it on your own machine locally. It builds the projects in order, places the output in defined output directories which then the following projects uses for the dependencies.

Thank you.


Answers:
author: Bryce Johnson
body: Unfortunately you can't share artefacts between plans, which a lot of customers would like to do. You would need to have those builds in one plan, with each build being in its own stage making three stages to your plan.

In each build you can then share the artefact and set the path to the expected location of the artefact to with with respect to the build working directory. So you would create an artefact definition in stage 1's job, share it, then in stage 2's job make that an artefact dependency and toss it into the directory where your consuming build expects it.

If you don't want one singular plan with 3 stages and their associated jobs, you could have three plans with plan 1 being the parent of plan 2 and plan 2 being the parent of plan 3. However, you would then need to ship your artefacts to a network/shared drive or deploy the artefact with a dependency management tool like maven from plan 1 then depend on it from plan 2.

Cheers,

Bryce


author: LucasA
body: Hi,

You have to configure each build as a task of the same plan, using the same logic that you are using on the other tool. Check the tasks do only run if the previous one has been correctly executed.


Tags: .net

cloud

dependency
Bamboo compatible with MS SQL 2012?
Asked by Sagar Parikh:

Does anyone know if Bamboo is compatable with SQL server 2012?


Answers:
author: Jobin Kuruvilla [Adaptavist]
body: Not officially supported. See <https://confluence.atlassian.com/display/BAMBOO/Supported+platforms>

comments: author: Sagar Parikh
body: Are there any know issues with it or is it something we are just waiting on atlassian for?


author: Jobin Kuruvilla [Adaptavist]
body: No idea. You can test it yourself. It might work just fine.