youngmon/atlassian-qna huggingface dataset:
I would like to see all recipient addresses on emails from Bamboo
Asked by Raye Raskin:

Currently each notified user only sees his own email address on build success or failure. This is unnecessarily paranoid.

Many times Recipient A might waste time notifiying a developer (Recipient B) who's already been notified by Bamboo -- but there's no way for Recipcient A to know that.

How can I configure Bamboo to only send a single email to all recipients instead of one email per recipient?


Answers:
author: Adam Myatt
body: Currently it doesn't allow this. I looked at the code for the recipients and transport and regardless of the type of recipient seems to send to each one individually. Your best bet is to create an email distribution list and have the build send to it.

comments: author: Raye Raskin
body: Bamboo/FishEye/Crucible are collaborative products. Atlassian is NOT helping with the collaboration part by keeping email recipients PRIVATE. I think Atlassian should revisit their policy on this rather than each customer create and maintain a bunch of email distribution lists (which at least in my company requires IT intervention.)


Tags: email
Showing latest Bamboo build status badge
Asked by Chris S.:

Is it possible to display a badge/image etc. for the latest build status of one of my Bamboo builds? As the project is open source, I want to put the current status on Bitbucket and Codeplex.


Answers:
author: Chad Hedstrom
body: Is this really still not possible in 2016? Even for the cloud version? There's a plugin, but it's only for self-hosted servers it looks like.


author: Raffi Enficiaud
body: +1


author: Shahriyar Imanov
body: +1


author: Shahriyar Imanov
body: interested here as well...


author: Marcin Wiatr
body: Same here - any updates on this?


author: under pants
body: Interested in this for my project too!


Tags: cloud
Bamboo plan build agent agent choice based on agent disk free
Asked by Ferenc Deak:

Hi,

I have a build farm here, where several hosts are configured to build the same plan (building it takes pretty long and there might be new commits while building, and from time to time we also start the builds manually, so it is good to have a host ready immediately ... we have long and complicated process, anyway, this is not important).

The problem is that not all the hosts are identical. A few of them have a smaller hard disk and they tend to fill up from time to time, to an extent when a full build willl not complete (the full build generates around 7GB (seven gigabytes) of data) and it would be great to tell bamboo to choose only an agent which has at least 7GB free space.

Is this possible?

Thanks, Ferenc


Answers:
author: Brent Villalobos
body: We run a daemon process on each agent that continuously checks the disk space (I think it runs "df" every minute). When the used disk space reaches a certain threshhold, it disables the agent, looks for older Bamboo workspaces (and specifically avoids the currently running build), deletes them, and then re-enables the agent. The disable/enable is so that the machine doesn't pick up any new jobs and potentially uses a workspace that was already marked for deletion.

We have not seen any failures due to full disks since we implemented this strategy.


author: Adam Myatt
body: There is no built-in functionality, nor existing plugins, for this at this time that I am aware of. I would suggest for each Job going to the Misc tab and selecting "Clean working directory after each build". THis can clean up disk space but add to build times that may already be too long.

comments: author: Adam Myatt
body: You may also consider using the Script task to run a shell script or bat file that identifies the free disk and possibly fails the build. This wouldn't help you select an agent, but could be step 1 in your build and it would fast-fail the build right away rather than possibly running for hours before failing due to out of disk issue anyway.


Tags: dependency

plan
Elastic Bamboo options for tagging ec2 instances
Asked by tml:

EC2 allows up to 10 custom "tags" (key/value pairs) to be associated to each instance; these tags can then be used with the custom billing options to allow you to more easily keep track of which project/team(s) a given EC2 instance should be billed to. Is there any way to tell Bamboo OnDemand which tags I'd like applied for Bamboo instances? Ideally, each plan could have its own settings that would get passed on to the Bamboo image.


Answers:
author: Przemek Bruski
body: You can tag your instance using instance setup script. If you want to have that per plan, you'd have to add a script task into your plans.

comments: author: Ian Su
body: Am I correct that this feature did not exist in Bamboo 3.4.3?


author: Przemek Bruski
body: Right, it does not exist there - you need to upgrade.


Tags: cloud
Is it possible to enable/disable agents according to a schedule?
Asked by Rob Lane:

We have two dedicated bits of kit for CI testing, but they cannot complete all our tests overnight. Is it possible to set up our developer machines as agents which would only be enabled overnight?

The hardware needed for the tests is very expensive so putting the otherwise unused dev machines to work overnight is an attractive prospect.

We need to maintain the capability to manually run tests during the day on the dedicated CI machines.


Answers:
author: Adam Myatt
body: Sure. If you have machines with Bamboo Remote Agents installed, simply use a crontab (on linux) or task scheduler (on windows) to start the agent SH or BAT files that load the agents. Schedule the agents to load 5 or 10 minutes before the build in Bamboo is scheduled to run. Then before Developer come in during the day use the crontab or task scheduler to turn off the Bamboo remote agents.


Tags: agent
What happens when bamboo stops a build?
Asked by Matthew Grasse:

On linux one step of my build runs a bash script which in turn spawns a number of other processes. When the build is stopped in bamboo, I see that some of the processes continue to run on the build agent.

I assume that I need to clean up my processes when the build is being stopped, but I don't know exactly what happens when the stop occurs. How does bamboo implement the task stopping? Does it send the child process a signal? If so, which signal is it?


Answers:
author: Brent Villalobos
body: I don't know the exact mechanisms Bamboo uses when you stop a build, but we had to workaround the orphan process problem by creating an "orphan killer" daemon on the machine that periodically looked for Bamboo-owned processes with a parent PID of 1.

There is a "[Hung Build Killer](https://marketplace.atlassian.com/plugins/com.atlassian.buildeng.hung-build-killer)" plugin for Bamboo. I've never used it, but you may be able to peak at the source to get an idea of how it handles the orphaned processes.

comments: author: Matthew Grasse
body: Thanks, Brent. This isn't quite what I'm looking for - I'd like to be able to handle the stopping case in my scripts, but this is the most helpful information I've found.


author: David Rothlisberger
body: Bamboo sends SIGTERM to the script.

Tested with Bamboo 6.4.1 on Linux, by creating the following script, running a build, then stopping it:

```
#!/bin/sh
trap 'echo sigterm handler > /tmp/bamboo.log' TERM
sleep 100 &
wait
```

Note that your SIGTERM handler will actually have to kill your own child processes, which isn't always trivial on Linux.


author: neostorm
body: After writing a script to trap the signal the following takes place when you stop the build in the middle of it running a script

"Broke n Pipe"   
$SIG{PIPE}
How to make 'standard' tasks not run on agents with special capabilities?
Asked by Rob Lane:

I have a bunch of agents set up for building and a test agent. The test agent has a Tesla card, and is the only agent tha can run tests.

Bamboo schedules build tasks to run on the test agent, which means it can't perform any tests until it has finished the build and I get a big test backlog. Is it possible to make Bamboo only schedule jobs with requirements that match the capabilities of the agent? Or will I have to add a "build-only" capability to all the build agents and add it as a requirement to all build jobs too.

Currents the build agents have no capabilities set and the build jobs have no requirements. The test jobs have a requirement that matches the test agent's capabilities.

I am moving from Jenkins to Bamboo and Jenkins had an option to "Leave this machine for tied jobs only". Is there an equivalent option in Bamboo?


Answers:
author: Adam Myatt
body: Rob - try this plugin. It should be able to help you. <https://marketplace.atlassian.com/plugins/com.edwardawebb.bamboo-group-agent>

comments: author: Rob Lane
body: That looks to be just what I need, thanks.


Tags: agent

capability

requirement
I need add user and group to one plan (bamboo)
Asked by Javier Pascual:

I need add user and group to one plan in bamboo, i need give them permissions too. the api is confused and i dont know the steps for continue.

I need do it with java code (api bamboo)

i need help, please, thank


Answers:
author: Sultan Maiyaki
body: Hi Javier,

There are two steps involved which is to [create the user in bamboo](https://confluence.atlassian.com/display/BAMBOO/Creating+a+user) and then got to the specific plan configuration page to add the users to the [needed permission](https://confluence.atlassian.com/display/BAMBOO/Configuring+a+plan%27s+permissions)

comments: author: Javier Pascual
body: I mean like I do with Java code with bamboo api. I already do with the interface.

Thanks


Tags: group

plan

user
Automatic build expiry configuration
Asked by Norbert:

Hi

I'm using the build expiry feature from Bamboo  
so far so good, but is there a better way to select which builds should be deleted?

I have some "release" builds triggered from Jira, but as far as I understand there is no way to automaticly label it, or except this builds from the cleanup builds task.

Is there some way to "protect" this build, except giving them a label add this label to the exception list.


Answers:
author: Adam Myatt
body: Labelling seems to be the only mechanism to prevent builds from getting removed by the Buold Expiry Mechanism. If the global expiry doesn't work for all your Plans you can certainly override it at a Plan level to tweak to be Plan-specific. There's a Bamboo Task plugin that allows you to automatically tag a Plan, but that probably doesn't help you as you want to auto tag builds if they are triggered from Jira.

Seems like this could be a feature request to Atlassian at [jira.atlassian.com](http://jira.atlassian.com) where you would want to suggest that Build Expiry can work with variables and/or labels. When a Bamboo plan is triggered by Jira the plan results have an Overwritten Variables section" that sets variables such as jira.projectKey, jira.baseUrl, etc. It would be cool to be able to say if these variables exist then do not expire.

OR a plugin to auto-tag a build result with a label that is set to not expire if those Jira variables are set.

comments: author: Norbert
body: Where can I find the automatic label task?


author: Adam Myatt
body: <https://marketplace.atlassian.com/search?q=bamboo+label>


author: Norbert
body: Thanks, already downloaded it

<br />

but why does the search don't work from my bamboo installation (via the find addons view)


author: Adam Myatt
body: probably a version mismatch. plugins are listed in the marketplace as only supporting a range of versions. your bamboo may be outside that range.


author: Norbert
body: I tried the automatic labeling task.  
Its quite useless for my problem because I only want to label if some requirements are meet not always!  
Probably I can write a batchscript that creates a Textfile for the autoamtic labeling task. But I think thats to much effort for the problem.

It should be added to the featurelist of the buildserver (automatic labeling, or a more intelligent filter for the clean build task)  


Tags: build

housekeeping
unable to employ variables created in batch script Bamboo task
Asked by Anthony Valencia:

```
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set thedate=%%c_%%a_%%b)echo %thedate%mkdir C:\Users\avalencia\test2\${system.thedate}_${bamboo.custom.svn.revision.number}xcopy.exe TechServiceTool\TechServiceTool\bin\Release C:\Users\avalencia\test2\${system.thedate}_${bamboo.custom.svn.revision.number}\ /e
```

per build log, date evaluates correctly in the first line (set thedate=%%c_%%a_%%b), but is not usable in the lines afterward. how can I use thedate batch variable after it is correctly set in the first line. the goal is to have the date in a specific format to use to create a directory in which to put the build. i'd rather not create an msbuild or ant file just for this.


Answers:
author: Gretchen
body: I never could get system variables to work either. I use the injection plugin as a work around. Clunky but it works. And specifically it was on the date. Seems like a useful idea for an enhancement. have today's date as a bamboo variable since so many of us use dates in folder names (to hold builds for deployment etc.)


author: Anthony Valencia
body: xcopy, as it turns out, creates all intermediary directories, making the mkdir statement unneccessary. the echo statement was there just as a test. only one statement uses the variable. so, i simply made that last statement my do body rendering the batch variable useless. until somebody can figure out how to set batch variables in a script batch task, the solution to this problem is.

```
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (xcopy.exe TechServiceTool\TechServiceTool\bin\Release C:\Users\avalencia\test2\%%c_%%a_%%b_${bamboo.custom.svn.revision.number}\ /e)
```


author: EddieW
body: Have you tried just %thedate% ? Bamboo system variables are only updated at task boundaries, and not within a task.

Do you need the value in future tasks\>?

comments: author: Anthony Valencia
body: yes i have tried %thedate%, and nothing gets substituted. essentially, it seems that the set command does not get executed. or, if it does, the variable is seemingly useless thereafter. i do not need the value in future tasks.


author: EddieW
body: if you pull this code into a .bat file and run manually does it give the result you expect (other then svn which will be missing).


author: Anthony Valencia
body: yes. i see where we're going with this. i believe the svn var evaluates w/in the task prior to functional parameterization. if not, then that will be the next barrier. i really didn't want to have to check any build-specific files into SVN which accomplish such trivial tasks. the script task, executable as a batch file should not be advertised as such if not the case.


Tags: bulk-edit

script

task

variable
Import Jenkins with on demand Bamboo?
Asked by Kathleen Jacobs:

Trying the free trial and and want to see if we can import our Jekin builds.

Not seeing the import section though. Can we do this with the ondemand version?


Answers:
author: Michael Knight
body: The version of Bamboo in Ondemand is currently 4.3, which does not contain the Jenkins importer (in 4.4).

Bamboo OnDemand will be updated to 4.4 in a number of weeks, after which you should be able to import your Jenkins data.

comments: author: Kathleen Jacobs
body: Any update this? Is 4.4 ondemand now?


author: Michael Knight
body: Not yet -- we're still on 4.3. Currently we are looking at late March for 4.4, but it's possible this could be pushed back.


author: Kathleen Jacobs
body: Was this pushed back? Is there somewhere I can go to check this?


author: Michael Knight
body: It went out on Monday, March 25. You can keep up to date on what's being pushed out to OnDemand from this page:

* <https://confluence.atlassian.com/display/AOD/What%27s+New>


Tags: cloud
Accessing Tomcat on local machine browser deployed on Elastic instace of Bamboo ( amazon Ec2)
Asked by Sandeep Dhamale:

I have following instance (elastic) setup for Bamboo.

[ec2-50-16-50-165.compute-1.amazonaws.com](http://ec2-50-16-50-165.compute-1.amazonaws.com)

For build and deployment I have put tomcat on it and running on Port 8080. My build is successful and deployment is also successful through Bamboo Tomcat task ( localhost:8080/tomcat-manger)

After application is deployed just to test from my PC I tried to access console from my local PC.

<http://ec2-50-16-50-165.compute-1.amazonaws.com:8080/>

The URL is not working. What is the public domain name for Amazon /Bamboo elastic instance, how should I refer it so I can access the tomcat application over internet at my local browser.

Appreciate your help.

Thanks again!


Answers:
author: LucasA
body: Hi,

AWS instances make use of a NAT infrastructure where the instances itself don't be assigned with a "real" IP address. To get this working, set your EC2 instance security to forward this port (on the administration console, not on the instance itself).

Maybe this document will help you: <http://docs.aws.amazon.com/gettingstarted/latest/awsgsg-intro/intro.html?r=8747>

Lucas Lima

comments: author: Sandeep Dhamale
body: THanks This makes sense, I will take a look at the document !


author: Murali S
body: Thanks much, Lucas Lima. Indeed it's very helpful to me.


Tags: amazon

elastic

tomcat
Rename build that runs for PR validation
Asked by Grant Russell:

Recently I integrated a PR build using the bitbucket-pipelines.yml to run some PR validation steps (run linting and tests). Every thing is working great, I'm just wondering if I can rename the build name that shows in the side panel of the PR - "Pipeline #485 for Pull Request ..."? I attached an image below to indicate what label I mean.   

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/173252i4328721DDF60FFCE/image-size/large?v=v2&px=999 "image.png")


Answers:
author: Caroline R
body: Hi, [@Grant Russell](/t5/user/viewprofilepage/user-id/4668412)! Welcome to the community!

I'm afraid that it is currently not possible to rename a build. In this case, I created a feature request to add this option:

* <https://jira.atlassian.com/browse/BCLOUD-21538>

I would suggest that you add your vote there (by selecting the **Vote for this issue** link) as the number of votes helps the development team and product managers better understand the demand for new features.

You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the **Start watching this issue** link) if you'd like to get notified via email on updates.

Implementation of new features is done as per our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) and any updates will be posted in the feature request.

Kind regards,  
Caroline

comments: author: Grant Russell
body: Good to know, thank you for the help Caroline! I'll make sure to vote on and watch the Jira ticket!


Tags: bitbucket-cloud

cloud

pull-request
Where to find bitbucket server instance URL
Asked by omkar joshi:

I have been trying to implement bitbucket server integration with jenkins, there is an option called "Instance url" and I don't know where to find it !!


Answers:
author: Dave Liao
body: [@omkar joshi](/t5/user/viewprofilepage/user-id/4668342) - hi Omkar!

Put your Bitbucket URL (example: <https://bitbucket.acme.co>) in the **Instance URL** field when prompted by Jenkins.

Can you access your Bitbucket installation in your browser? That URL is the value you would use.


Tags: bitbucket-server

server
Bitbucket Server and Database Restore
Asked by Khang Pham:

Hi,

I am trying to restore a existing Bitbucket server and database to a new Bitbucket and database server. Essentially, I would like to test some backups of our existing Bitbucket server.

I have currently loaded up a new Redhat VM to have the new Bitbucket and Postgres Database installed on it. I have got a backup copy of the Bitbucket Home Directory and our Postgres Database backup.

I am not sure what the next steps are in order to perform a new Server and Database restore. Is anyone able to provide any input or a step by step guide?

I have reviewed the following <https://confluence.atlassian.com/bitbucketserver/bitbucket-server-backup-client-776640064.html> however it does not seem to apply to my Scenario as I want to restore my current BB server and BB database to a whole new BB server and new BB database.


Answers:
author: Support Team _Clearvision_
body: Hi Khang,

As you are using the Home Directory archive and DB dump I would first install the same versions of Bitbucket and Postgres on your new VM.

Next overwrite the new Bitbucket Home Directory with your backup.

Create a new database in Postgres, you can find details on this here depending on your version: <https://confluence.atlassian.com/bitbucketserver/connect-bitbucket-to-postgresql-776640389.html>

Now Import the DB backup into the new database.

Update bitbucket.properties (\<Bitbucket home directory\>/shared) so it uses the new DB and url settings etc.

See Step 4: <https://confluence.atlassian.com/bitbucketserver/migrating-bitbucket-server-to-another-server-776640406.html>

Ensure permissions on the restored home directory are correct.

At this point Bitbucket should now start and have the data from the source Bitbucket.

There can be more to this such as any bespoke config in the previous install directory. The Proxy/SSL/Network setup.

Hopefully that helps

comments: author: Khang Pham
body: Hi,

Thanks for providing the guide. What i've done is clone our existing psotgres database server and loaded up a brand new Bitbucket server.

I installed the Bitbucket service and pointed the database location to go to our cloned database.

Copied all the bitbucket home directory over to the new bitbucket server and it looks like the restore process went well.

Thank you and all looks to be working now.


Tags: backup

bitbucket-server

restore

server