Bamboo.Yaml not able to build
Asked by Atul Yadav:

Bamboo.yaml is not able to build the task, although I am able to fetch the specs from the bitbucket and create the plans but not able to run the build. Here is my Bamboo.yaml file

---  
version: 2  
plan:  
project-key: TEC  
key: ROCKET  
name: example Application for build  
stages:  
- Build Stage:  
- Build Build:  
tasks:  
- clean  
- script:  
- cd C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319  
- dir  
- msbuild C:\\Users\\Missionuser\\bamboo-agent-home\\xml-data\\build-dir\\TEC-ROCKET-JOB1\\bamboo-specs\\example.sln /t:Rebuild /p:Configuration=Debug


Answers:
author: Alexey Chystoprudov
body: Try this format

```
---
version: 2
plan:
  project-key: TEC
  key: ROCKET
  name: example Application  for build

stages:
  - Build Stage:
      - Build

Build:
  tasks:
    - clean
    - script:
        - cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319
        - dir
        - msbuild C:\Users\Missionuser\bamboo-agent-home\xml-data\build-dir\TEC-ROCKET-JOB1\bamboo-specs\example.sln /t:Rebuild /p:Configuration=Debug


```

comments: author: Atul Yadav
body: The file format is correct, maybe I have copied and pasted there that might have created the format incorrect. The issue with Bamboo is that it is not able to run the commands which are in Bamboo.yaml.

Here are the logs ,

|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 16-Sep-2019 21:13:54 | C:\\WINDOWS\\Microsoft.NET\\Framework64\\v4.0.30319\>msbuild C:\\Users\\Missionuser\\bamboo-agent-home\\xml-data\\build-dir\\TEC-ROCKET-JOB1\\bamboo-specs\\example.sln /t:Rebuild /p:Configuration=Debug |
| 16-Sep-2019 21:13:54 | Microsoft (R) Build Engine version 4.7.2046.0                                                                                                                                                             |
| 16-Sep-2019 21:13:54 | \[Microsoft .NET Framework, version 4.0.30319.42000\]                                                                                                                                                     |
| 16-Sep-2019 21:13:54 | Copyright (C) Microsoft Corporation. All rights reserved.                                                                                                                                                 |
| 16-Sep-2019 21:13:54 |                                                                                                                                                                                                           |
| 16-Sep-2019 21:13:54 | MSBUILD : error MSB1009: Project file does not exist.                                                                                                                                                     |
| 16-Sep-2019 21:13:54 | Switch: C:\\Users\\Missionuser\\bamboo-agent-home\\xml-data\\build-dir\\TEC-ROCKET-JOB1\\bamboo-specs\\example.sln                                                                                        |

And if you see the Bamboo.YAML file content,

```
 msbuild C:\Users\Missionuser\bamboo-agent-home\xml-data\build-dir\TEC-ROCKET-JOB1\bamboo-specs\example.sln /t:Rebuild /p:Configuration=Debu
```

it is not able to find the file whereas the file is already in the same path in local working directory for Bamboo and in the logs it show that it is trying to find in some other directory

16-Sep-2019 21:13:54Switch: C:\\Users\\Missionuser\\bamboo-agent-home\\xml-data\\build-dir\\TEC-ROCKET-JOB1\\**bamboo-specs**\\example.sln

Can you please help me with this that why Bamboo is not able to execute with the latest Bamboo.yaml file.


author: Alexey Chystoprudov
body: This path is in your original yaml. I would change this line to **msbuild example.sln,**instead of full path


author: Atul Yadav
body: Ok , I will change the path but how it will find the .sln file directly ?


author: Atul Yadav
body: I was able to fix the issue with changing the path and it recognizes the file and its content. But I noticed one strange thing that whenever I push my code of the application which is 1.5 GB in size and Bamboo scans the specs and it never finishes the scan when I have my code in bitbucket wherein when I only a Bamboo.yaml in the bitbucket it finishes in 5-6 seconds.

I want to know that do Bamboo scans every folder and file in the code to find bamboo.yaml file or will it look directly into the bamboo-specs folder and then the file.

Also when I commit the change in my bamboo.yaml and push into the bitbucket it still uses the old bamboo.yaml file not the newly committed file.

Can you please help me with the above queries.

Regards,

Atul


author: Atul Yadav
body: Hello team,

Can you please help me with the above query, do Bamboo scans each folder to find the Bamboo.YAML file or it directly searches under the bamboo-specs folder. My code size is 2 GB and whenever I commit any change in the bamboo.YAML, the scan never finishes but when I only have the bamboo-specs folder without the code it finishes in 5-10 seconds.

Regards,

Atul


author: Alexey Chystoprudov
body: It scans only bamboo-specs folder but it makes a checkout of full repo before start processing of it


author: Atul Yadav
body: Sorry, I am getting confused here. It keeps on scanning after the checkout is finished and never stops. One scan was running for the last 4 days and there is no way to stop the scan as well. We have brought the licenses as well and looks like it may be a stopper to buy the further licenses for remaining remote agents.

Can you please explain to us in the detail of this functionality of bamboo specs.


author: Alexey Chystoprudov
body: Atul. I would suggest to use support help here. Please report the issue at support.atlassian.com and our support team will gather required info to handle the case


author: Atul Yadav
body: We checked the issue and found that it needs some git commands to shorten the files size and later the Bamboo specs would work in lesser time. Here are the steps which performed and were able to fix the issue.

1. Login into the Bamboo server with the admin user

2. Run the below command and rerun the build.

git config --system core.longpaths true


author: Alexey Chystoprudov
body: Thank you for sharing of steps to solve the issue