youngmon/atlassian-qna huggingface dataset:
Is Bamboo suitable for deploying updates to 50+ customer servers?
Asked by Scott Stevenson:

Is Bamboo suitable for deploying updates (the same build) to 50+ customer servers? And what would be the best approach to accomplish this?


Answers:
author: Jason Monsorno
body: The build itself has options to save the build output as an artifact that is available further in the workflow and if you want archived and stored forever. Bamboo is pretty nice front-end for CI/CD workflows but it won't solve any of your deployment problems. You still need to be able to script it somehow and may want separate systems to do some of the heavy loading.

Inside of Bamboo there is the concept of local agents and remote agents. Local agents are more/less worker threads while remote agents are additional machines, both will allow you to do concurrent work like 50 deployments at once or chunked and you can decide what balance you want for time and perfomance metrics you need to acheive.

So it definitely suitable, the actual deployment itself you probably already have some script or automated process so plugging that it should be simple enough, the difficulty comes to any concurrency. Bamboo doesn't have any dynamic concurrency so you'll need to list each out or build a multi-threaded deployment yourself.


author: Scott Stevenson
body: Thanks Jason. Right now we are deploying to one staging server using an SCP (copy artifact to server) and SSH (run script to install artifact on server). Deployment task pictured in image below:![](http://i.imgur.com/vtLv5qV.png)

I am mostly wondering: What is the most logical way to expand this to deploy to an array of servers rather than a single server? Maybe just write one script that grabs the array of servers from an external server, and then iterates through them all? Or perhaps there is a plug-in that would make more sense?

comments: author: Jason Monsorno
body: I would love a plugin for that, I haven't found one but that doesn't mean it doesn't exist. Personally I gave up the search and wrote my own, I have to deploy to 5 different Q\&A sites on each build and of course no one wanted to wait so I have it multi-treaded with a reader-writer lock on the artifact, we store our artifacts outside of Bamboo as well.


author: Iiro Niinikoski
body: Hi guys,has anyone found any elegant way to configure the fleet of servers automatically...?It's starting to sound it will be some custom external scripting...


author: Iiro Niinikoski
body: ...because who wants to manage SSH keys manually inside Bamboo....


Tags: cloud
Ant task fails to run
Asked by Dave Ferguson:

Using CentOS 6.5 and Bamboo 5.6.1 and Apache Ant version 1.7.1

I am having an issue getting ANT taks to run. I am getting the following error when trying to run an ant task

Error: Could not find or load main class org.apache.tools.ant.launch.Launcher

However, if I take the call from the log and run it on the server the task runs just fine. I am not that versed in CentOS so I am not sure where to look. I have a feeling that it has something to do with the extra environment variables that Bamboo is adding but I am unsure.


Answers:
author: Krystian Brazulewicz
body: Dave

There's not enough information to provide a valid answer to your question. I think you should contact [Bamboo Support](https://support.atlassian.com/servicedesk/customer/bsp). Please provide them with

* issue description
* build log
* Bamboo server logs


Tags: bamboo-administration
Bamboo: How to pass task result into next task in one stage/job?
Asked by Maxim Moroz:

I have build plan with one stage \& default job.

In this job I have about 5 tasks. In first task I execute script on remote server to find out release dir (it always different) and I need to pass this value (release dir) to all next tasks.

In TeamCity I can set TC variable inside task. How can I do it in Bamboo?

Thanks.


Answers:
author: LarsM
body: You might want to checkout this Plugin from Atlassian.

<https://marketplace.atlassian.com/plugins/com.atlassian.bamboo.plugins.variable.updater.variable-updater-generic>

You can read values from file and inject it into variables.


Tags: variable
Build output similar to Jenkins
Asked by Shane Poage:

Is there a way to have an interactive view of a build's output, similar to what Jenkins displays? I have a build that is hanging and thus is delivering no output, so I can't figure out what is wrong with it. The task that the build is performing works just fine when done by hand, so it's perplexing me.

[](https://jira.atlassian.com/browse/BAM-13494)<https://jira.atlassian.com/browse/BAM-13494>I found this, which seems to indicate that this was an issue in the past but is fixed now. I'm on 5.6, so it's long since been patched. Any known issues here?


Answers:
author: Shane Poage
body: For some reason, the agent processing the jobs had hung up. Bouncing Bamboo made the problem go away.


author: shari_anderson
body: If you go to the Log tab when the build is running you'll see the build results.


Tags: bamboo-administration
Using a plan variable in Plan repository url
Asked by AF KL Customer:

When configuring the repository url for a plan, is it possible to use a plan variable ?

For instance:

[http://ourbamboo.com/${bamboo.projectname}.git](http://ourbamboo.com/%24%7Bbamboo.projectname%7D.git)

On our Bamboo server, we have a strange side effect.

In several projects, a lot of branches of other repositories than the default are automatically created. However, they aren't declared in the plan and of course not present in the default repository. We're faced with a lot of errors in our logs with the message:

Branch has probably been removed.

Maybe it's related ...


Answers:
author: pradhyumna shrestha
body: You don't have to use the source checkout task.

you can just use a simple bamboo script task and add

# check if the git has already checked out the build if not do following

git clone \<your repository\>...

Just use the repository for trigger.
Bamboo: Result decorator in servlet
Asked by S:

Hi,

I am writing a plugin which contains web-item and servlet.

```
&lt;web-item key="key" name="webItem" section="chainResults.subMenu/chainResults" weight="60"&gt;	&lt;link linkId="link_to_servlet" absolute="false"&gt;/plugins/servlet/static?planKey=${planKey}&amp;amp;buildNumber=${buildNumber}&lt;/link&gt;&lt;/web-item&gt;
```

```
&lt;servlet name="Servlet" key="static-servlet" class="StaticServlet"&gt;        &lt;description&gt;The My Servlet Plugin&lt;/description&gt;    ????&lt;resource name="view" type="velocity" location="servlet.vm"/&gt;        &lt;url-pattern&gt;/static&lt;/url-pattern&gt;    &lt;/servlet&gt;
```

```
public class StaticServlet extends HttpServlet{    @Override    public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException{        response.setContentType("text/html;charset=utf-8");        renderer.render("/servlet.vm", map, response.getWriter());}}
```

```
&lt;html&gt;&lt;head&gt; &lt;meta name="decorator" content="result"&gt;&lt;/head&gt;&lt;body&gt;...
```

When I am at Build summary or any other tab and click on web item, servlet has decorators and everything, but when I **paste link to browser** or reload servlet, there is an error (obviously).

Is there some way to process URL parameters "buildKey" and "buildNumber" so bamboo will know what decorator to use? I know how to do this in xwork but I want to use servlets for this task.  

Thanks!


Answers:
author: S
body: I have decided to use Xwork/actions. I wanted servlets because of velocity but I have no choice if I don't want to try random things for days.


author: S
body: I sucesfully retrieve immutablePlan and resultsSummary and pass it to velocity template as parameters

```
map.put("immutablePlan", getImmutableChain());map.put("resultsSummary", getResultsSummary());renderer.render("/template.vm", mamap, response.getWriter());
```

I think I am on the right way. Now my problem is how to pass these to decorator, so he knows what project, plan and build I am in.

Any ideas?


Tags: decorator

servlet
Prevent failed EC2 machine from running build
Asked by Dan Fabulich:

We're running Bamboo OnDemand builds on Amazon EC2 machines with VPC. For some reason, the VPC network connection isn't 100% reliable, and so occasionally a given TCP connection attempt will fail.

In our VM startup script, we need to download and setup a bunch of stuff via the VPC connection. Most of the time, that works as expected. But occasionally, when a connection drops, the script fails. When this happens, the VM is not suitable for running builds.

But Bamboo OnDemand doesn't \*know\* that the VM isn't suitable for running builds, so it tries scheduling a build there anyway. Usually the build fails pretty fast, for a reason having nothing to do with the code that it's building. If there's a large queue of waiting builds, bad VMs will tend to churn through the queue, quickly failing all of the builds there.

Is there a way for the VM to send a signal back to Bamboo saying that the startup script failed and that the agent on that machine should be disabled?


Answers:
author: Przemek Bruski
body: If your script fails, just do:

rm -rf /opt/bamboo-elastic-agent

killall -9 java

That will prevent the agent from starting and will kill any started agent. Bamboo will notice that the agent went down and remove from the list eventually (no builds will be sent to the agent in any case).


Tags: cloud
Does bamboo cache its global variables?
Asked by Jeff MacDonald:

Hi,

I'm using a global variable in a deployment project. Its a password that I recently had to change. The deployment tasks still uses the old one. I checked in the database table called variable_definition and have confirmed that the DB holds my new valid password.

I've started and stopped the bamboo process wondering if it was a cache somewhere...

Suggestions??


Answers:
author: Przemek Bruski
body: Does it happen for new builds or just old builds that you rerun?

comments: author: Jeff MacDonald
body: It happens when I try to run deploymet projects on old build results yes. If i create a new build results it will use the new variable-data. Didn't expect that behavior. All is well now.


author: Jeff MacDonald
body: It happens when I try to run deploymet projects on old build results yes. If i create a new build results it will use the new variable-data. Didn't expect that behavior. All is well now.


author: Przemek Bruski
body: Yeah, Bamboo snapshots the variable state so that you get consistent build reruns


author: Marcin Sidorczuk
body: is there is a way to force using current global variables instead of variables from snapshot? We are using global variables for storing servers list for deployment, now if we deploy some older build it is deployed only to part of servers.


author: Przemek Bruski
body: No, no way. But you can run a custom build against the same revision. It will get the current variables.


author: Gabriel Ribeiro
body: A suggestion ticket has been created covering this request:

* [Global variables should be read at runtime during deployment](https://jira.atlassian.com/browse/BAM-20706)

Thank you.

best,  
Gabriel Ribeiro

comments: author: PhilipJ
body: Thanks Gabriel.

I've voted for the issue.


Tags: variable
get bamboo project key using curl
Asked by phani phani:

Here is what I am trying to do:

If I query Bamboo Project name to Bamboo REST API using Curl , Expected output is: Project Key.

If I query Bamboo Plan Name to Bamboo REST API using Curl , Expected output is: plan key.


Answers:
author: Krystian Brazulewicz
body: For this particular scenario I'd query Bamboo REST to list all plans:

```
$BAMBOO_URL/rest/api/latest/plan
```

and then use the information from response (plan key + plan name) to populate your UI controls. Then you'll display plan name and store plan key.

comments: author: phani phani
body: Yes, thats what I did. But the problem with this method is... if a project is having more than 40 plans, I have write a script to basically iterate all plans to get a key for a plan.

Since this is simple query, thought there would a direct solution for it.

But, thanks for your Inputs.


author: phani phani
body: Its hard to explain, but try to put this way, my JIRA ticket is accepting two fileds that are related to Bamboo (1. Project Name 2. Plan Name). I am writing a script to auto execute the Bamboo Plan, based on the JIRA Ticket. For this I had to build a Bamboo Plan url (based on the Project Name or Plan Name that I am capturing from JIRA Ticket) which requires Bamboo Plan Key.


author: Krystian Brazulewicz
body: Hi

The whole REST API is build the other way around. You're exepected to know the project/plan key and then you can get more detailed information. Example for plan BAM-FC:

```
curl --header "Accept: application/json" $BAMBOO_URL/rest/api/latest/plan/BAM-FC
```

will give you

```
{    "expand": "actions,stages,branches,variableContext",    "projectKey": "BAM",    "projectName": "+core+ Bamboo",    "project": {        "key": "BAM",        "name": "+core+ Bamboo",        "link": {            "href": "$BAMBOO_URL/rest/api/latest/project/BAM",            "rel": "self"        }    },    "description": "Our main CI test build.",    "shortName": "A CI Tests Master",    "buildName": "A CI Tests Master",    "shortKey": "FC",    "type": "chain",    "enabled": true,    "link": {        "href": "$BAMBOO_URL/rest/api/latest/plan/BAM-FC",        "rel": "self"    },    "isFavourite": false,    "isActive": false,    "isBuilding": false,    "averageBuildTimeInSeconds": 3627,    "actions": {        "size": 1,        "start-index": 0,        "max-result": 1    },    "stages": {        "size": 2,        "start-index": 0,        "max-result": 2    },    "branches": {        "size": 25,        "start-index": 0,        "max-result": 25    },    "variableContext": {        "size": 30,        "max-results": 30    },    "key": "BAM-FC",    "name": "+core+ Bamboo - A CI Tests Master",    "planKey": {        "key": "BAM-FC"    }}
```

Can you please explain why would you like to query REST API with plan name?

comments: author: Erik Husby
body: One good reason -- Bamboo does not display the Project/Plan keys any where except in the build log files.


Tags: bamboo-administration
Is there a way to send a notification to a Group when there is no Responsible User
Asked by Ben:

In most cases, we only want to notify the Responsible User of a failed build

In some cases, our Bamboo build failures have no Responsible User (I'll explain the background at the end). Is there a way to set up a bamboo notification to a Group that only sends the notification when there is *no* responsible user?

Our use case for this is due to shared libraries, using maven versions. We run versions:use-latest-versions to update our (internal) depdendencies which then tests that our dependency/library changes have not broken the higher-level projects. However, since this is not based on source control changes, there is no responsible user. In that case, we think it best to just notify the whole team. Maybe one day we'll figure out how to figure out the responsible user another way...


Answers:
author: Daniel Wester
body: Why not just set a general notification on the broken build?

comments: author: Ben
body: Because I don't want to spam the group on every failure - just the person that is responsible to give them a chance to fix it. But if that person cannot be determined, then I _do_ want to spam the team.


Tags: cloud
Are there descriptions for the stock Elastic Images
Asked by Samant Maharaj:

I can't find any description of the difference between the EBS and S3 images.

Is there some documentation somewhere that I've missed?


Answers:
author: Przemek Bruski
body: The content is the same. The difference lies in the device that backs the root partition.

In general, EBS is newer and should be preferred because it's easier to customise (if you want to customise it in the future).

You can read all about the differences here, but I don't recommend it unless you really want to know how they work: <http://serverfault.com/questions/113184/should-i-persist-images-on-ebs-or-s3>


Tags: cloud
Error starting a new instance on elastic bamboo
Asked by Saurabh Singh:

Failed to start elastic instances: Error when starting a new instance

I am getting the above error. While documentation for some of the other products (JIRA and Bitbucket) is great. I think Bamboo lacks a bit on that part. It might be my imcompetence as well to understnad the doc.

I want to setup elastic bamboo, any help is much appreciated.

Thanks.

<br />


Answers:
author: shane_d
body: Did anyone find an answer to this? I am getting this error and tried the steps above without success.


author: Michael Van Diest
body: This post at least shows a stripped down policy <https://answers.atlassian.com/questions/148716/answers/17439894>. Although at the moment I can't seem to start instances. Atlassian support fails here to as it just gives me a cryptic "Failed to start elastic instances: Error when starting a new instance" message


author: Michael Van Diest
body: It's crazy to add the Administrator Access policy. A least privilege policy should be used. Unfortunately Atlassian does not tell you what the minimum IAM actions required are.


author: Silvio Rainoldi
body: Thanks Artie, worked for me


author: Artie Brosius
body: I was able to solve my problem with help from Atlassian support. My IAM user did not have the proper permissions granted. Once I granted Administrator Access user policy to the IAM user being used by Bamboo, Bamboo was able to start the instance.


author: Przemek Bruski
body: Which image are you using?


author: Artie Brosius
body: This is happening to me too. I went through the AWS EC2 setup and was able to start a new EC2 instance from the AWS console. But I can't get Bamboo to start a new instance for me. I too get the "Failed to start elastic instances: Error when starting a new instance" error.


Tags: cloud
Via the Java Api can I programatically update plan branch configuration
Asked by Lee Myring:

Hello,

Every time I create a new Git branch for a new sprint I want to update the Plan Branch's Source Repository Branch value to the newly created branch. For example sprint/2 is the current branch name and there's now a new branch called sprint/3 that I wish to update it to.

My Plan Branches are fixed. I DO NOT want to have automatically generated plan branches when new git branches are detected (which I used to do but my plan branch variables needed to be updated in the newly generated plan branch and that became too much manual work)

So I would like to create a simple Java program that will iterate over all my plans and update the sprint plan branches to the new git branch. Is this possible? I saw the docs ([](https://docs.atlassian.com/atlassian-bamboo/latest/)<https://docs.atlassian.com/atlassian-bamboo/latest/>) which were frankly overwhelming for a non-developer and I was hoping someone could point me in the right direction to get me started

Many thanks


Answers:
author: Przemek Bruski
body: In your case it would be easiest if submitted the action /branch/admin/config/editChainBranchRepository.action?buildKey=YOUR_BRANCH_NAME and captured what gets sent to the server using FireBug or some other plugin.

Using that data, you'll be able to create a Java program (or even a simple script that uses curl - [](http://curl.haxx.se/)<http://curl.haxx.se/>) that updates the branch name to what you want.

comments: author: Lee Myring
body: Thanks for this but I have captured a lot of data and not really sure how that helps me in any way? Any other clues please?


Tags: cloud

java

javadoc
Queue build multiple times in Bamboo
Asked by Bartlomiej Wachowski:

Hello,

I am facing an issue with queueing a build multiple times - Bamboo just does not want to queue builds. It happens in two scenarios:

**Repository triggers the build when changes are commited + Stash post receive webhooks** - suppose there are two commits, the first one triggers the build, the second happens when Bamboo is still building the previous commit. Then the second commit is not built.

**Trigger by a parent plan + Maven Dependencies Processor** - suppose there are two plans that trigger a child plan. The first parent plan finishes and triggers the child plan, the second parent plan finishes when the child plan is building due to the first parent. What happens is that the child plan is not built for the second time.

Is there any way to convince Bamboo to queue builds and build every trigger? I am using Bamboo 5.4.2 build 4208


Answers:
author: Marcin Gardias
body: I think you need to enable 'concurrent builds'.

You can do it in Administration -\> Plans -\> Concurrent builds. There you set the maximum number of builds triggered at the same time for a single plan.

You can override the global setting on per-plan basis in plan configuration, 'miscellaneous' tab.

comments: author: Bartlomiej Wachowski
body: But this means that the builds will run simultaneously on two agents. It will produce errors as the builds are using jgitflow plugin with automated merges to release maven artifacts. Is there any way to make them run in order of the triggers?


author: Marcin Gardias
body: In Bamboo 5.6 you can limit build(s) to specific agent(s). It's not the optimum solution (it's specific agent rather than 'whichever is free but no more than one') but that's the best that is supported 'out-of-the-box'.
Bamboo deploy prompt
Asked by seanFinocchiaro:

When i run a deploy i want a prompt to ask for a username/password when deploying to a server, must use sftp, cannot use scp. There is no bamboo sftp task(cannot use bamboo scp task). I am using the Ant sftp task instead and calling the ant task, however at this point i need to prompt a password.

I have seen run customised for the run stage([](/questions/12316/is-it-possible-to-prompt-the-user-for-input-with-bamboo)<https://answers.atlassian.com/questions/12316/is-it-possible-to-prompt-the-user-for-input-with-bamboo>) is there a way to do this at the deploy stage or another way to get an input?

Or any way to do sftp with bamboo?


Answers:
author: Mike Berkman
body: i'd like for bamboo to prompt for an SSH key password and NOT save it in the database.


author: nhooey
body: It looks like this isn't possible.

There is a [JIRA ticket](https://jira.atlassian.com/browse/BAM-14802) to implement this that hasn't even been triaged yet.
Can a user view a bamboo working directory?
Asked by Ron Stanonik:

Users are asking me, the system administrator, to give them files from bamboo working directories to help them figure out why plans fail.

How can users view the working directory themselves?


Answers:
author: shari_anderson
body: You could share the directory from the bamboo server and give users access that way; they'd simply have to map a network drive.


author: ssetayeshfar
body: Hello Ron,

It's not possible to give users access to main Bamboo directories via the UI to download or view specific files. This page has a list of all important Bamboo directories and you need to modify permissions for each and provide access to the server if they need the files: [](https://confluence.atlassian.com/display/BAMBOO/Locating+important+directories+and+files)<https://confluence.atlassian.com/display/BAMBOO/Locating+important+directories+and+files>

Hope this helps and answers your question!

Thanks.

Best,

Sepideh


Tags: working-directory