youngmon/atlassian-qna huggingface dataset:
Tools to convert bamboo java specs to bamboo yaml specs
Asked by Bill Wang:

Are there any tools to convert bamboo java specs to bamboo yaml specs directly?


Answers:
author: Krystian Brazulewicz
body: [@Bill Wang](/t5/user/viewprofilepage/user-id/752992) [Bamboo YAML Specs](https://confluence.atlassian.com/bamboo/bamboo-yaml-specs-938844479.html) were designed to provide configuration for simple Bamboo Plans while [Bamboo Java Specs](https://confluence.atlassian.com/bamboo/bamboo-java-specs-941616821.html) are covering every possible aspect of Bamboo Plan configuration. YAML Specs are covering only subset of Java Specs and thus conversion from YAML to Java is not possible.

comments: author: Bill Wang
body: thanks for the confirmation.


author: Fernando Moreno
body: would be nice if you improve the yaml specs.

First thing to have, export bamboo plans to yaml.

Second thing, maintain synchrony between the plan UI modifications and the yaml spec.


author: ozbillwang
body: [@Krystian Brazulewicz](/t5/user/viewprofilepage/user-id/853277)

With the latest bamboo yaml spec 2.0, it covers most features as java spec.

Will atlassian/bamboo team start considering this convert tool now?


author: Jerry Wiltse
body: Is there an effort to continue to expand YAML spec capabilities, or is considered "feature complete". Specifically, I want to define plan dependencies, with YAML specs. Is there a possibility of that in the future?


author: Rasti
body: Is there any progress on this topic, @[Krystian Brazulewicz](https://community.atlassian.com/t5/user/viewprofilepage/user-id/853277) ? There is in the meantime the full coverage of bamboo specs provided in yaml.

So - is there a way to convert an existing Java Spec to yaml?


author: Tim Morrow
body: +1


author: Omar Herrera
body: +100 excellent idea


Tags: spec

yaml
how do i copy a job from Prod to Test without having to recreate manually ?
Asked by Hector Magnanao:

I want to copy a Bamboo job from Prod to Test. Can I export/import individual jobs in Bamboo ?


Answers:
author: Ellie Z _they_them_
body: Hey Hector,

Thank you for reaching out to the Atlassian Community!

Unfortunately, there are no builtin options to only export a specific job. However, if you're running Bamboo 6.1.0 or above, you can export the Prod Build to [Bamboo Specs](https://confluence.atlassian.com/bamboo/bamboo-specs-894743906.html), and then import as much of it as you want to your Test instance.

If you don't want the whole Plan to be imported, you will likely need to edit the Java Specs code so that it only imports what you want.

Please let us know if you have any questions.

Thanks,

Elias \| Bamboo Support

comments: author: Hector Magnanao
body: Hey Elias,

Thanks for the quick response. We are currently on Bamboo 5.15.5. So this is not possible ?


author: Hector Magnanao
body: Is there going to be an upgrade in the future where export/import of individual jobs will be much easier than having to edit the Java Spec ? This should definitely be a requirement since we don't always want to import all the jobs.


author: Ellie Z _they_them_
body: Hi Hector!

Thanks for your reply. That is correct, the feature is not available in version 5.15.5.

In the original request for the feature ([BAM-1223 - Import Export individual projects / plans](https://jira.atlassian.com/browse/BAM-1223)) the Bamboo developers had mentioned that:
> The preferred way to get that functionality is to use Bamboo Specs.

Since it looks like this is the direction we're going in, I have created the following Feature Request for this functionality:

[\[BAM-19746\] Export individual Job to Bamboo Specs](https://jira.atlassian.com/browse/BAM-19746)

I encourage you to vote and comment on that Feature Request, since those are counted when determining priority of features to add. For more information on this, please see our [New Features Policy](https://confluence.atlassian.com/bamboo/new-features-policy-289277300.html).

Please don't hesitate to reach out if you have any additional questions or concerns.

Cheers,

Elias\| Bamboo Support
How can I display a custom value on the build results page
Asked by Chris Johnston:

One of the build tasks I have in a plan is to launch a custom lines of code counter tool. This tool produces a few metrics about the code, lines of code, lines of comments, etc. and stores it in an output file.

Would like to take the output of this script and make it visible in the build results page in some way. Is there some plugin or some way this can be done? Such as reading in the metrics, injecting them as a variable, and then having those variables displayed once the build is completed.

I realize I could just take the output it produces, and then save that text file as an artifact/attachment, but this isn't really a great solution for people to easily see a simple custom metric...

Appreciate any thoughts and ideas on how to achieve this.


Answers:
author: Robert W
body: Hi Chris,

It is not currently possible to inject information into the Build Results Summary screen.

It may be possible to do with a Greasemokey/Tampermonkey browser based script to poll the information and display it on the page.


author: Robert W
body: removed
How is bamboo agent selected from all agent?
Asked by Lei P:

Hey,

We have a question.

How is bamboo agent selected? What is the algorithm behind this.

Asking cause we ran into some issues that several agents were selected on the same host, this cause a lot of resource congestion.

Is there a way to make agent selection smarter? e.g. Select the agent with less io/cpu/memory usage.

Thanks!


Answers:
author: Mirek
body: Each agent has a defined set of capabilites and can only run builds for jobs whose requirements match the agent's capabilities. Together, capabilities and requirements control which agents can execute builds for particular jobs. If there is a match agent can execute the job, if not then job will not be executed since no agent will be available to cover that.

More info:

<https://confluence.atlassian.com/bamboo/agents-and-capabilities-289277114.html>

comments: author: Lei P
body: Thanks, Mirek

I know the 'capabilites' but what I am asking is 'capacity'

Does bamboo consider agent's capacity? as I mentioned above, we are use remote agent, there could be multiple remote agents located on one remote host. If a lot of remote agents which from same hosts were selected, then the JOB could be running really long.

Is there a smart way to assign agent based on host resource?


author: Mirek
body: Yeah, but maybe if you add custom capability, as a simple key \<-\> value for the hardware defining high/medium/low performance servers you can maybe not dynamically, but execute more demanding jobs on better/faster machines, so that it would not be busy for other stuff.
Lots of Tests, VSTest.Console, and trx Result File Parsing
Asked by Christian Jones:

Goals:

1. Not specify tests through checked in code
2. Use VSTest.Console
3. Execute all tests in a single result file
4. Have Bamboo read results

I have 1-3 working using a powershell script I wrote. I search for dll's named with a specific pattern, such as \*Tests.dll. I pass this array into the execution of VSTest.Console, and I get a single trx file in folder named TestResults which VSTest.Console creates.

Problem 1, I can't specify the name of the trx file. I believe this can be done with a settings file, but I'm trying to have all the configuration in Bamboo so that changes don't require me branching and doing pull requests, etc.

So I'm attempting to fix this by renaming the file to result.trx and setting up a MSTest Parser. Problem is, it never finds the file.

In the MSTest Parser task, I've specified the "MSTest Test Results File/Directory" value as result.trx and TestResult\\result.trx and ${bamboo.build.working.directory}\\TestResults\\result.trx. Unfortunately, none of it works.


Answers:
author: Christian Jones
body: FYI, I got this working by copying the result.trx file to the root bamboo build folder and removing all pathing information from the MSTest Parser task.


author: Christian Jones
body: The error I get from the MSTest Parser task is; Could not find test result reports in the C:\\Bamboo\\Agent-3\\xml-data\\build-dir\\DEV-MAS-DEV directory.

comments: author: Piotr Maroszka
body: I have the same error

|----------------------|---------------------------------------------------------------------------------------|
| 14-wrz-2018 13:40:18 | Parsing test results under C:\\TME\\bamboo\\xml-data\\build-dir\\SSMU2-SSPPGM-JOB1... |
| 14-wrz-2018 13:40:18 | Failing task since test cases were expected but none were found.                      |

there is any solution
How do I get the Bamboo script task to show verbose console ouput?
Asked by David Jones:

In the script body at the first line I specify

#!/bin/bash -x

Below that line are my script commands.

When I run the script view the log I'm not able to see any of the verbose script commands being run.


Answers:
author: robhit
body: Hi David,

Thanks for your question!

I tested the code and Bamboo does show the verbose logs when using the -x flag:

```
build 05-Apr-2018 02:24:35 aerror 05-Apr-2018 02:24:35 + echo asimple 05-Apr-2018 02:24:35 Finished task 'Script' with result: Success
```

My Code was:

```
#!/bin/bash -x
echo a
```

Can you check what interpreter is set to be used?

I am using Shell and Script location as Inline. My Bamboo version is 6.4.0

Thanks,

Robhit

comments: author: Jeyanthan I
body: Just for records, one can parse the shebang and execute that interpretor inline directly only from Bamboo 6.4 onwards (via [BAM-17864](https://jira.atlassian.com/browse/BAM-17864)).


author: Catalin
body: I have the same problem : no output for the script

I've tested with the code Robhit provided and using Shell ,Script location as Inline, Bamboo version 6.6.3.


author: Jeyanthan I
body: Hey [@Catalin](/t5/user/viewprofilepage/user-id/3730796)

What do you see in your build log when the script task is executed?

Cheers, Jey


Tags: script
Compare artifact with previous artifacts?
Asked by jvelapol:

I have a scenario where a build generates a scoring number (in our case, it's a code coverage percentage). We'd like to consider having a check in a build to compare that coverage with the *previous* build (immediately previous build) and make decisions about that (flag a warning message, notify someone, fail the build, something like that) based on the results of that.

It gets hairy once we start talking about branched builds too (just what *is* the previous build/artifacts, for example), but it's possible we may only require that on certain branches.


Answers:
author: kiran jonnalagadda
body: I suggest using a script task, to be clear write a script using script task with below steps

* grab previous coverage percentage,
* execute your calculations and
* fail/success build.

comments: author: jvelapol
body: Hrm. The hard part is the first bullet there: I'd need to store that somewhere that could be easily referenced, plus I'd have to have a lot of logic in the script to figure out what is the previous percentage (which build, on which branch, from where), plus how do you determine previous without having to parse a ton of git logs/shasums to guesstimate it)

Maybe store as an artifact, but how to access a previous build's artifacts (assuming you can guess what the "previous build" was).


Tags: artefact

atl-dev
Do I need to install git on the Bamboo server if I'm using BitBucket server?
Asked by Jonathan Greenwood:

There have been changes (merges) from a branch into the develop branch, however, the build can not seem to follow this. An exception is thrown regarding a table constraint that tries to insert a commit as null.

Error stated in Bamboo plan:  
Plan 'CI-xxx' could not be started. Exception: Could not execute JDBC batch update; SQL \[insert into COMMIT_FILES (COMMIT_ID, COMMIT_FILE_NAME, COMMIT_FILE_REIVISION) values (?, ?, ?)\]; constraint \[null\]; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update  
(06 Mar 2018, 1:02:04 PM)

We are using Bamboo 5.12 on RHEL 5.x. We have an integration with BitBucket installed on a different server and wondering if the Bamboo server also needed a local copy of git installing.


Answers:
author: Mirek
body: That error doesn't say that you need to have GIT installed. Wondering what kind of integration you are having (App Links or else?) but in any way I think is should not be required unless your Bamboo server is used also as an local agent.


author: Christian Glockner
body: Hi Johnathan,

Bamboo does have a bundled Java-based version of git (called jgit), which is enough to get started, but we strongly recommend installing git proper separately.

Cheers,

Christian

Premier Support Engineer

Atlassian


Tags: bitbucket-server
BitBucket WebHook does not start Bamboo job?
Asked by Timothy_Harris:

So I have Bitbucket Cloud and a Bamboo(6.2.2) server. I configured a web hook for pull requests on BitBucket Cloud instance with the URL of the Bamboo Plan as show below.

I configured a remote Remote trigger on the Bamboo plan and added the IP's.

I created a pull request and triggered the web hook. It looks as if the webhook was successful from the BitBucket side.

### Response from [https://build.remoteiv.dk/rest/triggers/1.0/remote/changeDetection?planKey=TEST-TEST\&skipBranches=false](https://build.remoteiv.dk/rest/triggers/1.0/remote/changeDetection?planKey=TEST-TEST&skipBranches=false) {#toc-hId-1595035423}

* **HTTP status** : 202
* **Elapsed time** : 449ms
* **Request time** : a few seconds ago (Wednesday, March 7th 2018, 3:23:21 pm)

#### Headers {#toc-hId--1153635043}

|------------------------|-------------------------------|
| Content-Length         | 69                            |
| X-Content-Type-Options | nosniff                       |
| X-Powered-By           | ARR/3.0                       |
| Server                 | Microsoft-IIS/8.5             |
| Date                   | Wed, 07 Mar 2018 14:23:21 GMT |
| X-Frame-Options        | SAMEORIGIN                    |
| Content-Type           | application/json              |

But Bamboo does nothing...

Does anyone have an idea as to why Bamboo would be ignoring the webhook?


Answers:
author: Eazie Enibe
body: Hi Timothy,

Please could you share how you got this to work, I'm facing same exact issue.

Regards,

Eazie.


author: Yang Zhou
body: Did anyone get this working?

I have the same issue. Webhook run successfully with status 202 when a push detected, I also can manually run Bamboo job with no issue, but webhook cannot trigger the Bamboo job...


author: Foong
body: Is Bamboo Build Plan configured to use **Remote trigger** at **Plan Configuration \> Triggers**?

Does it work when there isn't any setting for IP address in the Remote trigger?

comments: author: Timothy_Harris
body: I got this working. Can't remember exactly what the problem was.


author: Vineesh
body: I tried with GitHub, still the problem exist. 'Could not connect to the server' , Could you please share the solution what you did.

Thanks.


Tags: bitbucket

bitbucket-cloud

webhook
NUnitRunner : How to use pass NUnit Options in the NUnitRunner task?
Asked by Abhash Rajbhandari:

I have a project where I want to pass NUnit options in Bamboo's NUnitRunner task. My NUnit command line is as follows:

nunit-console.exe --params="Browser=chrome;ExecuteSomething=Yes" Solution.compiled.dll --where "cat==ParallelCategory"

How can I achieve similar thing in Bamboo?


Answers:
author: Ellie Z _they_them_
body: Hi Abhash,

Thank you for reaching out to the Atlassian Community!

Those command line options are from NUnit version 3.x, for which we don't yet have support. There is an open Feature Request for supporting NUnit 3.x arguments and parameters here:  
\[\\\[BAM\\-18833\\\] Support New NUnit Runner Command line parameters\|<https://jira.atlassian.com/browse/BAM-18833>\]

As a workaround, please add the command into a Script task, using an Inline script and your command line as you sent before; ie:

```
nunit-console.exe --params="Browser=chrome;ExecuteSomething=Yes" Solution.compiled.dll --where "cat==ParallelCategory"
```

(*Edit*) Please note that we'll need to specify NUnit 2 format for the test results file so that Bamboo is able to parse it. To do this, you can add the following:

```
--result=TestResults.xml;format=nunit2
```

Please don't hesitate to reach out if you have any other questions!

Thanks,

Elias \| Bamboo Support  
Atlassian


Tags: nunit
How can I clear the "broken plans" in My Bamboo dashboard?
Asked by Ivan David Almeida:

I have a problem on My Bamboo dashboard, as it shows that I have 1 broken plan, when it shouldn't. My Bamboo version is 6.4.0 build 60404

This is caused because I did have a broken plan, but it was a test plan while initially setting up a project properly. The plan has been removed subsequently, but it still shows up in the dashboard as a broken plan for my user (I was assigned the responsibility by default). When clicking the number 1, it goes nowhere and does nothing, as expected, because the plan doesn't exist.

Seems like the plan hasn't been deleted entirely and there are some remnants of it somewhere.

For some context, if it helps, I have Bamboo integrated with Bitbucket Cloud and Jira Software cloud.

Can someone please help with this?

Thanks!


Answers:
author: Bill Carreon
body: Hey Ivan,

It sounds like you're encountering this issue because of an invalid XML character. This documentation, [Cannot remove broken Bamboo plan - An invalid XML character](https://confluence.atlassian.com/bamkb/cannot-remove-broken-bamboo-plan-an-invalid-xml-character-302810135.html), provides log snippets to compare against for verification as well as the steps needed to resolve the issue.

comments: author: Ivan David Almeida
body: Hi, thanks for your answer, but it didn't match the issue.

I can't find the deleted job in these tables at all. To avoid confusion and make it clearer, I actually deleted the plan completely, and I still see that I have a "broken" plan in the dashboard, when I don't.

Thanks again!
Bamboo agent not starting as service in windows
Asked by Bharat Santhanam:

Hello

I did installed Babmoo agent on windows , idd exported all the required crt files .

when i try to run the services from services.msc it is not getting started but when i try do it with command line BAmbooAgent.bat it does work fine .

Could some one please advice me what would be the cause and how to get it fixed .

when starting with services i do see this error repeating but i never see those error when starting with CLI .

Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target


Answers:
author: Jeyanthan I
body: Hi Bharat,

If your Bamboo agent starts from the command line but not if you start it as a service and it throws *unable to find valid certification path to requested target*, then this probably means both are using a different JRE/JDK to run the agent, which in turn is typically caused by either one of the JAVA_HOME, JRE_HOME or PATH variables having different values for both.

If you've configured the service to run as Local System Account, you'll need to look at the System Environment Variables in Windows rather than the environment variables of your local user and make sure both use the same Java path where you have imported the certificate.
Get the requirements for a job
Asked by Torsten Stach:

For setting the correct path, we need the job requirements. Exist a plugin which export the job requirements?


Answers:
author: Torsten Stach
body: I know this page.

We need this information during the job execution.

We want to set the path dynamicaly.


author: Robert W
body: Hey Torsten,

For each **Stage** in a Build Plan, you can click on the **Requirements** tab to view the capabilities required to build that Stage.

From this screen, you can also view how many agents are available to build the stage.


Tags: requirement
Set up CHROME_BIN in bamboo server
Asked by Dennis Cheung:

Does anyone know how to set up CHROME_BIN in bamboo server? I have angular tests in a maven build but CHROME_BIN is not configured.


Answers:
author: Anonymous Coward
body: Simon says:

" You can either

1. Set the CHROME_BIN variable in the operating system environment

or

2. Use a Bamboo global variable (as defined here: <https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html>) to set it for all Bamboo plans.

"

I hope this helps.


Tags: chrome
How do I create versions and deploy via Bamboo REST API?
Asked by Alejandro Poggi:

I am following the guides posted on the Bamboo documentation, but hitting these endpoints do not work in Postman. Here is the guide I am using:

<https://developer.atlassian.com/server/bamboo/rest-api-deployment-triggers-for-bamboo/>

I get a response code of 415 - Unsupported Media Type, even though I am setting the content-type as application/json in the headers.

The API documentation below specifies an additional parameter for creating a version or release, but this does not change the outcome:

<https://docs.atlassian.com/atlassian-bamboo/REST/5.12.2/#d2e2023>


Answers:
author: Alexey Chystoprudov
body: Here're steps worked for me:

Create release

    curl -X POST 'http://localhost:9087/bamboo/rest/api/latest/deploy/project/7405569/version' -u admin:admin -H "Accepts: application/json" -H "Content-Type: application/json" -d '{"planResultKey" : "ACC-TST-9", "name" : "release-3"}' | jq '.'

The *name* field accepts plan variables in the following format:

|---------------------------|
| `${bamboo.variable.name}` |

**Example**

|------------------------------------------------------------------------------------------------|
| `{``"planResultKey"` `:` `"ACC-TST-9"``,` `"name"` `:` `"release-${bamboo.variable.name}"``}'` |

`Deploy release`

    curl -X POST 'http://localhost:9087/bamboo/rest/api/latest/queue/deployment/?environmentId=7536641&versionId=28803073%27 -u admin:admin -H "Accepts: application/json" | jq '.'

comments: author: Venkat Pasula
body: [@Alexey Chystoprudov](/t5/user/viewprofilepage/user-id/781646),

I am running into issues when I am trying Deploy a release using Bamboo REST API.

Command

```
curl -X POST 'https://myhost/rest/api/latest/queue/deployment/?environmentId=12345&versionId=ABC_XYZ-1.0.0-123' -u user:password
```

**Error:**

\<html\>  
\<head\>  
\<title\>Page not found\</title\>  
\</head\>\<body\>  
\<h1\>Page not found\</h1\>  
\<p\>  
Sorry, the page you were trying to reach does not exist. Try going back to the dashboard and browse the site to find the page you were looking for. \</p\>  
\<h4\>Go to...\</h4\>  
\<ul\>  
\<li\>\<a href="/"\>Site homepage\</a\>\</li\>  
\</ul\>  
\</body\>


Tags: rest-api
Bamboo support for repository replication
Asked by Terry Lim:

We have a remote site and SVN replication setup between sites. I am considering using a remote agent, but I don't know if Bamboo supports a different URL depending on the agent that is running. In other words I want the same job / deployments to run, but with a different SVN repository root URL depending on which agent is being used.


Answers:
author: Sergey Podobry _Stellarity Software_
body: You can override SVN sever IP address in the hosts file on the agent and point it to your SVN mirror. So the URL will be the same but IP addresses will be different.

comments: author: Terry Lim
body: Thanks, that sounds like a good solution!