youngmon/atlassian-qna huggingface dataset:
Add Default Source Repositories
Asked by Satyanarayana T:

Hi Team,

Can't we use local code base here?

I dont want check out source code from remote repositories using version controls(like SVN,GIT...etc).Alredy i cloned and having code base in my local system.

Is it possible to use the existing code base?


Answers:
author: Jason Monsorno
body: Ofcourse, just remove the "Source Code Checkout" task if it was created and do what you want.

comments: author: Satyanarayana T
body: Thanks for the reply.

For example i have the code base in this location : c:\\test\\develop

How to point to this in the Bamboo server configuration.

I tried this like file://c:/test/develop.

But it is working .

Can you please give example for this how to do with local source code.
Instance from EC2 micro running, Elastic agent pending
Asked by Sushil Negi:

I created an ami image in ec2 and configured bamboo to use that for the starting the build machines. However that's not happening.On clicking start new elastic agent bamboo build machine instance gets created and gets to state running spawning the elastic agent. However the elastic agent stays in the pending state for about 44 mins and then the instance gets terminated.I need help to fix this problem.


Answers:
author: Fabian Knorr
body: Hi Sushil,

on the Elastic Instance, what is in your /home/bamboo/bamboo-elastic-agent.out file?

If this file is missing, your agent isn't starting at Systemboot. Then you need to add this statement /opt/bamboo-elastic-agent/etc/rc.local to your /etc/rc.local file, or provide it with your startscripts (e.g. upstart or /etc/init.d)

If your Elastic Agent still wont start, have a look at /home/bamboo/bamboo-elastic-agent.out what error-message you got


Tags: elastic-agent
Bamboo can't start Amazon Elastic Instance agent after being added to VPC
Asked by Ryan Vice:

After updating my Elastic Image configuration to be in my company's Amazon VPC, Bamboo is no longer able to start the Elastic Agent on my Elastic Intances. I'm able to RDP to the instance and I can verify that the VPC is working but for whatever reason Bamboo can't launch the Agent. I've updated the security as shown below which to me doesn't seem like it should impact Bamboo's ability to access it.

![](http://imageshack.com/a/img829/8666/xg1z.png)


Answers:
author: Przemek Bruski
body: Does your instance have EIP?

comments: author: Ryan Vice
body: Nope, that was the setting. For anyone else having this problem do the following:

1. Click the Gear and select Overview
2. Select Configuration in the Instances section
3. Select Edit
4. Check "Enable elastic IP management"


author: Lee Myring
body: Please take note of the way Bamboo deals with Elastic IPs. It will delete ALL Elastic IPs that are not associated unless you whitelist them. We have failover ENIs with EIPs attached but they are not associated, without whitelisting them they would be deleted...


author: mfobrien NA
body: This option does not seem to be available.Running inside the default 172.31 amazon public VPC does not need an EIP - just a public IP.The issue on the other post is also fixed - but does not fix the fact that bamboo cannot connect to the instance it created inside the private subnet of the VPC.<https://answers.atlassian.com/questions/231544/answers/11990736?flashId=1954419289>


Tags: cloud
Is it possible to prioritise queued jobs based on duration?
Asked by Stephen Kestle:

Is it possible to make jobs that take minutes to run (on average) get put before other jobs that take 10's of minutes -\> hours?

I've noticed that our bamboo server is queuing my 2 minute stage for an 10s of minutes while waiting for a large proportion of \>hour builds to complete.  

And then, my next stage gets queued all over again, waiting 10s of minutes, inflating a "single job" build time from 20 min to over an hour.


Answers:
author: Krystian Brazulewicz
body: ATM the only queue ordering strategy we've implemented is classic FIFO. When it comes to build ordering there's no golden bullet, the strategy you're describing can lead to delaying huge builds.

Upcoming Bamboo 5.6 will allow you dedicate an agent to specific plans. With this feature you'll be able to select an agent that will run only small jobs giving them a chance to complete quicker.


Tags: bamboo-administration
WINDOWS EC2 - Build Fails " /usr/bin/git version failed"
Asked by Jordan Stremming:

Anytime I attempt to build my project, it fails with this error: "java.lang.RuntimeException: com.atlassian.bamboo.plugins.git.GitCommandException: command /usr/bin/git version failed with code -1."

The job is defined as Source Code Checkout from BitBucket then build with Maven 3. This builds with Elastic Bamboo on an Amazon EC2 - Windows

Here is the log: REDBLOCKS-REDBLOCK-JOB1-9.lo

Any ideas?


Answers:
author: Przemek Bruski
body: Are you using the stock image? It looksl like the Git capability is misconfigured in your image configuration - make sure you set the correct path to Git.exe.


author: Timothy
body: Are you sure that you git is installed properly and that the user running the agent can access it?


Tags: aws

build

cloud

error

windows
How to associate an Amazon Security Group with a Bamboo Elastic Image when launching in a VPC
Asked by Ryan Vice:

I'm trying to allow my Bamboo Elastic Instance to have access to the other EC2 instances we use that are in an Amazon VPC for security reasons. I'm able to launch a Bamboo Elastic Instance in the VPC but I can't figure out how to associate a Security Group with my Elastic Intances which I need to do as the default security group only allows for RDP and I'm not able to access the other instances in our VPC.

Is there a way to do this with **OnDemand** Bamboo?


Answers:
author: Przemek Bruski
body: You can add rules to the security group. You can also use the ControlledByBamboo group.

comments: author: Ryan Vice
body: Can you please explain "add rules to the security group." I'm not seeing any security group options in Bamboo OnDemand.


author: Przemek Bruski
body: You configure it on your AWS account, not in Bamboo.


Tags: cloud
Trying to figure out optimal setup for Stash projects / repositories
Asked by Nils Brasz:

Hey all,

Not sure if this is the correct palce to ask, but I am relatively new to Stash/Git in general and was looking for some advice on how to setup a heirarchy of repositories in a project for development vs production environment.

I currently have a website that lives duplicated in two places, live and dev. and we make changes on dev, then migrate them to the live version after testing. Both environments are available to the web but the place the dev code lives triggers some flags in the code to keep it from being public.

What I have tried to do is setup a Project for the site, and there in have two repositories, live and dev. Me and other developers fork the dev repo and clone it to our local machines where we work on changes, commit them, and push them up to the fork. then we pull request them back in to the dev repository. After that we have Bamboo to basically do git pull on the dev repo, and our changes are now live in the dev environment.

My question is though, how can we migrate these two the live repo as i see no way to pull request across these two repositories (maybe i set them up wrong as they werent initially created as forks? iam not sure)

Can anyone provide insight as to how to set things up or where to look for some tutorials on how to manage/setup optimal environments that have two areas that code lives live and staged to the web.

Thanks a ton in advance for any tips!

Nils


Answers:
author: cofarrell
body: Hi Nils,

Stash only allows pull requests to be created within a single "hierarchy" of repositories - which means you need to fork. You should be able to fork off of the production repository and push your development branch if you need to.

Personally I wouldn't bother forking at all, and have all your branches live in a single repository. Is there any need for the branches to be split up like that? You can certainly keep buliding and deploying them in the same way, but it's usually more convenient to have one repository.

Cheers,

Charles

comments: author: Nils Brasz
body: Thanks Charles,

Your insight has provided me wit ha solution! I look forward to getting more accustomed to Git, and thanks to you I now have a first step towards that. :)


Tags: bitbucket-server

git
Create/Clone Plan for users issue
Asked by John Bowker:

We've recently upgraded to Bamboo 5.3 and have an issue where some users that had Global Permissions to Create or Clone Plans do not have that access anymore.

Is there anything else besides Globabl Permissions that need to be configured?

Is this is a bug in Bamboo?


Answers:
author: ssetayeshfar
body: Hello John,

Can you please open a support ticket at [](https://support.atlassian.com)<https://support.atlassian.com>so we can look at more details?

Thanks!

Best,

Sepideh

comments: author: John Bowker
body: Thanks Sepideh. I've created issue [BSP-13025](https://support.atlassian.com/browse/BSP-13025).


author: ssetayeshfar
body: Hello John,

Can you please open a support ticket at [](https://support.atlassian.com)<https://support.atlassian.com>so we can look at more details?

Thanks!

Best,

Sepideh


author: ssetayeshfar
body: Hi John,

Since this was working correctly for you before the upgrade, may I ask if you re-enabled your Crowd/JIRA integration after the upgrade?

[](https://confluence.atlassian.com/display/BAMBOO/Bamboo+generic+upgrade+guide#Bamboogenericupgradeguide-Step3Step3.ConfigurethenewBambooinstance)<https://confluence.atlassian.com/display/BAMBOO/Bamboo+generic+upgrade+guide#Bamboogenericupgradeguide-Step3Step3.ConfigurethenewBambooinstance>

comments: author: John Bowker
body: Yes the Jira integration is working as I can see other Jira objects for plans in Bamboo.

On the same topic; I've been trying to get the "clone" REST call to work but I keep getting a 405 error. I've tried looking for a code sample or example for this but I've come up short.

How are you meant to use this REST call?


author: ssetayeshfar
body: Hello John,

Are you using an external user repository?

By having Global Permissions, does it mean they are part of the bamboo-admin group?

Thank you.

Best,

Sepideh

comments: author: John Bowker
body: Hi Sepideh

We use Jira as the user repo. No these users are not part of the bamboo-admin group.

I want to give some people in teams to ability to Create or Clone a plan. I have added them as single users though. Should users be added to a group for this?


Tags: bamboo-administration
How to use Bamboo to for on demand (manual) operations?
Asked by Sorin Sbarnea (Citrix):

We are currently using Jenkins for lots of jobs that need to be centralized, more like a Self-Service portal. People can run jobs like: create branch, delete branch, deploy a ssl certificate, publish somethign to the web, migrate from staging to production, stuff like these.

Is is possible to do this with Bamboo?

Here are few requirements:

* be able to limit the group that is allowed to execute the job
* have parameters / forms to complete, for example we may need to upload the certificate to be deployed, or to pick the server name,...

What is possible and how? .. and what is not possible.


Answers:
author: Sorin Sbarnea (Citrix)
body: I observed a hidden option that was allowing me to run a task with a custom parameter, a single one, I wonder if this canse be customized. Anyway, in this area Jenkins is years ahead, allowing you to create complex forms, even populating the options from outside data.

I imagine that in order to implement something like this in Bamboo, we will have to host the forms on our own server (or to write a plugin, which we already have for free in jenkins), means we'll stick with jenkins.


author: Jason Monsorno
body: You can use group and/or individual permission to set view and/or run on each plan so that part is covered.

I know manual stages allow you to override/set input values but as far as I know it is a textbox field only with no pre-run validation available.
Bitbucket Hooks vs Links for Bamboo
Asked by Ben:

I have configured Bitbucket "Hooks" for Bamboo OnDemand, and I believe I am now triggering builds correctly.

My questions is what the "Links" do, as opposed to the "Hooks". It seems that the "Hook" is tied to a specific plan, but the "Link" asks for a "Build Key", which I am not sure if that is the Project key or the full Plan Key, or if it should have a wildcard or something.

Note that googling around for bitbucket "links" always brings me back to "hooks" information, hence why I have ended up here.

My hope is that with the "Links" set up correctly, that Bitbucket Pull Requests page will show (at least) a link to the Bamboo build for the branch under review, and hopefully even the status of that build. Does that happen? If not, what _does_ the "Links" do for us?


Answers:
author: Ben
body: Bamboo integration into bitbucket does not exist yet:

<https://bitbucket.org/site/master/issue/8548/better-ci-integration-add-a-build-status>


Tags: bitbucket-cloud

cloud
How to render Thucydides and Jbehave reports in bamboo dashboard
Asked by vijetaa:

For automated UI testing wanted to show thucydides reports in bamboo


Answers:
author: VikasB
body: You can create Bamboo plan with following tasks

Source Checkout Task: To checkout source code

Maven Task: To build project and run JBehave scenarios

JBehave for Bamboo task: To parse JBehave scenarios as test in Bamboo, to control build status and integrate results with JIRA

You can add artifact defination as \*\*/\*.html to collect thucydides reports in artifacts tab.

<https://sites.google.com/site/autotestingtools/jbehave-task-for-bamboo>
Load Bamboo variables to a property file
Asked by Ashwanth Gunasekaran:

I need to get the Bamboo variables and load it in to a property file located in the project (which I will source code checkout during the build process).

Is there any Bamboo tasks or any other way to load the bamboo variables to a property file?

I have tried [properties-maven-plugin](http://mojo.codehaus.org/properties-maven-plugin/index.html) to load the Bamboo variables. But it did not load the properties file.


Answers:
author: Sebastien Delcoigne
body: This sounds like you need to write a custom plugin that would add a Task for this (as described in this [tutorial](https://developer.atlassian.com/display/BAMBOODEV/Writing+a+Task+with+a+User+Interface))


author: Ashwanth Gunasekaran
body: Thanks Jason. But I need to do it automatically through code. I have to create a test script (which I would execute during the build process) and load the bamboo variables to property file through the test script.

comments: author: John Bowker
body: Are these Global plan variables? If so they are loaded as Environment variables when running a Task and prefixed with "bamboo_".


author: Jason Monsorno
body: You can do it manually in a script
> echo var1=${bamboo.var1} \> teams.properties
>
> echo var2=${bamboo.var2} \>\> teams.properties
>
> echo varABC=${bamboo.varABC} \>\> teams.properties

comments: author: henk piet
body: This will show the variables in plain text in the jar...
Can Bamboo give a free port number to use in a build variable?
Asked by Samuel Le Berrigaud:

I just want to ask Bamboo for a port number that is free of use (on the box the agent is running) that I can pass to my build. It seems that having that port available in a [variable](https://confluence.atlassian.com/display/AOD/Bamboo+variables) would be useful.


Answers:
author: John Bowker
body: If you use a scripting language like Python for building you get bind on port 0 on the remote agent. Binding on that port allows the os to tell which port is available for use.

```
def GetFreePort():	"""Returns an available port"""	sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)	sock.bind((socket.gethostbyname(socket.gethostname()), 0))	return sock.getsockname()[1]
```

comments: author: Samuel Le Berrigaud
body: Yep I've done similar things in Java in the past as well. What I'm looking for though is a way for Bamboo to do that and make that available to my build in a variable. This way I can integrate various tools in my build easily.


author: Jason Monsorno
body: You could use netstat to show you what is in use. The port range you want to utilize is upto to you and there are some standards depending on what you're trying to use it for.
Passing Bamboo variables to Java code
Asked by Ashwanth Gunasekaran:

I need to pass the bamboo variables from the plan to my Java code which I need to execute through Bamboo. Can anyone please help me how to do that?

I have imported com.atlassian.bamboo. How to read the bamboo variables in java code when the code is executed in CI server?


Answers:
author: Ashwanth Gunasekaran
body: I am developing a plugin.


author: Jason Monsorno
body: Are you developing a plugin or trying to make CI build?
Merge way to ?no-ff in gatekeeper
Asked by Roman Egorov:

Hi guys!  
We need to automate our releasing process with Bamboo and Jira.  
In Jira we have issues with names like PREFIX-\<number\>. GIT branches with the same name for each issue.  
Our git flow: stable master branch and feature branches starting from last stable master tag (last release). For new release "release branch" is created from master and feature branches merges with ---no-ft into it. Bamboo builds all branches on every push. When release branch build is ok branch is manually merging to master and deploying to production.  
![](http://oi57.tinypic.com/29cv1iv.jpg)  
What we need:  
When developer changes issue status to Ready To Release in Jira feature-branch merges to release-branch with ---no-ft and pushes to repository.  
Bamboo builds release-branch and if it's OK release manager can merge release-branch to master and deploy code manually.  
If it's not OK merge aborts and issue status changes to Not Ready To Release.  
Atlassian tools described in documentation are not enough for us.  
Jira Versions doesn't trigger merge and push of multiple branches into release-branch.  
Bamboo Automatic Branch Merging Gatekeeper merges branch with fast forward, but it neccesary to keep merge commits (---no-ff option is important). And it's necessary to change Jira issue status if merge fail in Bamboo.  
Does any atlassian tool can do it?  
Is it possible to change merge way to ---no-ff in gatekeeper?  
May be there is another solution for our needs?  
Thanks.


Answers:
author: Przemek Bruski
body: The only way to get no-ff is to modify the plugin: <https://bitbucket.org/atlassian/bamboo-git-plugin>

and install it into Bamboo. It's really easy.


Tags: bamboo-administration
How to install cobertura plugin for bamboo 5.2
Asked by carolyn cheng:

I need to use cobertura plugin for bamboo. I followed the instruction here, <https://bitbucket.org/i386/bamboo-cobertura-plugin>. After the installation, I got this error, "This add-on could not be loaded. It has one or more errors which prevent it from being enabled."


Answers:
author: Bill Wang
body: bitbucket link is dead.


Tags: bamboo-administration
Build Times for Bamboo 5
Asked by Rune_Engseth:

Hi

I'm interested in news regarding the Build Times plugin for Bamboo

Released version is only for Bamboo 4.x, but this plugin would be very usefull for Bamboo 5 as well!

Latest version was released a year ago, and hasn't been updated since.

Perhaps someone from the Bamboo team can answer this?

[https://marketplace.atlassian.com/plugins/com.atlassian.bamboo.plugin%3Abamboo-build-times-plugin](https://marketplace.atlassian.com/plugins/com.atlassian.bamboo.plugin%253Abamboo-build-times-plugin)

Background

I found this article interesting and wanted to try the plugin

[](http://blogs.atlassian.com/2012/07/how-many-bamboo-build-agents/)<http://blogs.atlassian.com/2012/07/how-many-bamboo-build-agents/>

quote:

*Build Times was built by Atlassian Labs and we use it on our internal Bamboo servers, so you can rest assured that it will be well-maintained.*

end quote:


Answers:
author: Rune_Engseth
body: atlas-package is apparently the magic trick!

Managed to package and install plugin now.

thanks for SDK tip!

comments: author: John Bowker
body: No worries.

Whenever I encounter a compile issue with an Atlassian plugin its normally an out of date SDK or the SDK is in need of re-install.


author: John Bowker
body: Do you have the latest Atlassian SDK installed?

I built the plugin some time ago for Bamboo 4.5 and have since upgraded to 5.3 and it still works.

comments: author: Rune_Engseth
body: I have installed the latest Atlassian SDK through Homebrew (osx).

Simply running mvn clean install gives me the same error.

So how do you build this? And how is the SDK going to help me?

There is no relevant information on bitbucket/checked out code on how to actually do this.

(other than running mvn clean install, as I normally would assume is the correct way)


author: Timothy
body: If you have Mercurial, you should clone the code and compile it yourself against a higher version of Bamboo and test it.

comments: author: Rune_Engseth
body: Nice tip, and I downloaded mercurial and tried it.

However, it fails with the following error:

\[ERROR\] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.0-alpha-4:enforce (enforce-build-environment) on project bamboo-build-times-plugin: Execution enforce-build-environment of goal org.apache.maven.plugins:maven-enforcer-plugin:1.0-alpha-4:enforce failed. NullPointerException -\> \[Help 1\]

Tried to build both the latest tag and the default branch

It this actually works on Bamboo, it would be easier if Atalassian could just release it.


author: Maciej Kwidzi?ski
body: Try Maven 2 instead of 3.

Atlassian SDK 5 dropped Maven 2, but you can still get the older version:

```
brew install atlassian-plugin-sdk4
```
Error Analysis
Asked by Kyle Varga:

Has anyone ever done any error analysis on common causes? I see the 'error pages', but what I would really like to do is take something that is on the 'Error Summary' on the 'Job Summary' page and see how often it occured.

I am connecting to the database directly, but can't find where/if this is stored in the database at all. Anyone ever do something like this?


Answers:
author: Jason Monsorno
body: I believe the logs are not stored in the database, you can use the api or access the files directly.
> /rest/api/latest/result/PLAN-KEY-JOBKEY/1?expand=logEntries

> \\bamboo-home\\xml-data\\builds\\PLAN-KEY-JOBKEY\\download-data\\build_logs

Changes to the log file shows up in the web view and the API upon refresh so I don't think they're cached either. I ran a search for some of the log entries in the entire database (except xml objects) so that's why I don't they're stored there anywhere.
Pipeline: variable value based on the branch
Asked by Admin Admin:

Hello,

id like to set the (docker) tag value based on the branch ( or rather PR ).

Something like :

set TAG = "latest" when PR on master branch

else

set TAG ="$BITBUCKET_BUILD"

Thank you


Answers:
author: Norbert C
body: Hi [@Admin Admin](/t5/user/viewprofilepage/user-id/4720087)

Thank you for contacting Atlassian Community, my name is Norbert and I'm a Bitbucket Cloud Support, it's nice to talk with you!

I would like to inform you that we had a feature request for this, but our developer team closed it as a "Won't Fix"  
\* [BCLOUD-12923 - Branch-Specific Environment Variables](https://jira.atlassian.com/browse/BCLOUD-12923)

As a workaround what I would like to suggest you is to set environmental variable at the beginning of the script:

```
script:  - export TAG="$SECRET_PROD"
```

Please let us know if this solutions helps.

Best Regards,  
Norbert  
Atlassian Bitbucket Cloud Support


Tags: bitbucket-cloud

cloud