youngmon/atlassian-qna huggingface dataset:
Where is my unit test files(container) to run MSTest in Bamboo?
Asked by muratgur:

I'm trying to add a task to run my unit tests written in Visual Studio 2017. According to [this](https://confluence.atlassian.com/bamboo/mstest-runner-289277053.html) article everything is perfect but i don't know what to set for container. I have the source code, thats ok but there is no .dll it is just pure code. Am i getting something wrong? I was wondering that Bamboo can compile and run my tests in a .csproj but looks like i'm missing something. Any idea?


Answers:
author: Jean Volski
body: Hi Murat,

This link explains the **/testcontainer** parameter that MSTest tool expects as input.

<https://msdn.microsoft.com/en-us/library/ms182489.aspx#testcontainer>

Bamboo itself does not compile the project - only calls the MSTest tool for the compiled project so you'll need to create your .dll first.

Hope this helps!

Cheers,

Jean
run python script - inline - sudo
Asked by delaforge:

Hi,

How can I execute a script using an inline command "sudo python name_script.py"?

Thank you in advance for your help.

Regards


Answers:
author: Gonchik Tsymzhitov
body: Hi!

Could you clarify your use case?

May be better """ sudo python ${bamboo.agentWorkingDirectory}/name_script.py """

<https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html>

Cheers,

Gonchik Tsymzhitov


Tags: python

sudo
Case sensitive AD authentication in Bamboo Server
Asked by Robert Kerr:

We had users failing to authenticate with all-lowercase characters, but once we had them login with mixed-case, authentication succeeded. Since Active Directory is not case-sensitive in its searches, does this mean Bamboo is doing a case-sensitive compare on the results?

If so, can this be managed? Case-insensitive is preferred.


Answers:
author: Przemek Bruski
body: This will be possible with Bamboo 6.6.


author: rsperafico
body: Hello [@Robert Kerr](/t5/user/viewprofilepage/user-id/735038),

If you have connected you LDAP into Crowd, then manage user authentication in Bamboo through Crowd, you can force all authentication in Crowd to be lowercase ([Enforcing Lower-Case Usernames and Groups for an Application](https://confluence.atlassian.com/crowd/enforcing-lower-case-usernames-and-groups-for-an-application-179446857.html "Enforcing Lower-Case Usernames and Groups for an Application"))

If you are managing Bamboo's authentication directly from LDAP, you cannot force lowercase authentication in Bamboo.

Note: If you have already defined user (e.g. **JSmyth** ) or group (e.g **MyGroup** ) permission in Bamboo and later you change authentication case to lowercase (e.g. **jsmyth** and/or **mygroup**), Bamboo will still granting permissions to initial set up, requiring to grant permission to new username and/group)

Kind regards,

Rafael
Bamboo deploy asp.net to IIS
Asked by Fr0zt:

Hello.

I have an asp.net web page which I am building with Visual Studio in bamboo ,

I will deploy it to as IIS server, but I cannot find any option in bamboo for it neither can I find it in Atlassian Market.

I have found some posts but they are old...

<https://community.atlassian.com/t5/Answers-Developer-Questions/How-to-deploy-a-NET-application-on-IIS/qaq-p/498835>

What is the best way to do it?


Answers:
author: Curtis
body: What you are looking for is MS Web Deploy. This is a Windows tool, that can perform remote deployments to IIS using a CLI command, making it easy to integrate into tools like Bamboo or Jenkins.

In order to use this, you'll need to have 2 services setup and installed on the IIS server.

* Web Management Service
* Web Deployment Agent Service

Once those services are setup and running, you can run the msdeploy.exe (C:\\Program Files\\IIS\\Microsoft Web Deploy V3\\msdeploy.exe) that comes with MS Web Deploy to execute a application deployment. This can be done from the same server, or from a remote server.

**Example:**

    msdeploy.exe -verb:sync     -source:iisApp="$appPath\web"     -dest:iisApp='$SiteName',wmsvc="$IIS-Server-Name",UserName='$user',Password='$password',AuthType='Basic',skipAppCreation=true     -enableRule:AppOffline     -allowUntrusted:true
How to build docker image from yaml specs?
Asked by mode89:

I want to build a docker image from a Bamboo YAML Specs. I tried to do the following:

```
- scripts:
    - docker build <dockerfile-dir> 
```

But the default agent doesn't have docker. So, I get an error telling that docker cannot be found. I have a remote agent that has docker. How can I force to run the job on the remote agent?

I guess, I need to specify requirements. But I haven't found any resources, which would tell how to specify docker in the requirements.

I'm running Bamboo 6.4.0.


Answers:
author: Jeyanthan I
body: Hi Andrew,

You can find [this link](https://docs.atlassian.com/bamboo-specs-docs/6.3.0/specs-yaml.html#job-requirements) having steps to define your job requirements. You would just have to create a custom capability in the appropriate agent(s) in Bamboo UI, and specify it as a requirement for this job. It looks something like this.

    ---project:  key: DRAGON  plan:    key: SLAYER    name: Dragon Slayer Queststages:  - jobs:      - scripts:          - echo 'Going to slay the red dragon, watch me'        requirements:          - isDragonLazy          - isDragonAsleep          - isCaveDeep...

Did this help?

comments: author: mode89
body: Hi, Jeyanthan! Thanks for the quick reply.

I haven't tried it, yet. I believe that it should work. But is there any more general way of doing it? Is there any builtin keyword or variable, that corresponds to the Docker capability?

For example, [here](https://docs.atlassian.com/bamboo-specs-docs/6.3.0/specs-yaml.html?_ga=2.87688026.350572369.1523365366-827961904.1517242817#job-requirements) they say that there are some kind of **Executable capabilities**. How can I refer to them in the requirements field?


author: uknami
body: Hi,

I have the exact same problem. I can't get my build to run docker on the host machine.

Creating custom capabilities doesn't scale well. Docker is already shown as one the executable capability for the agent

An example would really help

Thanks


author: Jeyanthan I
body: Hi Nasir,

Your issue might need further investigation from our support side. You can, however, find the examples to work with Docker in [our documentation here](https://docs.atlassian.com/bamboo-specs-docs/6.6.0/specs-yaml.html#docker) (you need to alter the URL to match your Bamboo version).

Hope that helps.


author: uknami
body: Hi,

So I can't use the new Docker tab for our builds as it seems like it expects a pre existing docker image.

What our build does is create a new docker image, run some tests against it and then push the image to Artifactory.

I will give the custom capability a try but the yaml specs seem non functional to me as they can only do simple stuff (which I can't get to work) and not the same as java specs.

Also it doesn't support git flow (Atlassian boasts about a lot!) i.e. make changes to the yaml file per branch and only affect that branch until you merge to develop and so on.

regards,


Tags: docker

yaml
JUnit XML schema
Asked by anton.bronnikov:

What is XML schema that JUnit parser in Bamboo uses? It is mentioned in ["JUnit parsing in Bamboo"](https://confluence.atlassian.com/bamboo/junit-parsing-in-bamboo-289277357.html "\"JUnit parsing in Bamboo\""), however the link that is provided by that article is broken already.  

Thanks.


Answers:
author: Jeremy Owen
body: Hey Anton,

Bamboo should be able to parse any valid JUnit results. If you want to get a better idea of the schema or validate the XML, here's an XSD you can use for reference:

* <https://github.com/windyroad/JUnit-Schema/blob/master/JUnit.xsd>

We've also fixed the sample download links up on [JUnit Parsing in Bamboo](https://confluence.atlassian.com/bamboo/junit-parsing-in-bamboo-289277357.html) too. Just a note, they're identical to the XML that's already on the page.

Hope this helps. :)

comments: author: anton.bronnikov
body: Hi Jeremy,

Thanks a lot for a prompt response!

Yes, I did see the XSD from @windyroad. Reason why I asked for it still was that if you try to validate the sample XMLs from the article against windyroad's XSD then they will fail (apparently that XSD is much more strict than de-facto implementation).

That's why I thought that perhaps Atlassian has some other, more up-to-date, version of the XSD.

Thank you.

Cheers,  
Anton


author: Jeremy Owen
body: Hmm, you're not wrong. It's definitely stricter.

To be very honest, the validation we perform on JUnit files before parsing them in Bamboo is pretty simplistic. It's not actually using an XSD and is performing a few basic checks in code, so it's difficult to give you a 1:1 definition. This is the closest I can find:

* <https://github.com/behave/behave/blob/master/etc/junit.xml/junit-4.xsd>

Cheers,

Jeremy
Visual Studio build with bamboo
Asked by Fr0zt:

Hello.

I am starting to work with bamboo, trying to make a build of a asp.net webpage, that I have done using Visual Studio 2017.

This webpage is small (it has a page where I can login, and than I login is success it takes me to another webpage).

In visual studio 2017 it's working fine: I build it and run it on chrome and it's working,

I am trying to make the build using bamboo. I placed my code in a repo (gogs) and I have connected it to bamboo with success.

In bamboo I have created a Visual Studio build plan, with one job, with the following configuration:

- Source Code Checkout

![vivaldi_2018-04-10_11-05-34.png](/t5/image/serverpage/image-id/19110i032AC617006591A1/image-size/large?v=v2&px=999 "vivaldi_2018-04-10_11-05-34.png")

- Visual studio build

![vivaldi_2018-04-10_11-05-48.png](/t5/image/serverpage/image-id/19111i389023A2B42645AE/image-size/large?v=v2&px=999 "vivaldi_2018-04-10_11-05-48.png")

i am not sure if the build options are correct:

Executable: I have choosen the path to the VS2017 msbuild:

C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\MSBuild\\15.0\\Bin

Project File: I have selected the .sln file in my project

Options: I have found this in the web. Not sure if this is correct.

/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true

Environment Variables: blank

Working subdirectory: blank

- In my artifacts configuration, in the plan I have this:

![vivaldi_2018-04-10_11-12-16.png](/t5/image/serverpage/image-id/19112iAF48E9B1EB594995/image-size/large?v=v2&px=999 "vivaldi_2018-04-10_11-12-16.png")

Again, I am not sure if this definition is correct.

If I run this build I get the following message: "Build was successful".

When I go the generated artifacts and I click on it it open the expect webpage (first) with my login. But in here there is something missing (an image that I have on it).

When I login in the page and I get "page not found".

Can anyone help me with this?

Is my plan wrong?

Thanks


Answers:
author: AnnWorley
body: We opened a support request so we could have a deeper look at your logs and other materials. Please stand by for an email from our Service Desk.
User Role for Bamboo Local Agent
Asked by yy_cheng:

I've installed a local agent on our Bamboo server, and add a task to run powershell script. However, the task keeps telling that it must be run in admin mode.

I put some debug trace in my script, when Bamboo build runs this task, I get message telling the user is not admin user.

* *someone is an admin user: False*

When I logon to Bamboo server as the same user, and execute the same script, it tells me that I am an admin user.

* *someone is an admin user: True*

Does anyone has any idea why user role is different and how to make Bamboo build to be an admin user?

<br />

.


Answers:
author: yy_cheng
body: Answering my question in here.

After some digging, it turns out the Bamboo Server Service uses a local admin account. Changing it to Local System account fixes the issue.
Github Repository configuration set to NOT clean but it still does.
Asked by lance_lyons:

Hi, We have a CI environment that is on a network with limited bandwidth. This is being fixed but will take a little longer. We set the bamboo build repository settings to not do a clean build to improve the time since 1 of our repos is 3gb big. With the source code repo set to not clean, we still have times where it does do a full clean as shown below.

How can I prevent this? Would caching the repo on remote agents help this performance?

Any other suggestions other than the obvious of getting the network bandwidth fixed.

Thanks in advance

```
simple	09-Apr-2018 18:34:28	Updating source code to revision: 04bdcea37c7ca108a81cf4359b2f13903df6fe29simple	09-Apr-2018 18:34:30	Fetching 'refs/heads/BranchName1' from 'https://github.com/Company/CompanyWeb.Net.git'. Will try to do a shallow fetch.simple	09-Apr-2018 18:34:33	From https://github.com/Company/CompanyWeb.Netsimple	09-Apr-2018 18:34:33	 + c44b08256c...1573aa7408 BranchName1 -> BranchName1  (forced update)simple	09-Apr-2018 18:34:33	Checking out revision 04bdcea37c7ca108a81cf4359b2f13903df6fe29.simple	09-Apr-2018 18:34:33	fatal: reference is not a tree: 04bdcea37c7ca108a81cf4359b2f13903df6fe29error	09-Apr-2018 18:34:33	Checkout to revision 04bdcea37c7ca108a81cf4359b2f13903df6fe29 has failed.simple	09-Apr-2018 18:34:33	Warning: failed to checkout source code to directory 'E:\bamboo-agent-home\xml-data\build-dir\LS-OWAPI-JOB1', trying to recover...simple	09-Apr-2018 18:34:48	Cleaned source directory 'E:\bamboo-agent-home\xml-data\build-dir\LS-OWAPI-JOB1'...simple	09-Apr-2018 18:34:48	Creating local git repository in 'E:\bamboo-agent-home\xml-data\build-dir\LS-OWAPI-JOB1\.git'.simple	09-Apr-2018 18:34:48	Initialized empty Git repository in E:/bamboo-agent-home/xml-data/build-dir/LS-OWAPI-JOB1/.git/simple	09-Apr-2018 18:34:49	Fetching 'refs/heads/BranchName1' from 'https://github.com/Company/CompanyWeb.Net.git'.
```


Answers:
author: Jeyanthan I
body: Hi Lance,

Can you try disabling **Use shallow clone**in the respective linked repository? (And clear fit cache under \*Overview -\> Repository settings\*)

It appears like the checkout of a specific revision is failing and I suspect it could be due to the shallow clone with depth=1 because the checkout seem to happen when it is cloned fully subsequently.

You can try cloning outside Bamboo via command line and see if you can reproduce this issue.

That said, enabling repository caching on agent will definitely help. (found under Git Repository's advanced options) This creates a full clone of the repository in agent directory fit the first time. All remote updates go into that repository and because that repository is not destroyed between builds, Bamboo does the checkout from that repository into the build working dir. So, even if you need clean checkout, it should be quite fast.

Hope that helps.


Tags: bamboo-administration
disk in task manager is all time 100% and computer is very slow
Asked by wael shoman:

disk in task manager is all time 100% and computer is very slow


Answers:
author: robhit
body: Hi Wael,

Thanks for your question!

We could check the following in this scenario:

* Check what is your machine limits (RAM, Processor core, etc) to see if you could cater the running applications.
* Check how many application you are running on the machine.
* Give defrag a chance to see if that helps to clean up some.

Thanks,

Robhit
Builds are failing when agent running as a service
Asked by Akhil Krishnan:

Hello Team,

I have a windows build agent which is configure to run maven builds. When I started running it as service , build are failing continuously with below error.

Agent log on user is not Local System and ENV variables are correctly configured. Can someone help me to solve this issue.

PS: when agent is running as non service, builds are success.

![bamboo_error.PNG](/t5/image/serverpage/image-id/19015i117D89CABEF3AE7A/image-size/large?v=v2&px=999 "bamboo_error.PNG")


Answers:
author: Jeyanthan I
body: Hi Akhil,

I believe the English translation to the error is this:

```
<cmd> is not recognized as an internal or external command
```

We see this problem often, and it's often related to the SYSTEM path not working when using the agent as a Windows Service which is outlined in the below knowledge base article:

* [Bamboo or remote agent does not pick up the Path environment variable correctly when running as a Windows Service](https://confluence.atlassian.com/bamkb/bamboo-does-not-pick-up-the-path-environment-variable-correctly-323982768.html)

Hope that helps.


author: robhit
body: Hi Akhil,

The problem may need a thorough investigation.

I would recommend opening a [support ticket](https://support.atlassian.com/contact/#/)so that support engineers can help you.

Thanks,

Robhit
Getting "Fatel error : file not found" Xcode/iOS project.
Asked by Niranjan:

i am working on iOS project using Xcode tool. the code is written in Objective-c. we are using cocoapods to import all required library files for current application. my project is running without any error on my machine in Xcode tool. but when i try to run this project on bamboo its giving fatel error "file not found". they are library files missing in bamboo.

- do i need to install library files on remote server?

- do i need to install any other tools inorder to run Xcode iOS project.

- How to enable unit-tests on bamboo. is there any doc.


Answers:
author: robhit
body: Hi Niranjan,

Have you checked this doc already - [Bamboo with Xcode](https://confluence.atlassian.com/bamboo/xcode-354353193.html)

If you are running build using a remote agent then yes you have to ensure that the Xcode dependencies (libraries) are installed on the remote agent machine.

You could check the agent or server capabilities to see if the correct path to the libraries is referred. Change if not.

About the Xcode unit tests, I am not quite sure about it but how about using JUnit for this?

Thanks,

Robhit
Error when sending mail notifications
Asked by Edward Snowden:

Hi,

I am getting the error message:

```
com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.office365.com, 587; timeout 20000; nested exception is: java.net.SocketTimeoutException: connect timed out
```

When Bamboo is trying to send notifications.

Any help?

Thanks


Answers:
author: robhit
body: Hi Edward,

The message hints us at the connectivity issue. You could check the following to troubleshoot:

* Check if the port 587 is correct and open.
* Test the connectivity using the telnet command:

  ```
  telnet smtp.office365.com 587
  ```

Thanks,

Robhit

comments: author: Edward Snowden
body: Hi [@robhit](/t5/user/viewprofilepage/user-id/1132242),

Thanks! It was indeed related to the port issue.
Not able to build Xcode project. (using cocoapods)
Asked by Niranjan:

Hi Team,

I am trying to run Xcode iOS project on Bamboo, my project dependency with cocoapods. i installed all libraries in my machine. but build failing on bamboo server. its giving a error for library files which are pod files.

Please give me a solution, how i can fix this issue.

Thanks in advance.


Answers:
author: Jeyanthan I
body: Hi Niranjan,

I believe you're using [XCode task](https://confluence.atlassian.com/bamboo/xcode-354353193.html) to run this. When you say that you get dependency error, were you able to run this outside Bamboo (via command line) as the same user in the same machine running this build?

comments: author: Niranjan
body: Hey Jeyanthan Inbasekaran, thanks for your quick responce.

Yes i am able to run build outside of bamboo without any issue. it works perfect on developer machine outside of bamboo. but build fails on bamboo on remote machine. so will remote machine needs to install project's library files on his machine?

in xcode we are using cocoapods. so we are installing all required libraries in developer's machine and Xcode is importing that libraries in project pod's directory. so i think bamboo giving error because the library files are missing the tester server/machine not installed required libs. is it something cause ?
Bamboo-Bitbucket Could not access this repository in Bitbucket server
Asked by Paul Dennis:

Hi,

I am getting this error when trying to add a new linked repository in my Bamboo.

Any help is much appreciated!

Thanks,

Paul


Answers:
author: robhit
body: Hi Paul,

Thanks for your question!

The error is very generic. What do you see in the Bamboo logs? Maybe that would give you some hints.

Otherwise, You could also try to recreate the application link between Bitbucket and Bamboo and see if that helps to resolve the problem.

Thanks,

Robhit

comments: author: Paul Dennis
body: Recreating application link worked.

Thanks
Bamboo Server PC selection decisions when multiple are available
Asked by Derek Schmidt:

We have multiple PCs associated to a bamboo project, but we want to specify which PC to use for certain plans/tasks. Is there a way to set each item to run on one specific PC? What are the current methods of choosing a PC if there are multiple PCs associated to the project?


Answers:
author: rsperafico
body: Hello [@Derek Schmidt](/t5/user/viewprofilepage/user-id/1207532),

You can make use of:

* [Dedicating an agent](https://confluence.atlassian.com/bamboo/dedicating-an-agent-629015108.html "Dedicating an agent")
* [Defining a new custom capability](https://confluence.atlassian.com/bamboo/defining-a-new-custom-capability-289277149.html "Defining a new custom capability")

When dedicating an agent, the chosen PROJECT, PLAN, JOB, DEPLOYMENT or ENVIRONMENT will run only in the agent assigned and the agent assigned will only run that PROJECT, PLAN, JOB DEPLOYMENT or ENVIRONMENT.

When defining a custom capability, you can add it as Requirement ([Configuring a job's requirements](https://confluence.atlassian.com/bamboo/configuring-a-job-s-requirements-289277064.html "Configuring a job's requirements")) and the agent that meet all the requirements will be able to run the build.

Hope it helps.

Kind regards,

Rafael