youngmon/atlassian-qna huggingface dataset:
Complete all stages before running queued plans
Asked by Lee Winder:

We have a few plans, all of which contain multiple stages which in turn contain a number of jobs and tasks. For example:

Plan 1

\* Stage 1

\* Stage 2

Plan 2

\*Stage 1

\* Stage 2

When Plan 1: Stage 1 is running, if another Plan is triggered, Plan 2: Stage 1 is queued, running before Plan 1: Stage 2.

So the run order becomes

Plan 1: Stage 1

Plan 2: Stage 1

Plan 1: Stage 2

Plan 2: Stage 2

We need currently running plan to finish before starting a new plan as (even though I know it's not recommended but our middleware requires it) there are artefacts shared between stages that may also be used/updated/modified by stages in another plan hence we cannot use artefacts between stages.

Without this, previous plans future stages can be corrupted before the next stages run, breaking out build process.

So ideally it needs to be

Plan 1: Stage 1

\* Plan 2 triggered \*

Plan 1: Stage 2

Plan 2: Stage 1

Plan 2: Stage 2

Is this possible without putting our entire plans steps into a single job with a lot of individual tasks because this would get rid of the stages that do have elements that can run in parallel?

Thanks Lee

Ps. Appologies for the formatting


Answers:
author: Lee Winder
body: Doesn't look like this is possible - quite a simple addition though I'd imagine


author: Gretchen
body: You can configure the plan to run as a dependency. Or rather configure your dependent build to be blocked if the other build is running. Take a look on the dependencies tab. There are a bunch of options there.  

**Block build if parent builds are queued or in progress If parent builds are queued or building, the current build will be blocked.**  
You can designate a plan as a child plan without requiring it to be built (though the parent must build before the child will run.)

comments: author: Lee Winder
body: Thanks Gretchen that would be fine if I only had two plans on my build server (granted my description only had two plans as an example), but my build server had upwards of 20 plans, all of which I'd like to complete fully before kicking off any queued plans.

I've gotten around this by doing what I originally suggested myself (putting the entire plan contents in a single job) but it's not very managable or scalable.
How to specify Deploy permissions for Bamboo Users
Asked by Group IT:

Hi, I'm a sysadmin and I'm trying to give a user access to Deploy a project, but not edit the deployment project.

The reason for this is simple. I'm setting up the remote serves and ssh keys, locations etc and I don't want users seeing or changing this. In the same vein I want them to deploy their own changes and not bug me all the time.

From what I can see in the permissions for a deployment project, there is only View and Edit. However even when I have ticked both of these options for a user, they still can't deploy. I have to make them part of the bamboo-admins group befor they can deploy. This is realy not ideal at all.

Is there any way I can accomplish this? I have searched plugins with no luck.


Answers:
author: Gretchen
body: Deployment projects have the "deploy" permissions set on the environment. That's why you can't see them. They are environment specific (which is a fine idea.) Edit your deployment plan, then look down at the Other Environment Settings box. Mine is the third box down in the plan. Deployment Plan(1), How you want to deploy(2), Other Environment Settings(3). If you looked at the description in the plan permissions carefully enough you would have seen a reference to the deployment permissions being elsewhere.


Tags: bamboo-administration
Elastic agent randomly fails to start
Asked by Stefan Fu?enegger:

Our elastic agent somtimes fails to start. The instance itself comes up without problems. We're using spot instances and

After logging in, I find several log files in /tmp (testIfStartedFromBamboo.log, setupEphemeralStorageStructure.log, setupEbsSnapshot.log, BambooStartupLog.log, checkElasticAgent.log - in order of last modification) without any ovious errors.

I suspect it might have something to do with the Elastic IP we use (\`ec2-associate-address\` in /mnt/bamboo-ebs/bin/customise-extras.sh). I think Elastic IPs should be supported. Is this the correct way to use them?


Answers:
author: Przemek Bruski
body: Elastic IPs tend to interfere with agent startup. We are aware of this and we are planning to include a fix in one of the future releases.

This mostly applies to assigning EIPs while the agent is running. Customise-extras - or instance setup script - _should_ be OK. Could you try adding a sleep 60 after association?

comments: author: Stefan Fu?enegger
body: Ok. I'll let you know if it happens again. Thanks!


author: Stefan Fu?enegger
body: I used 15s sleep but that didn't fix the problem. I'll try your suggestion of 60s now.


author: Stefan Fu?enegger
body: nope, 60s doesn't fix it either, still hanging


Tags: cloud
.Net application builds and versions using bamboo
Asked by Kevin Holy:

I have a .net project that i am already using MSbuild for and i have that working great. My question is i would like to be able to save each version and actually version my application on each build using bamboo. Then we have a dev/test/prod server that i would like to be able to push any version to any server at anytime.. now i see references for these sort of things but i cant seem to find any good information on how to make this all happen. Can someone point me in a direction for this?

Thanks!


Answers:
author: Jason Monsorno
body: We used to do this with [CruiseControl.net](http://CruiseControl.net) but decided not to with bamboo.

It is an old powershell script but it worked fine. You'd need to pass in the parameters from Bamboo as arguments to the script or use them inline in the new script command running as powershell.

```
function SetVersion ($file){	$version = $ENV:CCNetLabel	$svn_rev = ([int] $version.Split('.')[3])	$mod_svn_rev = $svn_rev % 10000	$version = $version.Replace("$svn_rev","$mod_svn_rev")		$fileObject = get-item $file	$fileObject.Set_IsReadOnly($False)	"Changing version in $file to $version"	$sr = new-object System.IO.StreamReader( $file, [System.Text.Encoding]::GetEncoding("utf-8") ) 	$content = $sr.ReadToEnd()	$sr.Close()	$content = [Regex]::Replace($content, "(\d+)\.(\d+)\.(\d+)\.(\d+)", $version);	$sw = new-object System.IO.StreamWriter( $file, $false, [System.Text.Encoding]::GetEncoding("utf-8") )	$sw.Write( $content )	$sw.Close()	$fileObject.Set_IsReadOnly($True)}# Set the Assembly version$info_files = Get-ChildItem .\ -Recurse -Include "AssemblyInfo.cs" | where {$_ -notmatch 'A3Domain'}foreach($file in $info_files){	Setversion $file		}
```

Our labels ($ENV:CCNetLabel) were already a 3 piece release version then we tacked on a piece of the revision. Mod by 10000 was a quick hack to avoid unsigned __int16 overflow, it can produce non sequential versions though so I'd try to avoid it.

Basically the idea is to change the AssemblyInfo.cs BEFORE the build.

comments: author: Matthew Lyon
body: I used this as a template with minor modifications and it works fine.

My only complaint is that it has to be checked into the repo to work, it would be nice to have it as a task type

I replaced your code at the top up to the point where your version is modified with this

```
param([string]$versionNew)?function SetVersion ($file, $version)
```

changed your calling line to this

```
Setversion $file $versionNew
```

And then created a script task in bamboo, setting Run as Powershell script with this as the body

```
.\ChangeAssemblyInfo.ps1 -version 0.1.${bamboo.buildNumber}.0
```

Correction:

you can put the whole script into the bamboo task, but that hurt my sensibilities.


Tags: bamboo-administration
Bamboo with ZIP installation - Run (as Windows service) with 64bit JDK?
Asked by Elvir Hadzic:

Hello everybody

Is it possible to run a 4.x.x or 5.x.x ZIP Bamboo version (not the installer) with a 64bit JDK?

I couldn't find a clear answer to that in the documentation or anywhere else. Sorry if I should have overlooked it.

The installation and upgrade documentation doesn't really mention a specific Java version (32bit/64bit) but unlike e.g. Stash, I only see one tomcat7.exe in the bin folder (32bit?)

Is it possible to run with the 64bit JDK anyway and if so, what do I have to do different to get it working?

Thanks in advance!


Answers:
author: Elvir Hadzic
body: I finally had the time to test it out and finally got it working. Just posting here what I had to to in case anyone else runs into the same problems:

We are using Bamboo 5.2 (build4003), Win Server 2012 (64bit) and Java 7 (jdk1.7.0_45). Installing the service was no problem. But when trying to start it, I got an "error 1". Windows Event logs only showed this messag: *The Apache Tomcat Bamboo service terminated with the following service-specific error:*   
*Incorrect function.*

* I removed the service
* Checked which version of Tomcat Bamboo used (version.bat in the bin folder)
* Went to <http://tomcat.apache.org/> and downloaded the Win64bit zip file of the Tomcat version I got when running version.bat
* Extracted the archive and replaced the tomcat7.exe and tcnative-1.dll files (both located in the bin directory) in the bamboo folder with the ones from the archive I just downloaded and extracted. You might want to make backup copies of the old files before replacing them.
* Reinstalled the service
* Run the service without any problems

comments: author: Sushant Nautiyal
body: Thanks Raffael.

I faced the same issue while installing Bamboo 6.4.1.

It solved the issue.


author: Sultan Maiyaki
body: I knew we had this issue with JIRA and probably Stash long time ago as documented in this <https://confluence.atlassian.com/display/JIRAKB/Problems+Installing+JIRA+as+a+Service+on+Windows+64bit> but this has been resolved by now. Give it a try and if you face problem with the service installation, lets us know and we will investigate further


author: Sultan Maiyaki
body: Hi Yuk,

Yes you can run Bamboo 4.x or 5.x on 64bit JDK and this will work on smoothly. We have not recieved any complain about that yet. Bamboo allows usage of both 32 or 64 bit JDK

comments: author: Elvir Hadzic
body: Thank you very much! So, I don't need to replace the tomcat7.exe with a special 64 bit version like I have to with Stash?


Tags: java

service
How to run ssh task from a proxy server?
Asked by mickey13:

I am trying to set up a Bamboo plan where my application server is not exposed to the Internet. There is a dedicated machine that is exposed to the Internet that I can ssh into and from there I can ssh into my application server. How can I set up a Bamboo plan to run a script on my application server? My first thought was to create a ssh task to the first server and just create a second ssh task to the application server. The second ssh task fails as it doesn't recognize the local hostname of the application server; so I'm thinking that I can't reference the application server as if I was actually ssh'ed into the public facing server. Thoughts?


Answers:
author: mickey13
body: Bueller? Bueller?


Tags: bamboo-administration
Bamboo 5.2 SSO with Crowd throws exception
Asked by JulesC:

Following configuration here <https://confluence.atlassian.com/display/CROWD/Integrating+Crowd+with+Atlassian+Bamboo> get this exception when starting bamboo.

java.lang.ClassNotFoundException: com.atlassian.crowd.integration.seraph.v22.BambooAuthenticator

This has been configured to authenticate via forms with Crowd successfully, but SSO is failing.


Answers:
author: Przemek Bruski
body: Can you try using com.atlassian.crowd.integration.seraph.v25.BambooAuthenticator instead?

comments: author: JulesC
body: Thanks, exception is not thrown. SSO is not currently working but I belive this is an issue with my configuration.


author: JulesC
body: I have a fundamental problem with my Crowd installation which I'm unable to determine the root cause. I'm going to delete the install and start from scratch.
report listing the scheduled builds times for all Bamboo plans
Asked by roy_lyons:

Is there a way I can generate dynamically a report listing the scheduled builds times for all Bamboo plans that have either "Single Daily Build" or "Cron Based Scheduling" triggers?


Answers:
author: Felipe Kraemer
body: Hi Roy,

I am wondering if you might find this KB useful:

[Find repository type and build strategy used by each plan](https://confluence.atlassian.com/display/BAMKB/Find+repository+type+and+build+strategy+used+by+each+plan)

It contains a SQL query that helps you retrieving this information.

comments: author: roy_lyons
body: I waited on accepting this because I have no way of converting that properly to an Oracle compatible query. The premise of it is sound, but its inches away from an accepted answer. It is ALMOST exactly what I needed. So close.

I may end up yet accepting this answer because noone else has anything... its just not a resolution to my issue since I can't actually use it.


author: roy_lyons
body: Alright, I will concede that its a good answer. it didnt solve my problem, because I couldnt use it (I have Oracle DB) - but its the right answer for someone else.


Tags: bamboo-administration
Bamboo 5.0-rc-1 to 5.2 upgrade failed
Asked by Aaron Cunnington:

Hello,

I have just followed the upgrade guide and the 'generic' upgrade guide for upgrading an installation of Bamboo 5.0-rc-1 to Bamboo 5.2 release, but unfortunately have run in to a problem on startup.

This is the error message that is displayed when I browse to localhost:8085:

You cannot access Bamboo at present. Look at the table below to identify the reasons:
\<th\>Time\</th\>\<th\>Level\</th\>\<th\>Type\</th\>\<th\>Description\</th\>\<th\>Exception\</th\>

|---------------------|-------|-----------|------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------|
| 2013-11-12 20:49:45 | fatal | bootstrap | Bamboo has encountered errors while upgrading. Please resolve these errors and restart Bamboo. | Upgrade task for build 3615 failed with exception: Could not parse key 'null' |

Please contact us at <https://support.atlassian.com/> if you have any queries.

Is there some way that I can run Bamboo server interactively so that I can see messages in the console? Or, of course, if there is a way to quickly fix this issue then that would be preferred.

Kind regards and many thanks in advance.

Aaron.


Answers:
author: Felipe Kraemer
body: Hi Aaron,

It's not possible to start Bamboo showing the output in the console, but you can keep an eye in the Bamboo logs. They're located at BAMBOO_HOME/logs/atlassian-bamboo.log.

Also, many things have changed from Bamboo 5.0 to 5.2. I am not sure why the error is happening, but the [Bamboo 5.2 Upgrade Guide](https://confluence.atlassian.com/display/BAMBOO/Bamboo+5.2+Upgrade+Guide#Bamboo5.2upgradeguide-UpgradenotesfromBamboo5.xto5.2) mentions some steps that must be followed if you're migrating from 5.0 to 5.2. Have you followed those steps?


Tags: bamboo-administration
Where can I place my built jars
Asked by Salman Sayyed:

Does Atlassian provide a way to store the Built JARS onDemand, and if it doesn't what third-party cloud hosting artifactories can talk to bamboo onDemand?


Answers:
author: Anand Unadkat
body: Hi Salman,

With onDemand, this is not possible. You can try ask atlassian support to place those files for you, but I highly doubt they will say yes. onDemand is also quite limited when it comes to third party plugins that will enable the communication between bamboo and you JIRA. I sugesst you move to the download version to be able to perform advanced customisation as you can place jars under WEB-INF/lib

Regards

Anand


Tags: continuous-delivery

jar
Direct JDBC or JNDI connection for Bamboo 5.2
Asked by Jan Swaelens:

Hi,

I was wondering, since the latest versions of Bamboo are using Tomcat under the hood - what would atlassian recommend in terms of database connection type?

I imagine that Tomcat has a supperior implementation of handling it's database connections when compared to the direct connections used by Bamboo.

Wouldn't it be great to have bamboo configure the datasourve in Tomcat automatically and use it via JNDI?

Feedback very welcome!


Answers:
author: Przemek Bruski
body: Bamboo has always supported DataSources, you can use Tomcat as your DS provicer.

I am not sure why you think Tomcat's DS would be superior to the direct connection acquisition mechanism though.


author: Jan Swaelens
body: Yeah I know, but since it now ships with Tomcat instead of Jetty it feels more natural to use a DS there too. I'm probably conditioned as a long time EE app developer to think that an application server provides a better implementation of DS connection pooling then something standalone.

Anyhow, I was just looking for an answer on which of the two is best - both are as good if I understand you correctly.

thanks!


Tags: bamboo-administration
Two master branches on auto-managed git branches plan
Asked by Costin Radu:

I have the following problem or inconvenience:

On a bamboo instance on which I have projects that checkout from git repositories (from stash) when I create the auto-detected branches from stash I end up with two master branches.  
In git we have at least one branch called "master" and if needed some additional release, devel, feature, etc branches.

The problem is that even on project with one branch - "master", when I add in bamboo the branch from git I end up with two branches in the branch list.

The first one can be found on http://\<bamboo-url\>/browse/PROJECT-PLAN   
The second one is usually on http://\<bamboo-url\>/browse/PROJECT-PLAN0

Is there a way of disabling one of them or having in the begining only one ?

The branch imported from stash/git and added to bamboo and can be renamed.  
But in the end it is not a solution to have one "master" and one "real-master" .


Answers:
author: Costin Radu
body: Apparently the problem has been signaled before in <https://jira.atlassian.com/browse/BAM-12789>

However, my main problem as a result of the problem signaled above is that when I run the plan manually, only the plan is executed (but none of the branches)


Tags: bamboo-administration

bitbucket-server

git
Notification error Bamboo OnDemand 5.2-OD4
Asked by Duke Nguyen:

hi,

Our Bamboo OnDemand was just upgraded over the weekend by you guys, and we started suddenly getting this (harmless) error at the end of each build that is causing noise.

*Notifier Build Complete Action custom build post complete action failed to run*  
(java.lang.NullPointerException)  
(11 Nov 2013, 7:06:15 PM)  
And when clicking on View Error Details, it just shows a blank page. The build is completed however, and shows up as green. But this is just kinda annoying. Please help  
Thanks.


Answers:
author: Abdulrazaq Mohammed Ali Omar
body: Hi All,

This is a bug with one of the Bamboo OnDemand plugins "notifier-bamboo-plugin". A fix is being prepared for the next release and we have reported this public facing bug report:

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


author: Andre Rabold
body: This error is still happening but the issue has been set to closed with the comment OD-7 would be released "next week" (which actually was last week). We seem to be still on OD-4.

comments: author: Michael Knight
body: If you're still on Bamboo 5.2-OD-4 at the moment, you will be upgraded to OD-7 in the coming maintenance window (tonight for US \& EMEA, tomorrow for APAC).


author: Doron Gill
body: +1. Geez this is the second bug introduced on our OnDemand (the second is on Confluence <https://jira.atlassian.com/browse/CONF-31565>) since an upgrade that we were never even notified of.

Echoing the sentiments of another casualty. "Atlassian - do you yourself practice what you preach? Is your software ever tested before deploying"?


author: Duke Nguyen
body: Also, the only notification we have configured is the built-in one for the event:

Failed Builds And First Successful

to send an email. That's it.


Tags: cloud
Bamboo SSH task SSH key file format
Asked by Stephen Goldberg:

I have tried puttygen to format a private key for Bamboo SSH task , as well as the id_rsa file that is generated from the ssh-keygen -t RSA command. Both failed?  
My process is as followed:

On my App server run as bamboo user:

ssh-keygen -t RSA

...(NO Password)

id_rsa.pub \>\> .ssh/authorizedkeys

change the permissions on the files and folders.. DONE.

Download the private key id_rsa to local machine: Puttygen to .ppk format and/or use the id_rsa file to upload to bamboo KEY for SSH task..

This process causes Authorization Failure.  

Is there a specific format the key needs to be or am i doing the process wrong?  
I do not have dedicated bamboo elastic instance, i just use the linux s3 64 bit one they offer to build and deploy to my server..  
Any and all insight is appreciated.

Thank you for your diligence.


Answers:
author: Manuel Mall
body: Normally you would run ssh-keygen on the machine running Bamboo as the private key 'belongs' to the Bamboo machine not the remote machine. But you can get it working either way.

On the remote machine you need to add the generated id_rsa.pub file to the \~/.ssh/authorized_keys file of the account you want to connect under (In your original comment you have the file called authorizedkeys). Note: IIRC both the .ssh directory and the authorized_keys file must NOT be group nor world readable.

If you need to specify a password or not when uploading the id_rsa file to Bamboo depends on if the id_rsa file was created with password encryption or not.

If you are not sure if your id_rsa file is encrypted open the file in a text editor. If it begins with

-----BEGIN RSA PRIVATE KEY-----

Proc-Type: 4,ENCRYPTED

DEK-Info: DES-EDE3-CBC,7D86EF6581EFD29E

then it is encrypted. If it just starts with  
-----BEGIN RSA PRIVATE KEY-----  
then it is not encrypted.

comments: author: NaveenKumar
body: I am getting an error while following this article.

failed to connect host.


author: Manuel Mall
body: The id_rsa file as generated by ssh-keygen works for me (that's for a local install of Bamboo not OnDemand though).

comments: author: Stephen Goldberg
body: Can you give me a high level of your process?  
Your on remote host, ssh-keygen.. take the id_rsa upload it to bamboo server for ssh task or scp task and it works? when you run build it successfully connects to remote host from bamboo server? with or without password?


author: Stephen Goldberg
body: bamboo on demand

version 5.2-OD-3

build#: 4000

builddate: 10/22/2013


Tags: cloud