youngmon/atlassian-qna huggingface dataset:
How do I run just a single stage of a build?
Asked by Andrew Eisenberg:

I originally asked the question on Stack Overflow, but I think I can get a better answer here. Here's the original question:

<http://stackoverflow.com/questions/10459130/how-do-i-run-just-a-single-stage-in-my-bamboo-build>

I have a bamboo build with 2 stages: Build\&Test and Publish. The way bamboo works, if Build\&Test fails, Publish is not run. This is usually the way that I want things.

However, sometimes, Build\&Test will fail, but I still want Publish to run. Typically, this is a manual process where even though there is a failing test, I want to push a button so that I can just run the Publish stage.

In the past, I had two separate plans, but I want to keep them together as one. Is this possible?


Answers:
author: Przemek Bruski
body: Short answer: no. If you want to run a stage, all prior stages have to finish successfully, sorry.

What you could do is to use the [Quarantine functionality](http://blogs.atlassian.com/2012/04/test-quarantine-continuous-integration-bamboo4/), but that involves re-running the failed job (in yet-unreleased Bamboo 4.1, you may have to press "Show more" on the build result screen to see the re-run button).

Another thing that could be helpful in such situation (but not for OP) is disabling jobs.

comments: author: Andrew Eisenberg
body: It looks like we are running Bamboo 3.4.4. So, I guess I would be best off moving back to my old situation where I had build\&test and publish in separate plans. Thanks for your answer.


author: Przemek Bruski
body: Or, upgrade to Bamboo 4.0 (just making sure you did not think that Quarantine is only available with 4.1).


author: Andrew Eisenberg
body: Wish I could, but not my decision. :)


author: Andrew Eisenberg
body: Thanks for the reply. Unfortunately, it wasn't what I wanted to hear. I split the two stages into separate plans with a parent/child dependency and it is working as I want again.


author: Joe Levis
body: Can we add this functionality? This is pretty critical for our push towards Continuous Delivery. For instance, it would be great to use a Bamboo stage for deployments. If I have a Deploy stage, I can use it to deploy any build at any time for that product, and then I could leverage Bamboo's built-in logging and fail/success notifications.

comments: author: Przemek Bruski
body: Bamboo 5 may have what you want, Beta should be out soon: <http://blogs.atlassian.com/2013/04/beta-program-atlassian-bamboo/>


author: Johannes Rauh
body: This functionality would also be great to have for testing. If I change only a later stage, I do not need to rerun all previous stages.
Infrastructure best practices
Asked by Xabier Davila:

Hi,

We have recently setup a Bamboo instance with the purpose of testing it as our future CI solution (primarily for .net projects, but also Java and others)

Everything looking good so far, but we've found a bottleneck when moving artifacts back and forth from the server and the build agent.

As an example of one basic plan, we have the following stages:

1. Checkout and compile: This produces an artifact (in the build agent) that is stored back in the server. Artifacts can be quite big (more than 1GB)

2. Unit tests: Artifact is moved back to the agent in order to run the unit tests

...

So this moving artefacts between the Bamboo server and the build agent is slowing down all the prices, even we're just running a single build agent and 5 projects.

What's your advise/best practice with this?

Any advise regarding the infrastructure to run Bamboo in a production environment with aprox 50 build agents and a few more projects running CI?

Thanks


Answers:
author: Jan Swaelens
body: You could try to work around the network back and forth by not defining the artefact as an artefact and publish it on an ftp or shared drive under a unique folder (ci build nr for example). This way the artefact doesn't have to go to the bamboo server and agent's can retrieve it from the shared drive or ftp server which is going to be faster. Another alternative might be using maven or ivy as a dependency tool which would allow you to take advantage of the local cache they keep when retrieving artefacts (but in your case, this might blow up the artefact server by the cheer size of your artefacts - you'll need to add proper purging which would complicate things even more).

But in the end, you will keep on having delays when handling +GB artefacts when you run on remote agents either way you look at it (you could just stop using remote agents and get a faster build server to run everything on one node).

Concerning the hardware requirements, you could take a look here:

* [https://answers.atlassian.com/questions/38278/hardware-sizing-for-100-agent-bamboo-installation](/questions/38278/hardware-sizing-for-100-agent-bamboo-installation)
* <http://confluence.atlassian.com/display/BAMBOO40/Hardware+sizing+considerations>
404 error on a new install of eclipse connector for Bamboo
Asked by Darren Pulsipher:

Bamboo 4.0

Eclipse Connector 3.0.4

It says it vallidates the server at first and then it pops up a 404 error.

Any ideas?


Answers:
author: jjaroczynski
body: Hi Darren,

I have already answered your other question related to the same issue.  
Bamboo 4.x does not contain old API any more.

We are working on Connectors side to fix the issue (switch to the new API). It is actually done and should be released by the end of the week. Stay tuned.

Cheers,

Jacek


Tags: ide-connector
IDE-Connector for Bamaboo and Eclipse
Asked by Darren Pulsipher:

I am trying to connect my eclipse to bamaboo I have downloaded IDE-Connector 3.0.4.

When I add the Bamboo Server to my build server, And I select USe Favorite builds for server I get a clean validation.

When I deselect it or when it is trying to get the Build Information I get a 404 error.

I looked at the stack trace from the bamboo log. I get the following

ulsip POST <http://dwpulsip-desk:8085/api/rest/login.action> 25851kb

jvm 1 \| 2012-05-04 10:16:54,777 INFO qtp1535043768-20 AccessLogFilter dwp

ulsip GET <http://dwpulsip-desk:8085/api/rest/getBambooBuildNumber.action?auth=BL>

3JY5ah43 25356kb

jvm 1 \| 2012-05-04 10:16:54,777 ERROR qtp1535043768-20 DispatcherUtils Co

uld not find action

jvm 1 \| There is no Action mapped for namespace /api/rest and action name get

BambooBuildNumber. Check if there is such an action name with such namespace def

ined in the xwork.xml and also if such an action class exists. Check also the lo

g to see if the action class is successfully loaded. - unknown location

jvm 1 \| at com.opensymphony.xwork.DefaultActionProxy.\<init\>(DefaultActio

nProxy.java:75)

jvm 1 \| at com.opensymphony.xwork.DefaultActionProxyFactory.createAction

Proxy(DefaultActionProxyFactory.java:46)


Answers:
author: j
body: In fact, this problem as never been fixed by Atlassian : <https://ecosystem.atlassian.net/browse/PL-2714>

And it seems that it will never be done (by Atlassian) in future : <https://developer.atlassian.com/jiradev/latest-updates/discontinuation-of-support-for-atlassian-ide-connectors>

comments: author: jjaroczynski
body: You can safely use the latest connector with Bamboo. The linked issue is answered.


author: jjaroczynski
body: Hi Darren,

I guess you are using Bamboo 4.x which does not contain old API any more.

We are working on Connectors side to fix the issue (switch to the new API). It is actually done and should be released by the end of the week. Stay tuned.

Cheers,

Jacek


Tags: ide-connector
Bamboo test & deploy to external server
Asked by David Perez:

Hello,

We are using Bamboo on JIRA on demand and would like to export the repository on a external server to be able to run our test suite and check our deployed app (PHP \& mongodb).

We are confused on how to proceed. Do we need to run the test on the JIRA cloud and if so, can we configure it to use PHPUNIT?

How do we configure the build.xml file from the builder (ant? script?)

Thank you.

Kind Regards,

David


Answers:
author: David Perez
body: Thank you that was very useful!

My company has decided to use the standalone self hosted solution.

Kind Regards

David


author: Joe Clark
body: In Bamboo OnDemand, it is only possible to run Bamboo jobs using Elastic Bamboo Agents that run in Amazon's EC2 cloud. Additionally, the agent is only allowed to connect to the built-in Subversion repository hosted in the OnDemand environment.

A full list of what you can and can't do in Bamboo OnDemand is available in our documentation: <http://confluence.atlassian.com/display/AOD/Restricted+Functions+in+Atlassian+OnDemand#RestrictedFunctionsinAtlassianOnDemand-Bamboo>

We really hope to be able to add some flexibility to Bamboo OnDemand in the future, but that's the way it stands at the moment (The standalone version of Bamboo doesn't have these limitations).

Hope this helps,  
joe.


Tags: cloud
What are the AMI Instance id's of the Stock images ( Windows and Linux )
Asked by Colin Griffiths:

Hi,

We have one which is ami-395a8550 but there are two for bamboo 4.0. We need to know what they are. Anyone help?

Thanks, Colin.


Answers:
author: Przemek Bruski
body: I can give you the AMI ids, but if you intend to use Bamboo 4.0 images with OnDemand, they won't work until OnDemand is upgraded to 4.0...

comments: author: Colin Griffiths
body: Thanks. We did not relaise the onDemand instance was running Bamboo 3.0 - got confused with the plugin version. Sorry.


Tags: cloud
How to disable task in Bamboo?
Asked by Maciej Krajewski:

Hi,

From time to time we would like to disable tasks in a jobs and I cannot find such functionality :( It is possible to disable Job but it is not enough in some situation. Currently we have to delete task but it is not best solution because sometimes we have to create these tasks one again after few weeks.

Regards

Micha?


Answers:
author: Przemek Bruski
body: Cze?? Micha?,

unfortunately, it's not possible. An improvement request for that is tracked [here](https://jira.atlassian.com/browse/BAM-11100) . Please watch and vote.
Bamboo shows wrong changes for branch build
Asked by Gretchen Jones:

Don't know if this is a configuration issue or a bug. When I run the build on my SVN branch bamboo displays the changeset from the trunk of the repository even though those changes are not in the branch.

The correct code is built but technically the changeset shouldn't include those changes below. So the build is working right but the reporting on what is in the build doesn't reflect reality.

Is there something I need to tweak? I had a developer freak because he saw I built a hotfix for production off the branch and it reported his new dev changes from the next sprint were included (by the image below and what was reported in the build).

![](../../upfiles/build3ati.png)![](../../upfiles/build3branchconfigSVN.png)


Answers:
author: Przemek Bruski
body: This looks like a bug. [I've opened an issue for it](https://jira.atlassian.com/browse/BAM-11494), please watch and vote.


author: Gretchen Jones
body: Also noticed that the bamboo plugin for Jira is not reporting this branch build associated with the issue.

The build referenced above is #3 and in JIRA on the ATING-393 issue that was built it references build #14 but not #3. The item was built in build #14 but that was on the trunk. I merged that change to my branch and I would expect this to show up in the branch build change list since it changed in the branch. Once the change has appeared in a build I would expect it to not show up anymore in the changes list (since it would not be a change in that build).

Didn't know if this was the same issue or something new so I added it here. I'll let you figure out whether it belongs as part of the BAM-11494 or not.
Can I run just a single task from a plan
Asked by AmitB:

I have a plan with 6 tasks. Is there a way to just run the 2nd task when testing the configuration?


Answers:
author: Przemek Bruski
body: Unfortunately, it's not possible. An improvement request that would help you is tracked [here](https://jira.atlassian.com/browse/BAM-11100) . Please watch and vote.


author: Renjith Pillai
body: A similar question? [https://answers.atlassian.com/questions/46302/how-enable-disable-task-executing-in-job](/questions/46302/how-enable-disable-task-executing-in-job)
Deploy Tomcat Application snapshot artifacts
Asked by Nathan Wilhelmi:

Hello,

We are using the deploy tomcat app to deploy nightly builds (snapshots). The war file gets saved as an artifact with the name product-1.0.0-SNAPSHOT.war

Is there any to get this to be version agnostic? I would like to do: product-\*.war, it's the only artifact but it won't work. I would rather not have to update builds when the version number changes.

Thanks!


Answers:
author: James Dumay
body: Why not use a script task that runs before the Tomcat deployment task to copy or move the file from product-X.Y-SNAPSHOT.war to product.war?

comments: author: James Dumay
body: You will need to [use Artifact Sharing to download the artifact](http://confluence.atlassian.com/display/BAMBOO40/Configuring+artifact+sharing+between+jobs) to the local directory.


author: Nathan Wilhelmi
body: Artifact sharing is enabled, that is how I moved it into the artifacts directory, perhaps I need to call it something else?


author: Nathan Wilhelmi
body: That would work, how do get the reference to the artifact directory?

mv ./artifacts/product\*.war ./artifacts/product.war

Doesn't work....


author: James Dumay
body: How does the move fail? It cant find the file?


author: Nathan Wilhelmi
body: The problem appears to be using the directory name 'artifacts' once I change it to something else it worked fine.

Thanks!


author: James Dumay
body: How does the move fail? It cant find the file?
Error in Visual Studio 2008 task
Asked by AmitB:

|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| When I run a Visual Studio 2008 task in Bamboo, I get the following error: c1xx : fatal error C1083: Cannot open compiler intermediate file: 'C:\\Windows\\system32\\config\\systemprofile\\AppData\\Local\\Temp\\_CL_b3f3ed73ex': No such file or directory I created this directory and it still happens, please help!!! Running Visual Studio directly on the machine works fine. |


Answers:
author: Renjith Pillai
body: Remember reading about this before, but unable to find the link. If you bamboo service is running under system account, you could try to change it running under the user under which it works.


author: Per Franck
body: having the same issue. bamboo running on my user account.

comments: author: Per Franck
body: having the same issue. bamboo running on my user account.
Can Bamboo access ant properties?
Asked by Timothy Marks:

I know how to pass bamboo variables into my ant script as command line arguments but if my ant script has a build.properties file with a version=bob key value.. can I make that available to bamboo.

Specifically, I want to read the ${version} property from build.properties and use that in Bamboos svn tag task


Answers:
author: James Dumay
body: EDIT: Take a look at the [Inject Bamboo variables from file Task](https://marketplace.atlassian.com/plugins/com.atlassian.bamboo.plugins.bamboo-variable-inject-plugin) in Atlassian Labs.

There is currently no way todo this in Bamboo but I have opened a [feature request](https://jira.atlassian.com/browse/BAM-11559) to track this.
How do I get artifacts with the REST API?
Asked by dlee:

I'm trying to write a script to download the artifacts for the most recent build of a particular plan. I can see in Bamboo that this build has artifacts, but the response from the REST API shows none. Is there something I'm doing wrong? I'm using Bamboo 4.0.1

```
$ curl 'http://my-bamboo/rest/api/latest/result/MRPRJ-MYPLAN?expand=results\[0\].result'# snip  &lt;artifacts size="0" max-result="0" start-index="0"/&gt;
```


Answers:
author: James Dumay
body: Are you sure you don't want to use the Job key instead of the Plan key? The query you are making to the rest api will only show the artifacts which have been Shared.

comments: author: dlee
body: That was it! The [REST API documentation](https://developer.atlassian.com/display/BAMBOODEV/Bamboo+REST+Resources) didn't mention using job keys, so I didn't think about that. Thanks!


author: Ashish Panwar
body: Hi David,

I am new to REST API and looking for this option.

Can you please help me with the command to get artifact using either build number or release id ?


author: Bob Swift (personal)
body: [Bamboo Command Line Interface](https://bobswift.atlassian.net/wiki/display/BCLI) has the [getArtifact](https://bobswift.atlassian.net/wiki/display/BCLI/Documentation#Documentation-getArtifact) action which handles the REST stuff for you, but you will still need to do as James says to either make it shared (easiest) or access by job.

comments: author: dlee
body: Thanks for the suggestion.


author: Jobin Kuruvilla [Adaptavist]
body: Is it visible without logging in? Maybe you can try with a username/password?

curl -u userid:secret ...

comments: author: dlee
body: Yes, it is visible without logging in. Also tried with username/password, same result.
Manually Recreate Artifacts after Bamboo upgrade
Asked by Timothy Marks:

WE have a very large bamboo data directory which is not able to be backed up given the 4 GB zip limit.

Our hosting staff had to exclude the artifacts from the backup in order to succeed. How can we manually get the artifacts moved from the old system format to the new folder structure? What can you recommend if this is not possible?


Answers:
author: Renan Battaglin
body: Hi Tim,

If the Bamboo Backup feature can't be used, the best way to save the data is to backup the \<Home-Directory\> and a full DB Dump. The construction of the new folder structure for the the artifacts can be tricky. We recommend using the [traditional upgrade method](http://confluence.atlassian.com/display/BAMBOO40/Bamboo+generic+upgrade+guide) in order to get the new Artifact folder structure built. This is also important because the artifact folder is not the only change. The DB schema and other folders are also changed.

The Artifact folder format was documented [here](http://confluence.atlassian.com/display/BAMBOO40/Locating+important+directories+and+files):
> `artifacts/`*PLAN_KEY*`/shared/build-`*BUILD_NUMBER*`/`
>
> This is a folder shared by all the stages of a certain plan. Stages will place Artifacts here so that other stages from the same plan can have access to them. The *BUILD_NUMBER* will always have a minimum of 5 digits, having the number completed with zeros when necessary. For instance, for build "42" the number will be "00042".
Deleted plan lingers even if never built.
Asked by Ken Wood:

We are on Bamboo 3.4.3

As a test, because I thought I saw some funny stuff last week in our development sandbox, I crreated a build plan by cloning a template plan (that is not enabled, never built)

Then I removed it. Never even enabled it, or built it.

After removal, it doesn't appear on the dashboard.

But, if I try to create a build plan by cloning again, and giving it the same name and key, Bamboo complains that the plan already exists.

It's as if the database still remembers the plan even tho Bamboo shows that I had removed it.

Is this a know bug? And if so, is there a workaround?

I tried searching on this, but sadly every time I search in 'Answers' I get a bazillion hits, too tediuous to sort thru them...


Answers:
author: Bob Swift (personal)
body: Its a known problem - [BAM-10174](https://jira.atlassian.com/browse/BAM-10174). It was designed for a delayed removal.

comments: author: Ken Wood
body: Thanks Daniel and Bob!


author: Daniel Wester
body: I've run across the same thing - what I noticed is that there is a scheduled service that ran after a while and actually deleted the plan from the database - my deleting it only marked it for deletion.. Have you tried to recreate the plan again?
How can I dynamically set a plan variable in a task in Bamboo?
Asked by Andre van der Schyff:

I need to set a variable in my Bamboo plan based on a field in my POM. This variable will then by used by the next task. How can I achieve this?

The full scenario is: I have a plan that branches my project for release. Currently I use two variables to hold the branch name and the next development version number, which is set manually using Run Customised. However if I can read the version number from the pom.xml file, these values can be calculated. So ideally I would like to use a script to:

1. read the pom.xml file
2. extract the current version number
3. manipulate it to determine the branch name and next version, and
4. populate two variables to be used by the branching task.

I have looked at the plugin exchange and all that seems promising for this is the Groovy plugin, but this does not seem to work on 4.0 and even then I don't know how to set a plan variable from the script. I'd prefer not to write a custom task for this unless there is really no other way.

Any help would be greatly appreciated


Answers:
author: James Dumay
body: EDIT: Take a look at the [Inject Bamboo variables from file Task](https://marketplace.atlassian.com/plugins/com.atlassian.bamboo.plugins.bamboo-variable-inject-plugin) in Atlassian Labs.

Hi Andre,

There is an [improvement request](https://jira.atlassian.com/browse/BAM-11559) open to implement a Task that can read keys and values from a properites file and turn them into Bamboo variables. Would this work? If so, please vote for it.

There isn't a good way of doing this short of writing your own Task for the moment.

Thanks

James