youngmon/atlassian-qna huggingface dataset:
Can we disable logging levels display for a particular plan in bamboo
Asked by Poojatr:

In the logs tab present in the Build details of a run. the logs shows SIMPLE, BUILD, ERROR for each type of command ran, Can we disable the display of logging type (i.e SIMPLE,ERROR) for just one particular plan


Answers:
author: Daniel Santos
body: Hi [@Poojatr](/t5/user/viewprofilepage/user-id/2812306)

The logging levels for builds are hardcoded in Bamboo. The global log settings configuration (**Admin \>\> Overview \>\> Log settings**) will also affect the build results, but they cannot be configured just for a specific plan. Some of the build results are parsed from server logs which are affected by the global configuration I shared before.

* Is there a special type of problem you are trying to solve?
* Do you think this is a common problem that requires a new feature in Bamboo?  
  I'm asking this one because I was not able to find a feature request covering this topic in our system.

Let me know if you want me to create a feature request for this.

comments: author: Poojatr
body: Hi [@Daniel Santos](/t5/user/viewprofilepage/user-id/502125) ,  

<br />

I am parsing a python script (It has few shell commands ) , which will run few commands and evaluate these results, But Bamboo logs are wrongly classifying the output of these python commands as ERROR  

Thank you


author: Daniel Santos
body: Hi [@Poojatr](/t5/user/viewprofilepage/user-id/2812306)

Can you share a small example that I could reproduce locally to understand what is happening?
How to create a custom web render plugin on build result?
Asked by Valentine Goh:

I'm trying to create a bamboo plugin where it will have a new tab (Progress) on the build result. In that tab, the content will render the html specified on the artifact path in the plan while the build is ***In Progress and Complete***. The content will refresh based on specified duration.

I know that the artifact will only be available after the build is completed but I was wondering if it's possible for the plugin to access the content directly based on the artifact path?

I'm open to suggestions as long as the content can be render on the build result and the content can be retrieve from the artifact path while the build is ***In Progress and Complete***.


Answers:
author: Rafael Pinto Sperafico
body: Hi [@Valentine Goh](/t5/user/viewprofilepage/user-id/3546560) ,

Based on your description, you could try and read the artifact definition in your JOB from Build Working Directory whilst the build is running and once the build is complete swap to the artifacts directory.

Please, review <https://confluence.atlassian.com/bamboo/artifact-handlers-938641848.html> when implementing your plugin.

Kind regards,  
Rafael

comments: author: Valentine Goh
body: Hi [@Rafael Pinto Sperafico](/t5/user/viewprofilepage/user-id/2904254),

Thank you for the suggestion. I'll have a look.

Kind regards,

Valentine


Tags: bamboo-development

developer
sending email with artifact as an attachement
Asked by Sree Kalyani:

HI Team,

I have a build which will generate an artifact for each commit, I would like to email this artifact present in Artifact tab of successful build to committer who has committed the code or list of developers, please help me in this.

Thanks

Kalyani


Answers:
author: Daniel Santos
body: Hi [@Sree Kalyani](/t5/user/viewprofilepage/user-id/1570331)

Bamboo does not have a feature for this out of the box, but I shared a workaround in a different thread that seems to be applicable here.  

Please check: [Send email notifications to list generate list generated by job - Atlassian Community.](https://community.atlassian.com/t5/Bamboo-questions/Bamboo-Send-email-notifications-to-list-generated-by-job/qaq-p/1032755?utm_source=atlcomm&utm_medium=email&utm_campaign=answer_accepted_as_solution&utm_content=topic)

The command mentioned there is **mutt** and it supports attachments, which is why I think this approach could work for you.   

In that thread, you will also find a feature request for the email task that could solve this issue if implemented.  

I hope it helps.
Is there anyway to trigger the Bamboo deployment project (on schedule) with a specific release?
Asked by Vinod Kumar:

I have a Bamboo build plan with a deployment project. Currently, the deployment happens manually and we can select the specific release version to be deployed on the server (using the dropdown field selection). Now, if I add the trigger (on schedule), I believe, it always picks up the latest release version. My requirement is to schedule the deployment project and do the deployment based on the specific release version which is required for the deployment \& not necessarily be the latest one.  
I tried to call the Bamboo using the REST API curl like below by passing the environmentid and versionid:-  
curl -X POST 'http://localhost:8085/rest/api/latest/queue/deployment/?environmentId=1212417\&versionId=1310721' -u admin:admin -H "Accepts: application/json"  
(please assume, the versionId given as '1310721' is 'release-2'). When I executed the REST call, it did the deployment for this release-2 but when the scheduler executed the deployment project, it again took the latest release version which was 'release-3' and not 'release-2'.  
Is there any way to tell the Bamboo, okay, this is the release version which needs to be deployed automatically during the on-scheduled deployment trigger. and if the value (release version) is not given let it pick the latest release version.  
Cheers


Answers:
author: Rafael Pinto Sperafico
body: Hi [@Vinod Kumar](/t5/user/viewprofilepage/user-id/3543188) ,

The schedule trigger will trigger a deployment based on the latest successful build. If you want to have a schedule trigger based on certain condition(s), you should create a CRON job / Script consuming the REST API as you did (*this outside of Bamboo*)

If you are looking to have this schedule in Bamboo, then you would be looking at developing a plugin for Bamboo - <https://developer.atlassian.com/server/bamboo/>

Kind regards,  
Rafael

comments: author: Vinod Kumar
body: Thanks, for time being to close the requirement, I will stick to writing a cron job. However, the idea of plugin is great and would really be looking forward to develop one.

Cheers
Bamboo REST API: Not returning XML responses
Asked by steven_green:

Using Postman I'm trying to get Bamboo REST API calls to return in XML format, however the server replies with a 406 Not Acceptable response. Following the documentation [here](https://developer.atlassian.com/server/bamboo/using-the-bamboo-rest-apis/) I'm sending an Accept header with the value "application/xml".

If I make the same call either omitting the header or specifying "application/json" I get the expected JSON response.

I couldn't find any API-related settings in the Bamboo admin menu, nor any documentation suggesting XML responses had been deprecated or removed.

What am I missing?

Example request headers:

```
GET /rest/api/latest/deploy/environment/207781962/results HTTP/1.1
Host: bamboo.wnet.local
Accept: application/xml
Authorization: Basic #############
User-Agent: PostmanRuntime/7.15.2
Cache-Control: no-cache
Postman-Token: 0dd05a32-15f4-4266-8282-490a8c8a56cb,98cdb200-3739-4bbf-a2bb-582c50ce4d29
Host: bamboo.wnet.local
Cookie: JSESSIONID=07BC7073BEE94B1828AEAD37BAD23A76
Accept-Encoding: gzip, deflate
Connection: keep-alive
cache-control: no-cache
```

Bamboo Server version: 6.8.1


Answers:
author: Rafael Pinto Sperafico
body: Hi [@steven_green](/t5/user/viewprofilepage/user-id/798313) ,

I am afraid this REST API endpoint will *only* provide you a JSON response as its implementation only produces JSON and not XML:

```
@Path(RestConstants.DEPLOYMENT_ENDPOINT + "/" + RestConstants.ENVIRONMENT)
@Consumes({MediaType.APPLICATION_JSON})
@Produces({MediaType.APPLICATION_JSON})
@Singleton
public class DeploymentEnvironmentResource {
...

/**
 * Provide list of versions deployed to environment
 *
...
@GET
@Path("{environmentId}/results")
public RestDeploymentResultList getDeploymentResultList(
```

The same information is available on Bamboo's REST API documentation - <https://docs.atlassian.com/atlassian-bamboo/REST/6.8.1/>

![Screenshot 2019-08-31 at 11.49.34.png](https://community.atlassian.com/t5/image/serverpage/image-id/64887iD0983FBA960B2B3D/image-dimensions/442x310?v=v2 "Screenshot 2019-08-31 at 11.49.34.png")

Kind regards,  
Rafael

comments: author: steven_green
body: Ah yes, I must have skimmed past this part of the preamble: "**If not otherwise indicated**, all methods return both XML and JSON."

What threw me off was that if you expand the section highlighted in your screenshot the example response is in XML.

Thanks for your answer, I'll mark it as accepted.

Cheers,  
Steve


Tags: api

rest-api
permission issue to view trigger task
Asked by Muktheshwar N:

user not able to view trigger task created by others even though he is having admin on plan level, encountering permission issue.


Answers:
author: Rafael Pinto Sperafico
body: Hi [@Muktheshwar N](/t5/user/viewprofilepage/user-id/3483775) ,

Could you please provide more information on:

* what do you mean by trigger task?
* where the trigger is being configured (*plan* or *environment*)?
* what is the Bamboo version you are experiencing this issue?

It is important to notice that if a user wants to run a plan / stage / job - BUILD permission is required. Whereas if user wants to run an environment - DEPLOY permission is required.

<https://confluence.atlassian.com/bamboo/bamboo-permissions-369296034.html>

Kind regards,  
Rafael
Bamboo Task Definition for Branches
Asked by catalinvr:

Hi team,

I want to run a different task when I'm executing builds from another branch than \`master\`.

I have a default list of tasks that runs every time a commit is made on \`master\` and that works great.

Now, I started to test the "Branches" feature and I would like to be able to run a different Task for all branches. Do you know to be a possibility or should I create a new plan in this situation?

Thank you


Answers:
author: Rafael Pinto Sperafico
body: Hi [@catalinvr](/t5/user/viewprofilepage/user-id/3544393) ,

If you want to have different tasks to be executed based on branch, then you should convert all subsequent task of "*Source Code Checkout* " to a Script task, in which you could evaluate if the repository branch is master or not - *bamboo.planRepository.\<position\>.branchName* - <https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html>

However, it would be preferable and best practises creating a different plan.

Kind regards,  
Rafael

comments: author: Rafael Pinto Sperafico
body: There is a Suggestion <https://jira.atlassian.com/browse/BAM-19620> - **Bamboo should support divergent plan branches** , with its status *In Progress*. Whilst this feature is not ready, previous comment should be used.


author: catalinvr
body: Thank you so much [@Rafael Pinto Sperafico](/t5/user/viewprofilepage/user-id/2904254) :)


Tags: branch
Can I change the BitBucket API used?
Asked by Andrew Clark:

I'm using Bamboo 5.8.1 and have recently tried to integrate with Bitbucket. This is the error I get when trying to enumerate the repositories:

Failed to load data from Bitbucket. com.atlassian.bamboo.plugins.hg.bitbucket.api.BitbucketApiException: {"type": "error", "error": {"message": "Resource removed", "detail": "This API is no longer supported.\\n\\nFor information about its removal, please refer to the deprecation notice at: <https://developer.atlassian.com/cloud/bitbucket/deprecation-notice-v1-apis/>"}}

Is there any way to make this version of Bamboo use the Bitbucket v2 API short of upgrading the former?


Answers:
author: Rafael Pinto Sperafico
body: Hi [@Andrew Clark](/t5/user/viewprofilepage/user-id/3543987) ,

Bitbucket v2 API was announced in 2018 - <https://bitbucket.org/blog/new-bitbucket-cloud-v2-apis> whereas Bamboo v5.8 is from 2015 - <https://confluence.atlassian.com/bamboo/bamboo-5-8-release-notes-705792391.html>. Perhaps you should considering upgrading Bamboo to a most recent version so the chances of incompatibilities with dependencies will be much lower.

Bamboo v5.8.1 is quite an old version. In the same way it is no longer a supported version as described in <https://confluence.atlassian.com/support/atlassian-support-end-of-life-policy-201851003.html>

At the same time, the error above suggests you were trying to fetch something related to Mercurial. It is important to notice that Atlassian already announced removing Mercurial from Bitbucket Cloud next year (2020) - <https://confluence.atlassian.com/bitbucket/end-of-support-announcements-for-bitbucket-cloud-833985475.html>

Kind regards,  
Rafael


author: Alexey Chystoprudov
body: If Bamboo upgrade is not at your plans, switch to Git/Mercurial repository type and provide connections details from Bitbucket Cloud


Tags: bitbucket

bitbucket-server

server
Not able to find "Comment a build" plugin on bamboo v6.9
Asked by Hari Yerragunta:

I am trying to find an app "Comment a build" that was available on v6.7 but not in v6.9

Wondering has this been renamed to something else or completely removed this plugin? thank you


Answers:
author: Rafael Pinto Sperafico
body: Hi Hari,

If you are referring to [Build Comments task for Bamboo](https://marketplace.atlassian.com/apps/1217326/build-comments-task-for-bamboo?hosting=server&tab=overview "Build Comments task for Bamboo"), you could get in touch with the plugin vendor from <https://marketplace.atlassian.com/vendors/1214658/cintia-dr> asking to publish a new version or bump the plugin version or Atlassian Marketplace.

Perhaps, you could make use of [Working with comments](https://confluence.atlassian.com/bamboo/working-with-comments-289276908.html "Working with comments") bundle feature at some extent, whilst the 3rd party plugin is not updated.

Kind regards,  
Rafael
Using Bamboo Dashboard Just to show results from Jenkins Builds and JUnit Tests
Asked by Andrecarlossilva:

I am doing a POC here in the company, now we have the scenario described below:

* I already have a Jenkins job that builds my application (it is connected to my stash repository, so I already know what are the commits involved in the builds).
* After the builds job, we have a test job (separated and triggered by the first job) that starts an application that we wrote in the past to run the tests. The output of this application is JUnit XML files for each test.

What I would like to do in the first step of the POC:

* Just have the information consolidated in Bamboo on a Dashboard. I would like that the Jenkins job sent to Bamboo in the first job the result of the build, with the commits related and so on. Moreover, the second job can trigger Bamboo to parse the JUnit XML Files.

Any ideas to do it? I am starting using Bamboo...


Answers:
author: Rafael Pinto Sperafico
body: Hi [@Andrecarlossilva](/t5/user/viewprofilepage/user-id/3542196) ,

What you see in Bamboo's dashboards is something that Bamboo has produced.

If you want to have external data displayed in Bamboo's Dashboard you would need to fetch data from Jenkins (e.g job result, junit test results ...) and make it available in Bamboo through a plugin. In other words, you would need to build a plugin using Atlassian SDK.

If you have all the means to develop a plugin for Bamboo to this purpose, please find the necessary information on how to work with Atlassian SDK on [Getting started](https://developer.atlassian.com/server/framework/atlassian-sdk/ "Getting started")

Alternatively, you could consider [Importing data from Jenkins](https://confluence.atlassian.com/bamboo/importing-data-from-jenkins-317949257.html "Importing data from Jenkins") and for this particular build, having it executed in Bamboo and not in Jenkins, so all the information you require would be available in Bamboo's Dashboard already.

Kind regards,  
Rafael

comments: author: Andrecarlossilva
body: I understand Rafael,

I will try to find a plugin in Jenkins that integrates with Bamboo...

Do you know if I import data from Jenkins, I will have all the history of builds that Jenkins did previously?


author: Rafael Pinto Sperafico
body: Hi [@Andrecarlossilva](/t5/user/viewprofilepage/user-id/3542196) ,

Jenkins build history is kept in Jenkins. Once you run the import in Bamboo, you will start from the beginning, e.g no build triggered, build 1, 2, 3, 4... and so on.

You can find more information on Import data from Jenkins on <https://www.youtube.com/watch?v=9SGWRWcJTyA>

Kind regards,  
Rafael
Bamboo Deployment Timeout
Asked by Subhi Andrews:

We have a situation where we invoke Ansible Playbook command from Bamboo Deployment and on rare occasions, it just waits on one of the steps in the playbook, forever. Since the Deployment never fails or succeed, we don't get notifications. Things get queued for that Deployment environment we don't notice until there's some error or failure in Production.   

It seems there's a timeout available for Build jobs that are based on the history of how long it takes to complete the plan. Is there something similar available for Deployment Environments? How can I potentially solve this problem?


Answers:
author: Daniel Santos
body: Hi [@Subhi Andrews](/t5/user/viewprofilepage/user-id/191872)

I'll make some assumptions here:  
You are running the build in a Unix-like remote agent  
You are running the Ansible Playbook command from a script task.

**Possible solution**

* Use the command **timeout**to define the maximum time you think the Ansible Playbook could take and still succeed.
* Add the option **set -e** at the beginning of your script task. That will make the build fail for any command returning an error, including the result of *timeout* command when it kills a command after reaching the max time defined.

**Example**

```
timeout -k 30 <TIME> <ANSIBLE_COMMAND>
```

In case of timeout, the command above will send to Ansible the *SIGTERM* and if the command stays running for 60s more, then it will send the *SIGKILL.*

<br />

I hope this helps.

comments: author: Subhi Andrews
body: We have added ansible-playbook as a capability and calling it has a command instead of a script. Is there a solution for that? Since we might have to make changes in many different jobs?


author: Daniel Santos
body: Hi [@Subhi Andrews](/t5/user/viewprofilepage/user-id/191872)

yes, you can use the [Build monitoring](https://confluence.atlassian.com/bamboo/build-monitoring-289277186.html) feature, but that will consider the whole build time and will not work on local agents.

If you use remote agents that should work fine. =\]
Bamboo remote agent is recording events in the windows event listener
Asked by daneshrao:

MY bamboo remote agent is always recording an event in the windows events viewer, can you please let me know why is this happening and how the remote agent is communicating to Master machine


Answers:
author: Daniel Santos
body: Hello [@daneshrao](/t5/user/viewprofilepage/user-id/3148394)  

I'll need to get a little bit more details to request our developers to check this.

* Can you share what is the event message you have?

Any extra details will help us to address this better.


Tags: remote-agent

windows
Bamboo not triggering build for branches when code is pushed to stash
Asked by SheshaChandra:

I have a bamboo plan with linked repositories and the builds are triggered with **Remote Trigger**. The builds are kicked off whenever a code is pushed to stash.

Now, I created 2 more branches in the plan as *feature1* and *feature2* . Both the branches are sharing the same repositories and trigger as *master.*Whenever the code is pushed into stash, I see that a build is kicked off in all the plans which is as expected.

From past few days, I'm seeing an issue where a build is kicked off for the *master* and *feature1* and not for *feature2* branch. The *feature2* branch is not detecting the changes from stash where as *feature1* and *master* detects the changes and a build will be kicked off. When I kickoff a manual run for the *feature2* branch I can see the commits(under commits tab).

WorkAround -\> If the bamboo is restarted the issue will be resolved but I hit the same issue after few days. And we don't want to restart the bamboo every time we see this issue.

Can anyone suggest a solution for this problem or a better workaround?

Thanks in advance.


Answers:
author: Rafael Pinto Sperafico
body: Hi [@SheshaChandra](/t5/user/viewprofilepage/user-id/3539307) ,

If you want to troubleshoot the issue, you need to identify:

* the URL you are using in Bitbucket Server (*formerly Stash*) as a webhook.
* check in logs if POST event happened - more information on <https://confluence.atlassian.com/bamkb/git-repository-remote-trigger-859500786.html>
* enable DEBUG logging on (*com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager, com.atlassian.bamboo.plugins.git.GitCommandProcessor*) in Bamboo if POST event exists

If you are using Bamboo and Stash (Bitbucket Server), you should be considering replacing your repository configuration in Bamboo from Git to Bitbucket Server. By doing it so, you would benefit from Application Link between the two application.

When you create a plan that uses a Bitbucket Server repository as Host, Bamboo uses the '*Bitbucket repository triggers the build when changes are committed*' trigger option by default. If the plan already exists, you need to configure the trigger manually.

In other words, when a commit is made to your repository in Bitbucket Server, Bitbucket will check if there is an Application Link with Bamboo. If so, it will get the URL defined in the application and send a POST event to Bamboo notifying it about changes in repository.

If Bamboo has a plan that consumes the repository in question and the trigger '*Bitbucket repository triggers the build when changes are committed* ' is defined, Bamboo will act on the event received triggering a new build (*if configuration is met*).

Just for the record, what is the Bitbucket Server (*formerly Stash*) and Bamboo versions you are running? This information helps on narrowing down issues ;)

Kind regards,  
Rafael
TLS handshake issue
Asked by yche276:

Our bamboo server has two ports for https connection which are 443 and 8443. I used curl to test the connection. 8443 works as expected, the tls connection can be established but not 443. the tls handshake failed at the server hello stage.

when I send the request through port 443. I have this error.

\* ALPN, offering h2  
\* ALPN, offering http/1.1  
\* Cipher selection: some string  
\* successfully set certificate verify locations:  
\* CAfile: path to pem file  
CApath: none  
\* TLSv1.2 (OUT), TLS handshake, Client hello (1):  
\* error:1400410B:SSL routines:CONNECT_CR_SRVR_HELLO:wrong version number  
\* stopped the pause stream!  
\* Closing connection 0  
curl: (35) error:1400410B:SSL routines:CONNECT_CR_SRVR_HELLO:wrong version number

any ideas for troubleshooting? thanks in advance!


Answers:
author: Daniel Eads
body: Hey there!

This is likely a misconfiguration at your reverse proxy. You've got http/2 enabled so I'm guessing it's either nginx or Apache. Would you be able to post the configuration for the reverse proxy? Blank out your server name and certificates for sure but it would be helpful to see what cyphers you've got enabled.

Given the test against 8443 went ok though, looks like you've got Bamboo configured correctly! I'm hoping we can get that reverse proxy sorted out for you :)

Cheers,  
Daniel