youngmon/atlassian-qna huggingface dataset:
Bamboo support for Findbugs - no support for multimodule builds
Asked by David Boden:

I'm putting this review of the Bamboo Findbugs plugin here because the [plugins.atlassian.com](http://plugins.atlassian.com) review function is broken. I'd like to get some feedback about whether there are any plans to improve the plugin:

I'm using version 2.7 of the Bamboo Findbugs plugin on version 3.2.2 build 2718 of Bamboo.

The findbugs report is hidden away on the Job page rather than at front-of-house like it is on Jenkins CI. It's also linked to the overall Job rather than the particular run of a Job (e.g. execution #8). That makes some sense as I guess the plugin is serving up the current state of the build directory. Luckily, I don't choose to clear down my build directory \*after\* builds. I haven't tested, but I'm not too confident that the plugin will work with multiple remote agents.

The showstopper for me is that it doesn't support multimodule builds. I have the Miscellaneous --\> Findbugs configuration set to look in \*\*/target and the findbugs plugin adds the tab into the Job results. Unfortunately it displays nothing but an empty graph.

Also, warning message when displaying the plugin page:

This page seems to be using a legacy way of displaying the tabs. Please contact the plugin developer. The page should be fixed to specify a specific decorator ('plan') please visit the plugin upgrade guide for details.

I'm surprised to see this bearing in mind the plugin is maintained by Atlassian Labs.


Answers:
author: PiotrA
body: There is currently no plan to update the plugin. However, as it has been requested a few times we probably will look how much work it would be to update and make the findbugs plugin compatible.

I've created a ticket in the Bamboo team tracker <https://jira.atlassian.com/browse/BAM-10177> for that issue.

regards,


author: David Boden
body: <https://jira.atlassian.com/browse/FNDBUG-1> - this bug is closed, indicating that multimodule builds should be supported.


Tags: metric
Is there a difference between agents with JDK capability and agents with builder capability in bamboo ?
Asked by Annie James:

I am trying to run selenium tests as part of a bamboo build configured in a windows machine. It throws 'Unable to launch browser ' exception when it is run using an agent with both JDK and builder capabilities. When I tried running it using an agent only with JDK capability, it runs fine. Is there a difference between agents with JDK and builder capability in bamboo ?


Answers:
author: Joe Clark
body: This is not directly related to your questions, but I've found a common cause of being unable to launch Selenium from a Windows bamboo agent is because the agent is configured to run as a Windows service. In modern versions of Windows (ie. anything newer than Windows 2000) any process that runs as a service is prohibited from interacting with the desktop by default.

Windows services are unable to launch a browser window (as required by Selenium) because it cannot communicate with the Windowing API.

To get around this, you either need to run Bamboo from a logged-on user session, or configure the service to allow interaction with the desktop.

If you've already ensured this is correct, or you're not running your agent as a service, I apologise for the old info. :-)

comments: author: Annie James
body: Thanks for your response. The bamboo build (Versions 3.0.1) is just configured with local agents having shared builder and jdk capabilities. Will they run as service by default ? If so how do we configure them in bamboo to run interact with desktop ? Sorry, I am new to Bamboo and I couldnt get much info from the Bamboo docs on this.
Automatically manage plans based on git branches in bamboo
Asked by Michael Gorbach:

We have a workflkow where we use task branches to develop larger features. Features get developed tested, and effectively completed on task branches, then merged into master. We would like to automate the process of creating bamboo plans for each task branch, which are all the same except they differ in the branch of the git repository that they are set to build. How do I make this happen? My research so far indicates that there is still no REST api to create Bamboo plans, so we would need to use Java to write a plugin for Bamboo to do this, possibly wrapping that in a REST api. Is this the only way to get the behavior we want? I'm surprised it's so difficult, becasuse I'd imagine this to be a quite common workflow.


Answers:
author: Jens Schumacher [Atlassian]
body: Hi Michael,

It is a quite common workflow and we have plans to address this in the first quarter of 2012. I would love to get in touch with you to learn more about your process and see if it matches up with what we have planed.

Feel free to contact me under jens at [atlassian.com](http://atlassian.com)

Cheers,  
Jens


author: Stu Megan
body: Any update on when this feature will be implemented for Bamboo. I basically want to run a plan first on branch X of a repository then again on branch y.. using one plan to do both automagically in one pass. so any tools coming to aid this would be a great help.

thanks

Stu

comments: author: Przemek Bruski
body: The timeframe hasn't changed, this feature is being developed and will be made available in the first quarter of 2012. Your use case will be covered.
Bamboo pulls entire directory tree from perforce
Asked by Cameron Ferguson:

We have had this on and off issue where for some reason when we pull our project from perforce with Bamboo, it gets caught up in downloading the entire directory tree from the top-level, instead of just the root of the project we are wanting. We can work around this issue by simply recreating the plan, and then it will work.

Example...

If I am wanting to retrieve //MyProd_DOG/Animal/Canine/Dog/...

when it works correctly, we get just the contents of "dog" as our root working area. When it breaks, I will get the entire directory structure "(root)/Animal/Canine/Dog/..." and i can't call my scripts anymore. Like I said, when I recreate the plan, it resolves itself. this is usually triggered when I make adjustments to the plan. The plan will work fine, then I will go in, adjust a task of a job or something, like the description, save it, and then it screws up.

Any ideas?


Answers:
author: James Dumay
body: Cameron,

The [Bamboo Automatic Clover Coverage](http://confluence.atlassian.com/display/BAMBOO/Using+Bamboo+with+Clover) currently has no way to exclude sources from coverage calculation.

If you want to exclude coverage you will need to use the Manual Clover option in Bamboo and manually configure [Clover for Ant](http://confluence.atlassian.com/display/CLOVER/Clover-for-Ant) or [Clover for Maven](http://confluence.atlassian.com/display/CLOVER/Clover-for-Maven+2+and+3) to exclude the source files you want.

Thanks,

James
How to detach a Script started Process from Bamboo
Asked by Christian Schneider:

Hi,  

<br />

i\`am trying to run a detached shell script from Bamboo on a Windows XP Box. Server Version is 3.3.2 and i\`am running a standalone Client jar.  

Reproduce with a Script Job with the simple Inline Script (also tested with a called script from the local machine) which does:  

START "test" /Min cmd  

This spawns a detached local command shell. But Bamboo stalls after starting and you have to close the shell to end the build plan sucessful. This seems to be not the proper behaviour.


Answers:
author: Christian Schneider
body: After some more reading into the Details of Java\`s System Exec Mechanism i\`ve come to the following solution to the matter (inspirend from the Hudson Wiki):

The reason this problem happens is because of file descriptor leak and how they are inherited from one process to another. Java processes and their child process are connected by three pipes (stdin/stdout/stderr.) This allows for capturing the output from the child process. Since the child process may write a lot of data to the pipe and quit immediately after that, the Parent needs to make sure that it drained the pipes before it considers the child to be ready. Usually this is archived by waiting for EOF or null on the reader.

When a process terminates for whatever reasons, the operating system closes all the file descriptors it owned. So even if the child process didn't close stdout/stderr, the parent Process will nevertheless get EOF.

The complication happens when those file descriptors are inherited to other processes. Let's say the child process forks another process to the background. The background process (AKA daemon) inherits all the file descriptors of the parent, including the writing side of the stdout/stderr pipes that connect the child process and the parent Java Process. If the daemon forgets to close them, the Parent won't get EOF for pipes even when the child process exits, because daemon still have those descriptors open. That's how this problem happens.

A good daemon program closes all file descriptors to avoid problems like this, but often there are bad ones that don't follow the rule.

A possible solution to still fork Deamon\`s is to use Baseline operating System Mechanisms.

From Windows one can abuse at with Ant\`s exec Task:

\<tstamp\>  
\<format property="after_1_min" pattern="HH:mm" offset="1" unit="minute"/\>  
\</tstamp\>

```
<exec executable="at">
  <arg value="${after_1_min}" />
  <arg value="/interactive" />
  <arg value="${jboss.home}\bin\run.bat" />
</exec>
This will run JBOSS after one Minute trough at scheduling AND end the Build with succes.

Another possible solution is SCHTASK.

Unix Users shall aquire http://software.clapper.org/daemonize/ which should be sufficient.
```


Tags: script
Is the Clover plugin / integration available for Bamboo Atlassian OnDemand?
Asked by Jim Bethancourt:

I'm planning on starting an open source project in the near future and am looking around at the different project infrastructure suites. Will the Clover plugin be available for the Atlassian OnDemand version of Bamboo? I think this could provide a great deal of value and provide a lot of insight.

<http://confluence.atlassian.com/display/BAMBOO/Enabling+the+Clover+Plugin>

<http://confluence.atlassian.com/display/BAMBOO/Using+Bamboo+with+Clover>

Thanks,

Jim


Answers:
author: NikE
body: At this time Clover is not supported and I don't believe there are any plans of adding it to OnDemand in the near future.

Our tech writer was really verbose with [this one](https://confluence.atlassian.com/pages/viewpage.action?pageId=253231642 "Clover is not available."). :-)

If you are signed up for our newsletters, if Clover is added down the road, there will be a big announcement sent out.


author: Colin Griffiths
body: Is this still the case? It's just that we have OnDemand and under Administration--\>builds--\>plugins there is a 'clover plugin' and an option to enter a license key with a link to [my.atlassian.com](http://my.atlassian.com). Selecting the link allows you to generate a 90 day trial license. This all implies that this feature is actually available.

If we can use clover with Bamboo in the OnDemand environment what is the actual license costs should we decide to proceed after the trial license has expired?

Thanks. Colin.


Tags: cloud

clover

integration
How to copy artifacts between plans
Asked by Michael Gorbach:

I have a library that is being built separately, and used in several different applications. The build isn't that long, but I don't want to have to maintain separate copies of the library build tasks in each plan for each application that uses the library, so I have set up a separate project and plans to build the library. How do I get the library artifacts over the my slaves that build the various plans dependant on this library? Artifacts sharing doesn't seem to work across plans.


Answers:
author: Michael Gorbach
body: Yep, that os exactly what I did. Wrote a python script to do the download. It's a missing feature though: What is the point of dependencies if you can't move artifacts from one place to another? Seems like this would be a very useful plugin to have, or it should just be built in.


author: Jens Schumacher [Atlassian]
body: > It's a missing feature though: What is the point of dependencies if you can't move artifacts from one place to another? Seems like this would be a very useful plugin to have, or it should just be built in.

We absolutely agree and have plans to address this in 2012.

comments: author: Ben Kunkel
body: > We absolutely agree and have plans to address this in 2012

Is there a target release for this? JIRA issue I can track?


author: James Dumay
body: Hi Benjamin,

This item has slipped from our roadmap in 2012 but will be finding a new time to schedule this. You can follow its progress [here](https://jira.atlassian.com/browse/BAM-10573).

Thanks  
James


author: Ben Kunkel
body: I am unable to view BAM-10573 for some reason.

(Permission Violation)


author: James Dumay
body: Sorry about that - it was mistakenly hidden.


author: PiotrA
body: I don't think it is possible to copy artifacts between different plans yet.

Maybe you could try to manually download latest library artifact using url of form: <http://BAMBOO/browse/PROJ-PLAN/latest/artifact/ARTIFACT_NAME> - you could add a preceeding task(s) to your plans which would call *wget* or similar device to download shared artifacts from Bamboo. But that's quite not feasible, is it?

regards,
Remote Agent - start up in live log but cannot see on online remote agents
Asked by Jack Yerabutar:

I've set up a bamboo remote agent on a windows server, when I start the service I get the message

- A remote agent is loading on "server" ("ip-address").

after a while i get

- Remote agent "server" was unresponsive and has gone offline

Thanks

Jack


Answers:
author: Kavya Rani
body: This is not an answer, instead an update to the existing problem.

I am trying to install remote agent, after authenticating the remote agent client, sever displays this message,

***A remote agent is loading on client-name (ip-address).***

And in log it says following,

***WARN \[Thread-1\] \[BambooActiveMQConnectionFactory\] Unable to validate failover:(<tcp://VM_DEV_SYS_05:54663?wireFormat.maxInactivityDuration=300000>)?initialReconnectDelay=15000\&maxReconnectAttempts=10: [java.net](http://java.net).URISyntaxException: Illegal character in scheme name at index***   
***2: VM_DEV_SYS_05:54663?wireFormat.maxInactivityDuration=300000***

And throws ***"JVM exited unexpectidly"***ERROR.

If I add properties in bamboo-agent.cfg.xml as  

\<property name="bamboo.jms.broker.client.uri"\>failover:(<tcp://192.168.100.211:54663?wireFormat.maxInactivityDuration=300000>)?initialReconnectDelay=15000;\&maxReconnectAttempts=10\</property\>  
\<property name="bamboo.jms.broker.uri"\>tcp://0.0.0.0:54663?wireFormat.maxInactivityDuration=300000a\</property\>  

Error is thrown telling ***"delimiter ';' is missing after maxReconnectAttempts"***   

Thanks

Kavya  

<br />


author: James Dumay
body: Can you get in touch with[Atlassian support](support.atlassian.com) about this issue? Something here appears broken and will require more investigation than I can provide here.


author: Jack Yerabutar
body: This is part of the logfile I'am getting

```
2011-11-10 18:57:08,834 INFO [Thread-1] [RemoteAgent] Starting Bamboo Remote Agent...2011-11-10 18:57:08,834 INFO [Thread-1] [RemoteAgent] Starting application context...2011-11-10 19:01:31,131 INFO [Thread-1] [RemoteAgentHomeLocator] bamboo.home set to user-specified location: "C:\bamboo-home" (Modify using -Dbamboo.home=&lt;directory&gt; on the command line.)2011-11-10 19:01:42,803 FATAL [Thread-1] [AgentBootstrap] Exiting due to fatal exception.org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'agentConfiguration' defined in class path resource [applicationContextRemoteAgent.xml]: Invocation of init method failed; nested exception is com.atlassian.bamboo.configuration.ConfigurationException: Could not load configuration fileCaused by: com.atlassian.bamboo.configuration.ConfigurationException: Could not load configuration file	at com.atlassian.bamboo.v2.build.agent.remote.AgentConfiguration.init(AgentConfiguration.java:77)
```


Tags: cloud
NCover calculation is not correct?
Asked by Anders Persson:

The calculation of NCover results are not correct. Iget the following figures

Line Rate 29.231%

Lines of code 2393

Lines executed 1399

lines not executed 994

I am not able to understand how one get 29.231% coverage from these values.

Furthermore I do not get ande Line rate in NCover. I get something they call Symbol Coverage and the same data, as gave the above values, will in NCovers tools be presented as 57% Symbol Coverage. (I open the same file as the one used by Bamboo)

If I look at this page:

<http://docs.ncover.com/kb/ncover-trend-and-report-file-definition/>

I find something called visited lines and unvisited lines. But I think you should use, if you not already do, the values according to how they present the calculation of the values. Symbol Coverage = vsp/(usp+vsp)


Answers:
author: Anders Persson
body: Solved via Atlassian support.
file permissions in artifact is not preserved
Asked by Nicolas Nicolas:

Hi,

the first stage in the build process produces a script that has execution permissions (755). This script is part of the artifact of that stage. The second stage depends on this artifact and expects to be able to run the script. However, the permissions are reset to 644. How do I fix this?

Thanks,

nick


Answers:
author: Przemek Bruski
body: You have to either recreate the permissions via an Script Task (Inline) or store the artifact in an archive format that preserves permissions (basically, tar the artifact via a Script Task, have the tarrred version defined as an artifact and untar it in the second job - again, via a script task).

comments: author: Nicolas Nicolas
body: Thanks, I will try that.
Listing of all available artifacts?
Asked by Cameron Ferguson:

Is there a file or a way to pull up a direct list of all artifact URLs that are available in Bamboo? We have products built in bamboo that depend on certain versions of other products also built in bamboo, and we are working on a way where the child products will automatically download and install the released parent products before they attempt to build.

Having a single file that I could parse with a script to determine the URL's of the artifacts that the agents need in order to build the child programs would be very handy. I am assuming that this isn't available, so I am looking at intelligently piecing together the URL where the parent product should be... but that means we are very dependent on naming conventions of all plan keys/project keys across the board, which I guess is a good thing, just seems like to me that may be a maintenance nightmare.


Answers:
author: Przemek Bruski
body: You can enumerate the plans, build results and their artifacts using Bamboo [REST API](http://confluence.atlassian.com/plugins/viewsource/viewpagesrc.action?pageId=240191609) . There is no single place listing all artifacts in all builds.
Using plan defined variables from Bamboo plugin
Asked by Luis Luis:

I am developing a plugin and I need to replace a Bamboo user-defined variable (of a build plan) in a string with the actual value from the source code of the plugin.  

<br />

I mean, replace:  

"Hello, I'm ${bamboo.author}"  

with:  

"Hello, I'm Luis"  

, supposing that author=Luis in this moment.  

How can I achieve this?  

<br />

Needless to say that I don't want to parse the string manually (looking for "author", "${" or whatever), since this is not an elegant option. I really think that the Bamboo API provides something to list defined variables of something like that.  

Thx,  

Luis


Answers:
author: Luis Luis
body: More info:

I finally found some useful classes in com.atlassian.bamboo.variable; this is my code:

```
	private String replaceVars(String str, PlanKey plk)
	{
		String result = str;
		VariableDefinitionManagerImpl vdm = new VariableDefinitionManagerImpl(new VariableDefinitionHibernateDao(),
				new VariableDefinitionFactoryImpl());
		List<VariableDefinition> variables = vdm.getGlobalVariables();
		log.debug("Current plan " + plk.getKey());
		
		if (variables.isEmpty())
		{
			return result;
		}
		
		for (VariableDefinition variable : variables)
		{
			log.debug("Variable " + variable.getKey());
			Plan varPlan = variable.getPlan();
			log.debug("Plan " + varPlan.getKey());
			
			if (!isCurrentPlan(plk, varPlan.getPlanKey()))
			{
				continue;
			}
			
			VariableDefinitionImpl varImpl = (VariableDefinitionImpl) variable;
			log.debug("VariableImpl " + varImpl.getKey() + "; Value: " + varImpl.getValue());
			result = result.replaceAll(varImpl.getKey(), varImpl.getValue());
		}
		log.debug("selector result: " + str);
		return result;
	}
	
	private boolean isCurrentPlan(PlanKey currentPlanKey, PlanKey plKey)
	{
		return (currentPlanKey.getKey().equals(plKey.getKey()));
	}

The problem is that I get a null in com.atlassian.bamboo.variable.VariableDefinitionHibernateDao.findGlobalVariables(VariableDefinitionHibernateDao.java:33)

There is almost a variable defined in my current plan, so I don't know where the problem is, really.

Can somebody help me?

Thanks,
Luis 
```


Tags: cloud
Optimal route to file-triggered build
Asked by Oliver Oliver:

We've finished our Bamboo evaluation and are beginning the (slow) process of migrating a 10-year in-production project into the care of Bamboo.

Our version numbering is currently manual, someone edits proj/VersionNo.h and checks it in. We use \<product version\>.\<release number\>.\<patch number\>.\<build no\> where build no is actually a 0-255 value within the first three quads, e.g. 1.34.0.0 is the first build of product version 1, release 34, patch 0.

I have a nightly all-configurations build that I want to trigger automatically any time proj/VersionNo.h is checked in, and then when that is working, I want to add a plan to run a script that updates VersionNo.h...

It seems like I need to create a new plan which monitors proj/VersionNo.h for checkins, which is a parent project for the daily build.

And then create a parent project to that which runs the upversion script and checks in the result, and allows it to trigger.

But somehow this doesn't feel right or optimal to me. Would it be better to have the repository telling Bamboo when the file changes and triggering the specific plan?


Answers:
author: Dennis Ryan
body: your repository trigger, if you use one, can look for this partiular file, and trigger the appropriate build. I use a similar strategy to *avoid* building when only project files (intellij,eclipse) files are checked in.


author: PiotrA
body: Hello Oliver,

To set up a "Nightly all-configurations build" I'd create a Bamboo Plan that would use \*scheduled\* \*poll\* strategy (once per day, at 3am for example). In the plan advanced repository options I'd set the file pattern filter to only trigger the build when it detect a file .\*proj/VersionNo.h.\* was changed (or similar regexp, you got the idea).

What other plans do you need to set up?

regards,


author: Oliver Oliver
body: Note: I \*think\* I can make a single-file based filter by specifying the individual file-path as the subversion repository elsewhere, but (a) I have to start repeating branch names in input fields, (b) I can't have both a scheduled and a repository-scan trigger...