youngmon/atlassian-qna huggingface dataset:
Setting up Bamboo to run MSTests and then display them in the TEST Tab
Asked by Righardt Marais:

Bamboo 3.2

I am trying to get our Unit Tests to execute through the Bamboo CI.

I managed to take one of the dll containing the tests and adding that as a single MSTest Runner Task inside a second job as part of my main Plan.

This managed to run and output the MSTest output file (whatever.trx) to the TEST tab.

Problem is that I would now have to create a mstest task for each dll that needs testing (they in different unit test project folders) and then display their results.

Is there a different approach that I can take to running all the tests in one run and displaying them?

Many thanks

Righardt


Answers:
author: James Dumay
body: Hi Righart,

If you want to test multiple dlls using the same MSTest Runner Task, you need to produce a Test Metadata file and specify its location in the task configuration.

The MSTestRunner is just a wrapper around the mstest.exe executable provided by Visual Studio, so its worth reading about mstest.exe and the [testmetadata switch](http://msdn.microsoft.com/en-us/library/ms182489(v=vs.80).aspx#testmetadata).

From the MSTest.exe documentation:
> You can use the **/testmetadata** option to run tests in multiple test containers.
>
> The test metadata file is created for your solution when you create test lists using the Test Manager window. This file contains information about all the tests listed in the Test Manager window. These are all the tests that exist in all test projects in your solution.
>
> You can change the test metadata file only by making changes that are reflected in the Test Manager window, such as creating or deleting tests, or changing a test's properties.  
> \<th align="left"\>Note\</th\>
>
> |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
> | Because the test container contains tests that you can run, you must not specify both the **/testcontainer** and **/testmetadata** options in a single command line. Doing this would be ambiguous and would produce an error. |
>
> The test metadata file is an XML file that is created in the solution folder. This file is shown in Solution Explorer under the **Solution Items** node. A test metadata file has the extension .vsmdi, and is associated with the Test Manager window; that is, if you double-click a .vsmdi file in Windows Explorer, the file opens Visual Studio, and its contents. All the tests in a solution's test projects are displayed in the Test Manager window.
>
> When you use the **/testmetadata** option, it is recommended that you indicate specific tests to run by using the **/test** option or the **/testlist**option, or both.


Tags: ms-testrunner
Is it possible to use Maven 3 as a builder in Bamboo OnDemand?
Asked by Sverre:

Is it possible to use Maven 3 as a builder in Bamboo OnDemand?


Answers:
author: Fahd
body: Hi Stornes,

Yes, Maven 3 is one of stock images capabilities. You can have more information here - <https://confluence.atlassian.com/display/BAMBOO/stock+images>

Hope this helps.

Regards,

Fahd


Tags: cloud
Bamboo Queries Repository before Exe'ing first Stage?
Asked by Build Monkey:

I am having a lot of problems getting Bamboo to connect to the remote repository. You can see the log here:

[https://answers.atlassian.com/questions/62766/i-can-access-remote-git-repository-from-bamboo-using-only-one-repository-url](/questions/62766/i-can-access-remote-git-repository-from-bamboo-using-only-one-repository-url)

I am trying to better understand the process. It looks as though the repository is first queried before any of the stages are executed. Is that correct? I notice that when I do not define the source repository, my initial stage is exec'ed but once I define the repro, I get an Auth Fail error.

Is the system using the information in the Authentication Type to query the remote repro for changes? I have the Auth Type set to None which works every other way, including in FishEye, but Bamboo doesn't like it. I am on verion 4.0 and using git repro.


Answers:
author: Przemek Bruski
body: Yes, the repository is queried to determine the list of changes that will be included in the build.
> Is the system using the information in the Authentication Type to query the remote repro for changes?

It should.


Tags: git
Is it possible to export from a non-running bamboo instance?
Asked by Christopher Martin:

We have an old version of bamboo that currently does not start up correct, or run at all. Is it possible to export plan configurations with either a bundled or external tool, so we can view old setup information?


Answers:
author: Przemek Bruski
body: No, it's not possible. Your best bet is to try to get your old instance up and running, even if in crippled state.

comments: author: Przemek Bruski
body: you could get some information from XMLs in BUILD_DEFINITION table though.


author: Christopher Martin
body: Thanks for the info. Spent about an hour on the phone with Atlassian tech support yesterday and still couldn't get it working. Looks like I'll be rebuilding from scratch/memory.


author: Przemek Bruski
body: The issue does not mention deletion of index/, only KahaDB/ and caches/


author: Christopher Martin
body: Yup, you can see the ticket here: [BSP-7485](https://support.atlassian.com/browse/BSP-7485)


author: Przemek Bruski
body: Have you tried removing C:\\Users\\user\\bamboo-home\\index directory?


author: Christopher Martin
body: Dude, you are amazing. That finally fixed the issue. Might want to mention it to the other support guy on the ticket above, since he was stumped by the end of our call.


author: Przemek Bruski
body: Just make sure to rebuild the index (Administration/Indexing), otherwise some stuff relying on it won't work.


Tags: export

offline
Would like to change Bamboo's agent user from 'bamboo' to different user
Asked by Build Monkey:

If I read correctly, Bamboo's agents run as user 'bamboo'. If so, I would like to be able to change this to an existing user we have created to perform just such tasks. Is this possible?

Thanks!


Answers:
author: shivom
body: Can be possible that Bamboo agent run using of Administrator User instead of Bamboo User?


author: Przemek Bruski
body: Local agents are run as the same user that started Bamboo Server and there's no way to change it.


author: Adam Myatt
body: If you are referring to remote agents then yes they can run as separate users. For Windows see here : <https://confluence.atlassian.com/display/BAMBOO/Running+Bamboo+service+on+Windows+as+the+local+user>

comments: author: Build Monkey
body: no, not the remote agents. The local agents. I am having problems checking out code from our remote git repository and saw some doc that said the agent checks out the repro as user 'bamboo'. (I am using the No auth mode). We don't want to create yet another user, but rather use our already existing bot user to do this since all perms have already been set up. Is this possible? We are also using linux.


Tags: agent
Bamboo Failed to Run the Backup Message
Asked by Gavin Bunney:

Our bamboo server failed to run the scheduled backup (things happen!). I have rerun the backup and it successfully passed.

However, the error message doesn't seem to disappear - is there a way to clear it out? It's showing as a yellow alert box on the top of each page in Bamboo.

![](../../../upfiles/Screen_Shot_2012-06-18_at_11.09.34_AM_1.png)

// side issue there looks to be an odd css problem in the last update of chrome, so its hovering over the menu links - hence the desire to clear out the error :)


Answers:
author: Adam Myatt
body: I had this happen once myself. A reboot cleared it up.

comments: author: Gavin Bunney
body: Thanks - rebooted and the message is gone.


author: sravani K
body: I rebooted the system. For the past 1 month I am not facing this issue.I thought it was gone, but we are experiencing the same issue again. Can you suggest us the solution for this.


author: Sultan Maiyaki
body: This error is replicable if there is permission issue on the Backup directory in Bamboo home. Once this issue is replicated, try to check the logs seraching through the scheduled time


author: Przemek Bruski
body: I lower right corner of that yellow box, there's a link that let's you close the message. You can't see it, but it's there.


author: James Dumay
body: I've raised a bug for this [here](https://jira.atlassian.com/browse/BAM-11735).
Repeat successful bamboo stage
Asked by stephen samuel:

Hi,

Is it possible to re-run a successful bamboo stage. I am looking to setup a build system where a plan checks out a project, tags it, builds it, and then (manually) releases to QA, STAGE, etc...

Then I can do another release next week say, and that can push out to QA, STAGE, etc... but if I want to roll back an earlier build I want to be able to re-run the previous build "release" stage.

Right now it seems you can only re-run a stage if it failed. Re-using the artifacts from previous builds is a massive win I think, and since the artifacts are kept, why not eh.


Answers:
author: James Dumay
body: Hi monkjack,

Its not possible to re-run a successful stage at the moment, but you might be interested in [voting for this ticket](https://jira.atlassian.com/browse/BAM-9611) which will add the functionality.

I'd love to chat with you about your deployments and Bamboo - could you drop me an email? Mine is [james@atlassian.com](mailto:james@atlassian.com)

Thanks  
James
\<body\>\</body\>
GIT fetch: Host key verification failed.fatal
Asked by Edvinas Bartkus:

This is the error message that I get in the step to fetch code from git server.  

Host key verification failed.fatal: The remote end hung up unexpectedly stdout: Host key verification failed.fatal: The remote end hung up unexpectedly

The structure of git repo addess is such:  
ssh://username@serveraddress.com/usr/git-repo/repo.git  

I have added id_rsa key that was tested and has permission to fetch the changes. Seems like Bamboo is not able to verificate [serveraddress.com](http://serveraddress.com). Is it fixable?


Answers:
author: PiotrA
body: Are you running bamboo (or bamboo agent) on Windows machine? Could it be that you're impacted by <https://jira.atlassian.com/browse/BAM-11096> ?


author: Przemek Bruski
body: Have you tried to clone that repo as the user used to run Bamboo server?

comments: author: Edvinas Bartkus
body: Yes, I have tried and it works well. Is there anything like 'known_hosts' that is being used by Bamboo GIT client? Because it seems like there is no entry about my domain :)


Tags: git

ssh
Can I restrict access to artifacts only?
Asked by Brent Villalobos:

Is there an option to restrict access to view artifacts in Bamboo? I can see that you can restrict access to view plans, but can I narrow it down to just artifacts? I want people to be able to view plans, but only certain people to view artifacts. Possible?


Answers:
author: Przemek Bruski
body: Not possible, sorry. There are no access rights tied to Artifacts.


Tags: artefact
Can I tell Bamboo to accept a different return code from a command as a pass?
Asked by Jay Barra:

I am trying to run a zip command to package up some artifacts as part of a stage and the tool run from CMD returns 1. Bamboo marks the job as failed because it says it was expecting 0 but valid return codes from the zip tool are 1 for success and negative for failures.


Answers:
author: Patrick Aikens
body: I'm not sure you can configure Bamboo that way, but what you COULD do is wrap the invocation of that tool in a script (shell, batch file, etc. depending on your OS) and have the script exit with 0 if the tool exits with 1 (and simply exit with the same exit code as the tool otherwise). Have your build execute that script rather than the tool directly. It's a little bit of work (and I DO think Bamboo should let you define what "Success" and "Failure" exit codes are - I have a couple of problem tools that I've had to do this for myself), but it will get around this problem.

comments: author: Jay Barra
body: That seems to work, calling 'dir' or 'echo' after the command I want feels a bit silly, but the build passes now.


author: Patrick Aikens
body: 'exit /b 0' should work too

something like (warning: untested from the top of my head)

```
REM Do ZIP commandIF %ERRORLEVEL% EQU 1 (EXIT /B 0)ELSE (EXIT /B %ERRORLEVEL%)
```

```
http://ss64.com/nt/exit.html
```


author: Gretchen
body: Patrick's example above shows the link where you can see a more elaborate example of converting multiple return codes but above it looks like part of the code and so I missed it the first time through. <http://ss64.com/nt/exit.html>`. Also see `<http://ss64.com/nt/robocopy-exit.html>` has the myriad of exit codes for Robocopy sorted out into success and failure return codes.`  


author: StevenHawkins
body: Just started using Bamboo and this is already causing me headaches, so I've raise the following JIRA issue : -

<https://jira.atlassian.com/browse/BAM-16356>


author: Kenneth Dickie
body: For some reason it wasn't good enough to just "exit /b/ 0". It would still flag the step failed. So I had to actually set the %errorlevel% = 0.

```
"C:\Program Files\PSTools\psexec.exe" \\servername -s -i -d -accepteula C:\path\to\app.exeif %errorlevel% GTR 2000 (ECHO Process started successfully on PID: %errorlevel%SET %errorlevel% = 0)exit /b %errorlevel%
```

comments: author: Stefan Wendelmann
body: Change

```
SET %errorlevel% = 0
```

To

```
SET ERRORLEVEL=0
```

To get this solution to work :)


author: Gretchen
body: I agree with Patrick Aikens' answer and just wanted to add another example that I've used extensively. See the robocopy return code problem here: <http://ss64.com/nt/robocopy-exit.html> There is an elaborate example of exit codes (codes 0-7 are good copies but different variations, Codes 8-16 include failures). And how to convert them to 0 for a valid (successful) return code 0.


Tags: artefact
Proxying Bamboo through httpd
Asked by ebarrere:

Anyone successfully gotten Bamboo running through an Apache SSL proxy? I am trying the instructions here with no luck:

<https://confluence.atlassian.com/display/BAMKB/Running+bamboo+behind+apache+httpd+proxy>

any help appreciated!


Answers:
author: Adam Myatt
body: Make sure in your wrapper.conf you set it to use the jetty.xml file.

In the jetty file use an SSL connector as such :

\<Call name="addConnector"\>

\<Arg\>

\<New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector"\>

\<Set name="host"\>\<Property name="jetty.host" /\>\</Set\>

\<Set name="port"\>\<Property name="jetty.port" default="8443"/\>\</Set\>

\<Set name="Keystore"\>\<SystemProperty name="jetty.home" default="."/\>/keystore\</Set\>

\<Set name="Password"\>MYCERTPASSWORD\</Set\>

\<Set name="KeyPassword"\>MYCERTPASSWORD\</Set\>

\</New\>

\</Arg\>

\</Call\>

Where the /keystore is the actual keystore file. YOu need to use keytool to import a self-signed cert or regular cert-authority signed cert (either is fine). Then this forces Bamboo to listen on a secure port.

In your Apache HTTPD.conf file you need proxypass and proxypassreverse to use the 8443 port, not the defautl http-based on.

ProxyPass /cit <https://MYBAMBOOURL:8443/cit>  
ProxyPassReverse /cit <https://MYBAMBOOURL:8443/cit>


author: Colin Goudie
body: Can you provide any specific issues you are having. We have bamboo running behind apache on many sites. But hard to tell what your issue is without more detail
How to connect CVSNT repository setup on sspi / ported to ext ?
Asked by Siddharth Randive:

We have CVSNT repository that we are trying to connect on Bamboo. CVS users are directly connecting using network domain credentials. We use sspi cvs root, and we could get an ext cvs root working as well on commandline but same does not work with Bamboo. Bamboo requires password / public and private keys, but when we run the ext cvs connection on commandline it just works without having to supply a password.

Please suggest ideas. Thanks.


Answers:
author: James Dumay
body: Hi Sid,

As far as I am aware we do not support the SSPI for CVS - you will have to supply a username and password for Bamboo to checkout your repository. Is this not possible for you?

Thanks  
James
remote agent crashing when being farmed
Asked by Nhut Lam:

Hi,  

I'm getting the following error when I farm off a remote agent to run a bamboo plan.  

I'm not getting an error when the remote agent is dedicated to running the plan.  

It seems to start, and then after say 30 minutes the remote agent will crash with this error.  

We need to run parallel remote agents because our plans are taking a 3+ hours to run.   

does anyone know how to prevent the Bamboo agent from crashing when two or more agents are running the same plan?

<br />

<br />

Log :  

ERROR \| wrapper \| 2012/06/12 17:43:26 \| JVM appears hung: Timed out waiting for signal from JVM.  
ERROR \| wrapper \| 2012/06/12 17:43:29 \| JVM did not exit on request, terminated  
STATUS \| wrapper \| 2012/06/12 17:43:31 \| JVM exited in response to signal SIGKILL (9).  
ERROR \| wrapper \| 2012/06/12 17:43:31 \| Unable to start a JVM  
STATUS \| wrapper \| 2012/06/12 17:43:31 \| \<-- Wrapper Stopped


Answers:
author: Nhut Lam
body: problem with the agent. Please see above.  


author: Marcin Cabaj
body: Increase your wrapper.ping.timeout (default=30) and wrapper.ping.interval (default=5) values in conf/wrapper.conf, e.g:

```
wrapper.ping.timeout=900wrapper.ping.interval=30
```

more info: <http://wrapper.tanukisoftware.com/doc/english/prop-ping-timeout.html>

comments: author: Nhut Lam
body: Thanks for your help.

We resolving why the timeout was occuring.

The agent being farmed to didn't have enough memory, and couldn't respond on occaision to the heart-beat. After increasing the memory from 500 MB to 2GB, everything is fine.


author: Marcin Cabaj
body: Increase your wrapper.ping.timeout and wrapper.ping.interval values in conf/wrapper.conf, e.g:   
\* wrapper.ping.timeout=900  
\* wrapper.ping.interval=30

<br />

more info: <http://wrapper.tanukisoftware.com/doc/english/prop-ping-timeout.html>


author: Przemek Bruski
body: What do you mean by "farmed"?

Which JDK are you using to start the agent?

comments: author: Nhut Lam
body: Hi,

By farmed I mean executing a Bamboo plan (which has multiple jobs) with 2 or more bamboo agents.

The java version we are using is : 1.6.0_30

when i run the plan with a single agent it runs and completes fine. With multiple agents executing jobs in parallel I get the above error.


Tags: remote

remote-agent
Bamboo doesn't start
Asked by Sebastien Erard:

At startup, bamboo is complaining about a missing bamboo-capabilities.properties file and then shuts down (see log). This server is currently connected to 16 remote agents and has one local agent configured but inactive.


Answers:
author: Sebastien Erard
body: Removing the [java-melody plugin](https://marketplace.atlassian.com/plugins/net.bull.javamelody) solved this issue. And upgrading from Bamboo 4.0.1 to 4.1.1 allowed this plugin to work properly.


author: Adam Myatt
body: I would suggest submitting a support request, but additionally any supporting stacktraces or lgos you can provide here?
repository settings not able to view
Asked by kranthi kumar:

Hi team,

I'm not able to view my repository settings in my account ,could you please advise me what could be the possible reasons.

Thanks


Answers:
author: Theodora Boudale
body: Hi [@kranthi kumar](/t5/user/viewprofilepage/user-id/4595001),

Repository settings are visible to users that have admin access to repos.

You should have admin access to repos of your personal workspace (the one associated with your Bitbucket Cloud account). However, if you are a member of another workspace as well, and you haven't been granted admin access to the repos of that workspace, you won't be able to view the Repository settings for these repos.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Is it possible to do a piecemeal migration of Bitbucket from one instance to another?
Asked by John Lawlor:

In the next few months I will need to move Bitbucket from one network to another. I am just wondering if there is a way to do this project by project? Or do I have to do a 'big bang' migration from a backup?

Thanks

John


Answers:
author: Christian Glockner
body: Hi John,

If you have a Data Center license on the target instance you can use the Export/Import feature - see <https://confluence.atlassian.com/bitbucketserver/export-and-import-projects-and-repositories-957497834.html>

Cheers,

Christian

Premier Support Engineer

Atlassian


author: Mikael Sandberg
body: There is nothing in Bitbucket that would allows you to just migrate individual projects, and I did a quick search in the Marketplace and couldn't find an app that would allow you to sync between instances.


Tags: bitbucket-server

server
Bitbucket-multi maven project
Asked by yosser_mahfoudh:

i have a multi maven project.

Each project needs the artifact of the first project built.

How to configure the bitbucket-pipeline.yml in a way that we can include the other jars of the other projects.?

in Guitlab there is Include file option, is there something similar in bitbucket


Answers:
author: Theodora Boudale
body: Hi [@yosser_mahfoudh](/t5/user/viewprofilepage/user-id/3803216),

I'm afraid that there is no direct way to use in one repo artifacts generated by builds of a different repo.

A similar question was asked here:

<https://community.atlassian.com/t5/Bitbucket-questions/How-can-I-integrate-bitbucket-yml-file-in-another-one/qaq-p/1832357>

You can check the latest reply I gave to that question today. I explain there how it would be possible to achieve that by running all builds in one repo. Is this something that would work for you?

If you have any questions, please feel free to let me know.

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines
ssh: jumphost support
Asked by tarkhil:

Hello

I want to make deploy to a container without external IP. I don't want to make an ugly solution with non-standart port forwarding, instead I'd use ssh jumphost feature.

Is it possible?


Answers:
author: Igor Stoyanov
body: Hi [@tarkhil](/t5/user/viewprofilepage/user-id/4594177) . Thanks for your question. Please, provide information what pipe are you using, and what parameters you have passed.  

Regards, Igor.


author: tarkhil
body: Looks like you should install newer version of ssh


Tags: bitbucket-pipelines

server

ssh