youngmon/atlassian-qna huggingface dataset:
Bamboo(4.4.5 build 3507) Auto Merge with Branch updater
Asked by Daniel A Hopper:

Currently in my setup I can successfuly able to have branches automatically created from my Git repository and the associated Branch Plans automatically created and this works great! I have the defaults set to do automatic merging via the Branch Updater approach and as well configured to merge from the Parent Plan and then push onto the Branch.

Based on the documentation it appears to me that the following should happen but doesn't appear to be, and for this sake we'll say that I have the Parent Plan on master and created a branch called **feature/A-1** and Bamboo has everything described above configured.

1. Developer commits code to **master**
2. Bamboo detects change and builds the **master** via the Parent Plan
3. Parent Plan builds successfully
4. Bamboo then builds the Branch Plan for **feature/A-1** since a change happened in the master

Step 4 is the one that isn't happening. Everything else works just fine. if I actually commit something on the Branch **feature/A-1** then the Branch Plan will run merging the **master** first running the plan, then on success pushing the **master** onto the branch **feature/A-1**

I would expect based on the [documentation](https://confluence.atlassian.com/display/BAMBOO/Using+plan+branches#Usingplanbranches-Usingautomaticmerging) that any changes to the master would also cause the branch plans to run if configured using the Branch Updater
> Automatically merge changes from the team's master branch into your feature branch, after a successful build of the master branch.

Thanks in advance.

Daniel


Answers:
author: Przemek Bruski
body: The documentation is incorrect - as you've already noticed, the commit to master does not cause a rebuild of all feature branchers that use Branch Updater. Only a commit to the branch, or an explicit branch build run will cause the merge.

comments: author: Daniel A Hopper
body: This seems like it would then be a good feature then, should I add a Jira issue for it?


author: Przemek Bruski
body: Yes, please do.


author: Daniel A Hopper
body: Issue created - <https://jira.atlassian.com/browse/BAM-13094>


author: Marcin Gardias
body: I think you can work around this: In your master Plan define the repository twice. The trick is, Plan Branches only override 'default' repository, so if you define your master branch twice, all the branches will do change detection on both their own branch and the 'master'.

It's not exactly what you want: it will cost you some of the performance and the branches will not wait for the master Plan to be finished, but it's an option.

comments: author: Daniel A Hopper
body: Yes while this would work it does have the 2 main drawbacks that you mentioned. Basically I believe that the branch plans should be able to operate just like the dependent plans.


Tags: branch

merge

update
SCP adding single quotes around remote folder
Asked by Greg Koreman:

When using the SCP task I set the Remote Path to be . or Archive but the SCP task copies all files into a remote folder called '.' or 'Archive'. No matter what I enter into Remote Path it gets surrounded by single quotes.

Listing the directory shows:

'.'

'Archive'

If I put a full path into Remote Path it says "No such file or directory".

I can recreate this behaviour on the command line like so:

scp -i key myTestFile "myuser@myhost.com:'Archive'"

Is there any workaround for this? Has anyone else experienced this problem? I am using bamboo 4.4.5.


Answers:
author: anastasiosk_Doble
body: I'm having the same issue with SCP hangs when the singles quotes are added.

I ran the scp command line without the singles quotes in the remote folder via windows CMD from the Bamboo computer to the OpenSSH server, the file was transferred.

Connecting to OpenSSH server on a Windows10 computer.

Bamboo v5.11.1.1 build 51117.

Any solution in near the future or workaround?


author: Greg Koreman
body: debug1: Remote protocol version 1.99, remote software version Server-VII-hpn13v1


author: Przemek Bruski
body: What is the operating system/shell/SSH server on the destination server? The SCP library that Bamboo uses does add the quotes, but they should not end up in file name...

comments: author: Greg Koreman
body: debug1: Remote protocol version 1.99, remote software version Server-VII-hpn13v1


author: Greg Koreman
body: Is this the information you needed?
Bamboo Cloning Repository to Multiple Directories
Asked by Chris G:

I have several Bamboo plans setup and I've noticed that every-so-often a build takes a really long time. When I've looked into the long run times it's always due to Bamboo "cloning repository". It seems that Bamboo will randomly clone the repository from the cached folder into some other folder used for the build. Buy why does it not ALWAYS use that folder?

This is a huge pain because our repository is massive and cloning takes a very long time, is a big load on the server, and causes us to run out of disk space because of all the cloned repositories. Is there any way to prevent this?


Answers:
author: Chris G
body: I think I figured it out. Each directory corresponds to a local agent. To reduce the number of repository clones we need to remove the number of local agents.


author: PiotrA
body: Thank you !


author: Chris G
body: The repository is a Mercurial repo.


author: PiotrA
body: Hello Chris,

Just out of curiosity - which repository type (Mercurial? Git?) are you using? I'm wondering which one of them may have so slow cloning operation. Would you be so kind to help me figure that out? :)

regards,


Tags: check-out

clone

repository
AuthenticationFailedException
Asked by Per Samuelsson:

Im evaluating Bamboo for our company, and when I try to set up the mail settings on the server and test it, I get this:

The mail settings you entered were not valid. Error thrown was: javax.mail.AuthenticationFailedException

I've tried reading other posts, but with no luck finding an answer as to way.

Now, the really weird thing is that I recently bought Stash and it's set up with the exact same credentials (and, currently, even reside on the same machine) and in there it works like a charm.

I'm using a simple corporate in-house SMTP with no autentication (so basically just a smtp.server.domain name and nothing else. No TLS. And like I wrote, the exact same setup works in buddy-server Stash.

Any ideas?


Answers:
author: Per Samuelsson
body: I actually found the problem (and the solution) myself, by chance. I thought I'd post it here to let others now and for you guys at Atlassian to consider improving this.

It's rather easy to reproduce too.

The problem was that once I had entered a user name and a password for the SMTP connection, the password never was removed from the underlying storage - the bamboo-mail.cfg.xml in BAMBOO_HOME. In the UI, it looked like there was no password set (the text field is empty), but when I push the Test button, it uses the password saved in said file.

Now, since the SMTP server I tested with was "no authentication", it failed because the password was sent.

To remedy, it was not sufficient to just remove it as a whole from the file. I had to first do this, then restart the Bamboo server. After I did so, finally I got my mails sent out.

comments: author: PiotrA
body: Hi Per,

After reading your comments here I've allowed myself to raise an issue ticket on the Bamboo tracker: <https://jira.atlassian.com/browse/BAM-13099> - I think this is a clear bug in Bamboo (although personally I don't find it very severe - just annoying).

Sorry to hear about your troubles!

regards,  
Piotr Stefaniak  
Bamboo developer


author: Per Samuelsson
body: Hi Piotr,

Raising an issue was the right thing to do, and I considered it myself, but didn't really have the time.

And I agree on your conclusion, it's not a showstopper, more of a costmetic one.

I'm back happy with my continous evaluation of Bamboo, thanks. Like it a lot!

Regards, Per
Bamboo Branch build - merging changes push to git
Asked by Eric White:

I have just started using the Branch feature of Bamboo, and I have enabled to bit that allows Bamboo to merge the changes from "master" before building. That part works great. However it commits the change as "Atlassian Bamboo \<bamboo@example.com\>" and then tries to push the change as builduser (my bamboo runs as this user.)

I have Stash set up to disallow push with commits that were not authored by the one pushing. (using the "Enforce Push Author" hook.)

How do I change the user that Bamboo uses to commit the merge?


Answers:
author: Eric White
body: Found it. This issue led the way: [BAM-10945](https://jira.atlassian.com/browse/BAM-10945)

Set commit user under Administration =\> Respository Settings =\> Automatic Commits


Tags: branch

git

push
Does a job in bamboo count time in the queue towards the average build time?
Asked by Jay Barra:

I had several build agents go offline while I was away and several builds were queued for over a week because the other agents could not build them. Even though they had no failed builds the average time is now up near 600 minutes when before they were only around 30 minutes.

Does bamboo take time that a build is queued into account when calculating the average build time?


Answers:
author: Felipe Kraemer
body: Yes, Bamboo adds the time a plan is queued to the build time.

This is currently an open issue:

<https://jira.atlassian.com/browse/BAM-10938>


Tags: build
Parsing Maven Logs from Multiple Bamboo Steps
Asked by Peter Kahn:

Hi all,

Please let me know what you think is the right way to parse maven logs.

I broke my build into three steps: core, clientUI, installer. Each is a multi project maven build. I use "Script" tasks and a script file with targets to handle each step so I ensure the how-to-build is captured in source control. I setup clientUI and Installer to always run so I'll always get an installer even if the clientUI tests fail that one step

now, I have bamboo logs which are difficult to read. I plan to add a parsing step that captures the bamboo log analyze it and write a summary. Were I using ant, I'd set ant to use XML output, slurp it into a structure, extract my data and write a summary. Since I'm using maven, I'm looking at writing a plain text parser for maven.

The effort involved is non trivial and I'm wondering if I'm making this harder than it needs to be.

Do any of ypu run multi-step maven builds in bamboo plans and how to handle extracting the relevant bits out of the inner build steps?

Thanks

Peter


Answers:
author: Przemek Bruski
body: In Java-world, what you could do is to inherit from the class com.atlassian.bamboo.plugins.maven.task.Maven2BuildTask (or Maven3BuildTask). Some options then:

add some marker to the log file that would let you find out where the task starts

redirect the Maven logs to a separate file by using buildLogger.getInterceptorStack().add() method.

have the interceptor generate the summary on the fly - that's what it's for ;-)

comments: author: Peter Kahn
body: I'm confused are you saying that I'd create my own plugin or is that can I execute groovy or java steps in my plan configuration?


Tags: log

maven
Bamboo: Details about automatic merges
Asked by Per Samuelsson:

Hi,

Is there someway to find out about the details of the automatic merges taking place when you enable this feature using plan branching and automatic merging?

For example, I'd like to know what kind of merge is done and what parameters are used. Like if --no-ff is used, what's the commit message I can expect.

I looked in the logs produced by a build, but found nothing about the merge taking place.

If it would be possible to customize, it would be even greater! :) But just knowing the details would be really helpful and probably enough for us in practice.


Answers:
author: Sultan Maiyaki
body: The Automatic message on commit is "\[bamboo\] Automated branch merge". This can be veiwed and customized from the page BASE_URL/admin/repositorySettings.action

comments: author: Per Samuelsson
body: Thanks! That basically answer my question. I guess I can find out (by experimenting) what kind of merge is being executed by just checking these commits in the log after different kind of workflows.
Can you restore a HSQL DB from the script file?
Asked by Masterfalcon:

I recently had a problem with my server being improperly shut down, the database was somehow deleted. I've found that I still have a defaultdb.script file that appears to contain all the SQL commands to restore the last known good DB.

I've since switched to using Postgres and I'm wondering if there is some way to import that script in. If I have to import to HSQLDB, export and then import into Postgres, that's perfectly fine.


Answers:
author: Masterfalcon
body: Support was able to help me out. They are amazing!


author: Marcus Silveira
body: Hi David,

Im not sure if that is possible to restore from the script file, but JIRA does have a service running every 12 hours by default that creates an XML backup at your export directory inside JIRA_HOME.

If that wasn't manually turned off, you should have those files and will be able to restore JIRA with that.

Hope this helps,

Marcus

comments: author: Masterfalcon
body: I should have mentioned it, but I'm using Bamboo. Unfortunately the latest export that I have is 2 weeks too old.
Viweing test failed results bamboo 4.4.4
Asked by eterekhovftc:

I have problem in Bamboo 4.4.4:  
I've created plan which start some tests and then it generate TestReport.xml. (TestReport.txt)   
I try to parse it with JUnit Parser, but in Test Results Bamboo show only successfull tests and not even one failed.  
Any suggestions?  
P.S. I atached generated my TestReport.xml and xml-file, that created Bamboo after parse. (buildresults19.txt)  

![](../../upfiles/ScreenShot_11_1.jpg)![](../../upfiles/ScreenShot_13.jpg)


Answers:
author: eterekhovftc
body: problem resolved.


Tags: page

result

test
Is Clover compatible with Java 1.7 syntax?
Asked by Penny Dutson:

And will work with the following mocking and other frameworks that use bytecode modification: Mockito, PowerMock, PowerMockito, EasyMock, GWT.


Answers:
author: CelsoA
body: Clover supports Java 1.7 language constructs, Maven 3, Groovy 1.7 \& 1.8, Grails 1.3.7, Eclipse 3.6 and 3.7 and Intellij IDEA 10.5 and 11.

For more information please refer to <https://confluence.atlassian.com/display/CLOVER/Clover+3.1+Release+Notes>

Regards.


Tags: cloud

jira-cloud
Why won't the JUnit Parser parse my output.xml?
Asked by Thomas Verh?lsdonk:

I was trying to add some automated Unit Tests to my project and have been facing some problems. The Unit Tests themselves are done with googletest, which creates an XML file which should be compatible with the JUnit parser.

However, I'm getting the following error when executing the JUnit parser:

02-Apr-2013 12:11:22 Starting task ''Parse UnitTest output' of type 'com.atlassian.bamboo.plugins.[testresultparser:task.testresultparser.junit](http://testresultparsertask.testresultparser.junit)'

02-Apr-2013 12:11:22 Parsing test results...

02-Apr-2013 12:11:22 Failing task since test cases were expected but none were found.

<br />

This doesn't seem to have anything to do with the .xml file itself, as I've tried a few. This included my own output.xml, generated by googletest and the sample outputs from <https://confluence.atlassian.com/display/BAMBOO/JUnit+parsing+in+Bamboo>

Update:

Up until now I told the JUnit Parser to look for ${bamboo.build.working.directory}/output.xml  
When I tried \*\*/\*.xml it worked.  
As I understand it now, after *very carefully* reading the task description, I have to give it a folder. But I can also give it the files, if I do it in ant-style (with a glob?). This is at the very least very confusing and should be further specified in the documentation.  

Anyway, my problem is solved. But please answer anyway, so I can understand this.


Answers:
author: ssetayeshfar
body: Hi Thomas,

The problem you have experienced is a reported bug in Bamboo. Please check these pages:

<https://jira.atlassian.com/browse/BAM-12979>

<https://jira.atlassian.com/browse/BAM-12671>

Same problem is also posted here:

[https://answers.atlassian.com/questions/143550/junit-parser-cannot-find-the-results-od-build](/questions/143550/junit-parser-cannot-find-the-results-od-build)

Hope this helps.

Cheers,

Sepideh


Tags: google

junit
What folder am I supposed to zip up if I want to import my jenkins installation to Bamboo?
Asked by Kathleen Jacobs:

Hello,

I am using the Jenkins-Bamboo Importer wizard for the first time and I'm having problems uploading the zipped up jenkins home folder to it. I zipped it up and tried to upload it to the importer but it vastly exceeds the file upload limit. I have a large number of jobs running. Should I just exclude that folder?


Answers:
author: AgentSmith
body: Greetings,

If you installed Bamboo on the same host as Jenkins, you can simply specify the location of your Jenkins home directory. Ensure Bamboo has read/write access to the Jenkins home directory.

If interested, I have included an excellent full tutorial that you find helpful. You can watch the entire video or for this specific question, fast forward to 6:14:

<http://www.youtube.com/watch?v=9SGWRWcJTyA>

General documentation for importing data from Jenkins:

<https://confluence.atlassian.com/display/BAMBOO/Importing+data+from+Jenkins>

I hope this information gets you on the right path!

Cheers,  
Jason \| Atlassian


Tags: cloud
bamboo and mercural ssh with windows and unix
Asked by john scancella:

*Background info*: I am running bamboo on solaris with a local machine account(account name wire). My mercurial repository is also located on this solaris machine (/repos/myrepository). I have a remote agent running on a windows machine on the same network running with a domain account as a service(svcbamboo). I also created a LDAP account for the unix side, also naming it svcbamboo. I configured the windows svcbamboo and unix svcbamboo to use tortoisePlink and generated ssh keys for authentication.

When I log in to the windows machine as svcbamboo and try and clone one of the mercurial repositories everything works fine.

When I kick off a build in bamboo with the repository pointed at /repos/myrepository and run it on the unix build agent it works fine. However, when I then try and run it on the windows build agent (after subsituting the variable for ssh for that agent) and changing the repository to ssh it fails.

Is there a way to manually specify which way bamboo checks out the repository? I want to be able to check out the repository both locally on the unix machine and remotely using ssh from the windows machine. I would prefer not to have to write a script to do it on bamboo as that is another piece of code I will have to maintain as a developer.

Thanks


Answers:
author: john scancella
body: Well after getting a co-worker to help me out and double check everything it looks like I just simply forgot to add the local user's (wire) public key to the LDAP user (svcbamboo). Once we did that bamboo was able to use ssh to check out the mercurial repository just fine.


Tags: mercurial

solaris

ssh

windows
Did Bamboo 4.4.4 completely remove the "View" mode where you can view your plan and jobs?
Asked by Gbowe:

I upgraded Bamboo from 3.3.3 to 4.4.4 and the View mode where i can see all my tasks without being in the configuration mode is gone. This was a very useful mode. The "expand all" was great for looking at the content of a job's tasks all in one view.

Now it seems as the only way to see anything build plan level or job level is to go into configuration mode which is very limited for viewing all the configuration in a single screen.


Answers:
author: Przemek Bruski
body: Yes, View mode got removed and there are no plans to bring it back atm - you need to use the configuration mode, sorry :-(

comments: author: Bob Swift (personal)
body: It would be usefuly if you could at least provide a REST API to retrieve all the same information.
Link under Administration->plugin are not working...
Asked by Anand Kumar Singh:

In my installation of test server, none of the links under Administration -\> Plugins work. Why??


Answers:
author: Sultan Maiyaki
body: Can you file in a [support ticket](https://support.atlassian.com) for this issue


author: Theinvisibleman
body: Hi Anand,

Could you clarify further on what you mean by the links does not work? If I'm correct, then the links under Plugins should be 'Application Links', 'Find New Add-ons', 'Manage Add-ons', and the like, right?

May I know what happens when you try to click on those links?

Cheers,

Joe

comments: author: Anand Kumar Singh
body: Hi Joe,

Thanx for your reply.when i click on Manage Add -one it.its not working.

log file is generated like that..i have not added the whole log file due to large size.its a part of log file

**Stack Trace:**

java.lang.NoClassDefFoundError: com/atlassian/velocity/htmlsafe/event/referenceinsertion/DisableHtmlEscapingDirectiveHandler

at com.atlassian.templaterenderer.velocity.one.six.internal.VelocityTemplateRendererImpl.createContext(VelocityTemplateRendererImpl.java:141)

at com.atlassian.templaterenderer.velocity.one.six.internal.VelocityTemplateRendererImpl.render(VelocityTemplateRendererImpl.java:104)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)

at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)

at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)

<br />

<br />
Do we have any possibility to create pre-commit with checking source code with Scriptrunner
Asked by Nike:

I need reject commit if code contains some pattern.

For example:

```
def someMethod():
    print("somePattern")

someMethod()
```

I need reject that commit becase it contains "somePattern" .

Can i do this?


Answers:
author: Robert Giddings [Adaptavist]
body: Hi [@Nikita Mesnyankin](https://community.atlassian.com/t5/user/viewprofilepage/user-id/4667159) ,

Yes, we are looking into providing some examples, on how to do this. Which should be available some time in the New Year.

Kind regards,

Robert Giddings,

Product Manager, ScriptRunner for Bitbucket

comments: author: Robert Giddings [Adaptavist]
body: Hi [@Nike](/t5/user/viewprofilepage/user-id/4667159) ,

We have now published a Script to our Adaptavist Library that shows an example of blocking commits based on file content.

The Script can be found here: <https://library.adaptavist.com/entity/block-commits-for-files-containing-content-that-doesnt-match-regex>

Kind regards,

Robert Giddings,

Product Manager,

ScriptRunner for Bitbucket


author: Nike
body: Thanks)


Tags: bitbucket-server

scriptrunner

server