youngmon/atlassian-qna huggingface dataset:
Build queued for very long while no other builds are running
Asked by degoo-admin:

We have started getting problems with builds being queued for quite some time (often \>10min) even if there are no other builds running. After some debugging I found that it is the following hg command that Bamboo is waiting for to finish:

"C:\\Program Files\\TortoiseHg\\hg.exe" update --clean --rev 1dddd1e554321eddae471623062d4824a0744dbf

This command is running in: C:\\Users\\Administrator\\bamboo-home\\xml-data\\build-dir\\serverSide\\DEG-API1-559\\mergeWorkspace\\

Before this command ran this hg-repo was cloned from the repo-cache. In other words, it looks like it is creating a new clone every time a build is being executed. The hg-repo is about 1 GB in size so I understand why updating to the newest revision in a newly cloned repo takes some time.

However, I don't understand why it has to clone the repo from scratch everytime. Is there any setting that would make Bamboo avoid this? It feels like it would be a lot faster if it could reuse one hg-repo for the plan and then just update it with the latest changes. Why is a new hg-repo needed for every build?

The command above was generated when a I ran a branch of the plan. Don't know if that matters. We are running Bamboo 5.0.


Answers:
author: PiotrA
body: Hi Carl,

I believe you're using Bamboo built-in branch merging strategy (called in Bamboo as "Gatekeeper" or "Branch updater"). Because of that every build that is being executed must be first 'validated' whether it can merge cleanly with the _default_ branch. This is done on the Bamboo server and the process you see in the DEG-API1-559\\mergeWorkspace directory, the "(...)hg.exe update --clean --rev \<hash\>" one, is the manifestation of that pre-build procedure.

I believe that for avoiding concurrency issues the above merge is executed in separate directory (separate for each build that is being run). When the merge finishes successfully (or fails), that separate directory is trashed to reclaim disk space on the Bamboo server.

I don't think there is some configuration available in the Bamboo that would allow you to re-use Hg repository for the pre build merge process. Of course you could turn off the "Gatekeeper/B-updater" completely and avoid the problem, but I understand that this isn't the cure.

Maybe you should raise a feature/improvement request on the [](https://jira.atlassian.com/browse/BAM%20)<https://jira.atlassian.com/browse/BAM>tracker? That way your particular case would be more visible to the Bamboo project team and to the customers (who might put their votes on your issue and lobby for it too)?

Am I helpful?

regards,

comments: author: degoo-admin
body: Thanks for you response! You are correct. We are using the Gatekeeper feature. Sure, I can post a feature request. In addition to slowing down our builds the space reclaim process seems a bit buggy. I found lots of old directories that hadn't been reclaimed. I removed them manually but I wish I wouldn't have to do that.


Tags: mercurial

performance
Where can I get more information on running tests in parallel in .Net
Asked by RyanVice:

I saw in the documentation that it was possible to run automated tests in parallel with Bamboo but I didn't see any information about how to set this up for .Net. For example, I don't understand how you would organize the tests into batches. I saw that in Java this is dependent on a 3rd party testing tool. I was wondering how this works in .Net.

Thanks


Answers:
author: Jason Monsorno
body: Stages run sequentially, jobs inside of stage can run in parrallel in the resources (local agents) are available, tasks in side of jobs run sequentially.

Here is an example layout

Stage 1 - Build - Has one job - job can have multiple tasks

Stage 2 - Test - Has x jobs each run a unique set of tests

Depending on how you implement the test batches you make want a third stage to display the tests. If you simply have different jobs for a list of tests or different categories then you could run the test task; if you used something like powershell to evenly divided your tests to your x # of jobs then you will write to a .trx or likewise file and will probably want to third stage to display the test results.

Stage 3 - Display Tests - Has one job - Optional task to combine results then one task to display or x task to display x # of results.

Stage 4, etc. Deploy, Archive, etc. whatever you want to follow tests. Optional of course.


Tags: cloud
Bamboo link to Stash Error
Asked by Orn Kristjansson:

When I try to add application link to Stash from Bamboo I get the follwing error in red.

\>\> Can't create a link to this application, because the application type 'stash' is not locally installed.

Both are running on the same machine.

I have the following Bamboo version

Atlassian Bamboo version 4.2.1 build 3213 - 28 Aug 12

<br />


Answers:
author: cofarrell
body: Hi Orn,

According to our official documentation to get the full experience with Stash and Bamboo you should be running a minimum of Bamboo 4.4.

[](https://confluence.atlassian.com/display/STASH/Integrating+Stash+with+Atlassian+applications)<https://confluence.atlassian.com/display/STASH/Integrating+Stash+with+Atlassian+applications>

Delving into the history of the code Bamboo 4.3 *may* work, but if you're going to upgrade I would recommend upgrading to something more recent.

Cheers,

Charles

comments: author: Orn Kristjansson
body: Yea, I saw the checkin on

29/07/2013

[](https://jira.atlassian.com/browse/BAM-11460)<https://jira.atlassian.com/browse/BAM-11460>

But it's hard to tell when it made it into a build. I guess I will just go witht the latest version.

Thanks,

Orn


Tags: bitbucket-server

link
Will pay for help configuring EC2 and Automated testing
Asked by jimdesign78:

Hello,

I am new to the world of Bamboo and will pay someone $100 for 2 hours to help me configure it to be secure with EC2 as well as configuring Automated UI Testing for our product.

Please send me a skype address and we can set something up.


Answers:
author: Paul Greig
body: Hi Jim,

You may also want to reach out to our Atlassian Experts, they are available around the world and specialise in the Atlassian suite: [](https://www.atlassian.com/resources/experts)<https://www.atlassian.com/resources/experts>

Cheers,

Paul


Tags: cloud
Connect Bamboo Ondemand to Bitbucket via deployment key
Asked by Karel Bemelmans:

Why is it not possible to just connect to a Bitbucket repository using the deployment keys I have defined for a project on Bitbucket?

When I choose Git as the way to connect to my repo and the option to use a private key, I get the error that Bamboo Ondemand does not work with ssh acccess to bitbucket. When I chose the https://location of the Bitbucket repository, I get the error that I cannot use ssh access with https. So that won't work.

When I choose Bitbucket as way to connect to my repo, I have to enter my username/password to load the repositories, which is also not what I want: I just want Bamboo to use the deployment (read-only) key and not my own login.

Any feedback on this?


Answers:
author: Nick Muldoon
body: Hi Karel,

I stumbled across this as we've got a similar challenge. More discussion on <https://jira.atlassian.com/browse/BAM-12228> (in case you haven't seen that already).

Cheers,  
Nick Muldoon  
[Arijea](http://arijea.com/)


Tags: bitbucket-cloud

cloud

git

ssh
Firing a perl script to remote agent Linux
Asked by Mark Wolff:

Bamboo 4.3.2: I wrote a perl script for my builds. I use the "Script" task and execute the file to a Windows remote agent and it says "running command line: \\nbuild_tools\\process_requests.pl" and off it goes! VICTORY! I point the same plan to a Linux server and it says: "running command line:

/bin/sh  
build_tools/process_requests.pl" and it runs my perl as a shell and crashes on a syntax error. I have the shebang (#!/usr/bin/perl) at the top of the perl script. I've tried to change my command to /usr/bin/perl build_tools/process_requests.pl, etc. Any hints?


Answers:
author: Mark Wolff
body: I switched from a "file" to "inline" script and simply ran /usr/bin/perl build_tools/process_requests.pl

It isn't perfect, but it is functional.


author: Gretchen
body: You might try using the "command" task. Define a capability (executable) for the linux box of "linux perl" configuring the location of the perl exe in the capability. Then pass the script path and name as an argument to the command. I've run other linux commands this way and gotten good results.


author: Gretchen
body: Otherwise you'd have to put the script on the linux box and execute it over there.
ssh login to AWS instance created by Bamboo Ondemand
Asked by Karel Bemelmans:

I've been trying to configure Bamboo Ondemand to use AWS instances, but so far it's been quite a pain. First I had to set the region to US East, because for the EUR region I would not see any instance images available.

Now I've managed to launch a instance (type ami-a30b44ca) but I am not able to ssh into it. This line is giving me login refushed error every time, even when I try usernames like ubuntu, bamboo or root (I've obfusciated the hostname):

ssh -i [/data/jirastudio/bamboo/home/xml-data/configuration/elasticbamboo.pk](https://nascom.atlassian.net/builds/admin/elastic/getPkFile.action) [ec2-user@ec2-xx-xx-xx-xx.compute-1.amazonaws.com](mailto:ec2-user@ec2-xx-xx-xx-xx.compute-1.amazonaws.com)

Any ideas why this is happening and how I can fix it? Because right now the build server works, but I cannot connect to it to see what's actually going on with the files.


Answers:
author: Karel Bemelmans
body: I found the problem with the Ubuntu image not starting the Bamboo agent: there was a problem in /etc/rc.local that broke the script:

cp -a /home/ubuntu/.ssh /home/ec2-user/.ssh

should be

cp -a /home/ubuntu/.ssh/\* /home/ec2-user/.ssh

That fixed it for me atleast.


author: Karel Bemelmans
body: I ofcourse did that. What turned out to be was that not all of the images listed by Bamboo had a login that worked, but after trying a few I managed to login.

On a sidenode, when I tried the Ubuntu image I could login (with root@) but no Bamboo java install was done on the server. So it was up and running, but not usable for Bamboo.


author: Przemek Bruski
body: You need to download [](https://nascom.atlassian.net/builds/admin/elastic/getPkFile.action)<https://nascom.atlassian.net/builds/admin/elastic/getPkFile.action>to your local drive and use it in the ssh command instead of -i /data/etc .


Tags: aws

login

ssh
using Amazons Elastic Block storage and EC2 to generate a build
Asked by Ben Bailey:

Hello,

I am trying to create a daily build for our Anroid app. I want bamboo builder to do this:

1. Start an Amazon elastic machine up (a Microsoft windows machine)
2. Load Elastic block storage that I define onto that machine
3. run the standard build process (sync files from source control, ANT build, etc)

I understand how to do step 1 \& 3... but I dont know how to:

* Create a block storage drive and put specific files that I want in that storage
* Load that drive up in step 2 above

Does anyone know how to do this?


Answers:
author: Ben Bailey
body: I found out the problem. The EBS was being loaded... but it wasnt being activated.

If you read the second half of these instructions, you will see you need to bring your new disk "online"

[](http://theburningmonk.com/2010/12/creating-and-mounting-an-ebs-volume-to-a-windows-amazon-ec2-instance/)<http://theburningmonk.com/2010/12/creating-and-mounting-an-ebs-volume-to-a-windows-amazon-ec2-instance/>


Tags: amazon

aws

beanstalk

cloud
Export failed - Bamboo 4.4.4
Asked by Michel Rock:

Hello all,

I'm having a hard time trying to export (Results, Artifacts and Builds Log) on my Bamboo server. Everytime i try to export it fail and i get this error message:

Export has failed. Errors encountered while exporting: Timeout exceeded waiting for service - com.atlassian.activeobjects.spi.Backup.

I tried to google the error some answer talk about the version of tomcat being wrong but (my other problem) is that i can't find the version of Tomcat on my server....

When i do: `java -cp lib/catalina.jar org.apache.catalina.util.ServerInfo`

The server answer this: Error: Could not find or load main class org.apache.catalina.util.ServerInfo

Is there a way to do the export (complete) in the command line? (will it work?)

Regards,

Mike


Answers:
author: Przemek Bruski
body: I'd suggest upgrading Bamboo to a version compatible with Tomcat 7.

If you can't do it, you can add the export to file `setenv.sh available in Tomcat installation directoyr.`  

comments: author: Michel Rock
body: Thank you Przemek,

now the sad part is that i'm not the one who install that server and i can't find that file yet....

I'll be back if i can get it !


author: Michel Rock
body: I'll take anyone's help,

Nothing fixed the issue yet...


author: Michel Rock
body: Me again,

I can't downgrade to 6 so, I've found this:

### Resolution {#toc-hId-1482242826}

Run your Tomcat with  

```
export JAVA_OPTS='-Datlassian.org.osgi.framework.bootdelegation=javax.servlet,javax.servlet.*,sun.*,com.sun.*,org.w3c.dom.*'

Can someone tell me how can i apply this sesolution?  Which and where is the file i need to modify?

Regards,

Mike
```


author: Michel Rock
body: Adding new info:

Even if i do Export and i uncheck Results it crashes.


Tags: bamboo-administration
Need info on Bamboo
Asked by Subramanian Olagappan:

Hi, I am new to bamboo !

Does Bamboo has plugins/support creating new instance from Elastic box templates. If so, what configuration changes we can do in the template settings from bamboo.

Thanks !


Answers:
author: Peter Van de Voorde
body: Hi,

You can find more information about Bamboo and Elastic here :

<https://confluence.atlassian.com/display/BAMBOO/About+Elastic+Bamboo>

<https://confluence.atlassian.com/display/BAMBOO/Working+with+Elastic+Bamboo>

<https://confluence.atlassian.com/display/BAMBOO/Configuring+Elastic+Bamboo>

<https://confluence.atlassian.com/display/BAMBOO/Getting+started+with+Elastic+Bamboo>

Best regards,

Peter
How to get the users with individual access to the project or repositories?
Asked by Rishabh Sahani:

I have too many projects under bitbucket, I need to get to know the users that have individual access to the project or the repositories.


Answers:
author: Mark C
body: Hi [@Rishabh Sahani](/t5/user/viewprofilepage/user-id/4751741)

Welcome to the community.

I'm afraid there's no option to view this on Bitbucket Cloud UI at the moment.  
You can, however, leverage our API 2.0 endpoints in order to get your required data points.

**To view all repository permissions for a workspace**:

```
GET /2.0/workspaces/{workspace}/permissions/repositories
```

**Reference:** <https://developer.atlassian.com/cloud/bitbucket/rest/api-group-workspaces/#api-workspaces-workspace-permissions-repositories-get>

**To view a repository permissions for a workspace**

```
GET /2.0/workspaces/{workspace}/permissions/repositories/{repo_slug}
```

**Reference:** <https://developer.atlassian.com/cloud/bitbucket/rest/api-group-workspaces/#api-workspaces-workspace-permissions-repositories-get>

Hope it helps and let me know if you have further questions.

Regards,  
Mark C


Tags: bitbucket-cloud

cloud
S3/Digital Ocean Upload Using S3 Pipe (aws-s3-deploy)
Asked by Nick Vincent-Maloney:

I'm trying to use the aws-s3-deploy pipe to deploy to Digital Ocean Spaces. I think this would work except that I can't specify the endpoint_url so it always appends "amazonaws.com".

Does anyone know of a pipe that is specific to DO Spaces? I was hoping to find something before writing my own.


Answers:
author: Igor Stoyanov
body: [@Nick Vincent-Maloney](/t5/user/viewprofilepage/user-id/2924787) hi. Thanks for your question.  
Unfortunately we have no pipes specific DO Spaces.  
But you can fork the [aws-s3-deploy pipe](https://bitbucket.org/atlassian/aws-s3-deploy) and create your custom pipe based on this pipe:  
[How to create custom pipe guide](https://bitbucket.org/blog/build-flexible-ci-cd-pipelines-with-custom-pipes)   

Regards, Igor

comments: author: Nick Vincent-Maloney
body: Thanks for the reply. I think I found the issue with this whole thing. The aws-s3-deploy pipe uses the aws-cloudformation-deploy pipe, which specifies AWS_BASE_DOMAIN_NAME = 'amazonaws.com'. I've cloned both and am attempting to write my own pipe. I'm a little surprised no one else has posted about this on the web. I suppose not many users are uploading to DO Spaces using BB Pipelines.


author: Jo?o Moreira
body: Hi Nick!

I'm interested in having a specific pipe for DO Spaces!

Have you been able to made one?

Best regards!

JM


Tags: aws

bitbucket-cloud

cloud
API Error When Creating Pipeline Schedule
Asked by Andrew Lehman:

Hello everyone,

I'm attempting to create a schedule for one of my repositories pipelines using this request:  

```
curl -X POST -u '$USER:$PASSWORD' \
  https://api.bitbucket.org/2.0/repositories/$WORKSPACE/$REPO/pipelines_config/schedules/ \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{
        "type": "pipeline_schedule",
        "enabled": true,
          "target": {
            "ref_type": "branch",
            "type": "pipeline_ref_target",
            "ref_name": "master",
            "selector": {
              "type": "custom",
              "pattern": "stage"
            }
         },
         "cron_pattern": "45 23 28 * *"
       }'
```

However I keep getting this response:

```
{"error": {"message": "Request entity cannot be processed", "detail": "Unexpected response body", "data": {"key": "unexpected.response.body", "arguments": {}}}}
```

Does anyone have an idea of what I'm doing wrong?

Thank you


Answers:
author: Andrew Lehman
body: Okay was talking to Bitbucket support in a ticket I submitted and with their guidance I was able to get this to work:

1. The Pipeline Schedules use an extended cron format (this is **not documented** in the API reference):

**sec min hour day-of-month month day-of-week year**

2. You need to use the ["?" symbol](https://en.wikipedia.org/wiki/Cron#Non-standard_characters) instead of the "\*" when leaving day-of-month or day-of-week blank

Armed with that knowledge the following request actually works and creates a pipeline schedule that runs at 4:45 UTC on the 28th day of every month  

```
curl -X POST -u '$USER:$PASSWORD' \
  https://api.bitbucket.org/2.0/repositories/$WORKSPACE/$REPO/pipelines_config/schedules/ \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{
        "type": "pipeline_schedule",
        "enabled": true,
          "target": {
            "ref_type": "branch",
            "type": "pipeline_ref_target",
            "ref_name": "master",
            "selector": {
              "type": "custom",
              "pattern": "stage"
            }
         },
         "cron_pattern": "0 45 4 28 * ? *"
       }'
```

comments: author: Sean Dean
body: This just saved my bacon. Thank you!


Tags: api

bitbucket-cloud

bitbucket-pipelines

cloud

schedule
running container inside another docker container issue
Asked by Srini Yallala:

Objective is to connect to NFS Server volume from the docker container getting created from bit bucket pipelines

simplified queries

1. Can we run docker container in another docker container?

If so, what are the steps?

2. Any previliged permissions required to install docker in side a docker container?

3. Tried installing docker inside a container, but not successful.. getting the daemon connectivity issue

4. how to elevate the container previleges using dockerfile?


Answers:
author: Norbert C
body: Hi [@Srini Yallala](/t5/user/viewprofilepage/user-id/4668833)

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

1. Can we run docker container in another docker container?

* By this do you mean, that you're running a docker container in Bitbucket Pipelines and within that build running in Pipelines, you want to run another docker container?

Please let me know, it'll help in answering the question.

Best Regards,  
Norbert  
Atlassian Bitbucket Cloud Support


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

docker
Lost all my repositories
Asked by Viktor:

Hello,

i have not worked with bitbucket for about 2 years but i had there about 15 projects(repositories) but now there is nothing. My account like a new one, nothing is there.

Please help!


Answers:
author: Fabio Racobaldo _Herzum_
body: Hi [@Viktor](/t5/user/viewprofilepage/user-id/4750763) ,

probably your bitbucket is expired and has been deleted by atlassian.

Try to contact Atlassian support <https://support.atlassian.com/contact/#/>

comments: author: fenix710
body: Hi Fabio,

i have figured out the problem. I have registered 2 accounts and did not notice that and used the wrong one.

Thank you!


Tags: bitbucket-cloud

cloud
Folder Deletion
Asked by Hudson Huang:

Can we delete the following folder?

E:\\Atlassian\\Data\\bitbucket\\tmp\\git


Answers:
author: Hudson Huang
body: Thanks [@Fabio Racobaldo _Herzum_](/t5/user/viewprofilepage/user-id/781528)

Got that.

comments: author: Fabio Racobaldo _Herzum_
body: You're welcome [@Hudson Huang](/t5/user/viewprofilepage/user-id/4545028) . Please mark my answer as accepted


author: Fabio Racobaldo _Herzum_
body: Hi [@Hudson Huang](/t5/user/viewprofilepage/user-id/4545028) ,

that folder should contain information about pull request (take a look here <https://confluence.atlassian.com/bitbucketserverkb/understanding-pull-requests-in-bitbucket-server-867010842.html>)

So my suggestion is to not remove that folder.

Hope this helps,

Fabio


Tags: bitbucket-server

server
Backup complete workspace
Asked by Michael Hamatschek:

Hi there,

<br />

are there any opportunities to backup all repositories of a given workspace at a time?  
There are common third party tools for this, but is there any option to do this within Bitbucket Cloud.  

As part of our annual backups, we would like to archive all existing repositories.

Thank you in advance


Answers:
author: Mark C
body: Hi [@Michael Hamatschek](/t5/user/viewprofilepage/user-id/820917)

Thank you for reaching out to the community.

For the feature on backing up repositories, I'm afraid there's no feature that will allow you to back up all your repositories from a given workspace at a time.  
The same way about archiving repositories.

We do have the existing feature requests for them below:

* Repository backups feature - <https://jira.atlassian.com/browse/BCLOUD-17712>
* Archiving repository feature - <https://jira.atlassian.com/browse/BCLOUD-18018>

For now, you can upvote and watch those feature requests so that you'll be notified of any updates from our team when the feature becomes available on Bitbucket Cloud.  
![](https://getsupport.atlassian.com/images/icons/emoticons/information.png) Please do note that we don't have an exact ETA for the feature request as all new features will be implemented according to our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html).

As a workaround from the backup repository feature, we highly suggest taking backups by cloning your repositories using **--mirror** clone.

```
git clone --mirror <Repo URL>
```

You can also create your own script that will perform this in your preferred schedule.  
You may also use this [API 2.0 endpoint](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-repositories-get) to list your workspace's repository names to be used in your own script.

Please do let us know if you have further questions.

Regards,  
Mark C


Tags: bitbucket-cloud

cloud