youngmon/atlassian-qna huggingface dataset:
bamboo server monitoring
Asked by Neeraj Singh:

Hi,

We want some monitoring mechanisms to check the following?

1.No of agent connected at the moment?

2.Is the Bamboo server is accessible or not


Answers:
author: Steffen Opel _Utoolity_
body: You can use the [Bamboo REST API](https://docs.atlassian.com/atlassian-bamboo/REST/latest/) to achieve 1 in a similar fashion via a GET [/agent?online](https://docs.atlassian.com/atlassian-bamboo/REST/6.10.3/#d2e1129) call:
>
> ```
> Provides a list of all agents. Use query parameter "online = true/false" 
> to filter only online agents.
> ```

So something along the lines of (top of my head):

```
curl --user username:password -H "Accept: application/json" \
   https://example.com/bamboo/rest/api/latest/agent | jq '. | length'
```

**Update**

Here's a more specific example to confirm my memory (based on [HTTPie](https://httpie.org/) rather than cURL).

Initially there are 2 local and 0 remote agents:

```
? http -a user:pass http://example.com/bamboo/rest/api/latest/agent | jq '. | length'
2
? http -a user:pass http://example.com/bamboo/rest/api/latest/agent/remote | jq '. | length'
0

```

I've then started 2 elastic agents in addition to the 2 local ones, which yield 4 agents overall:

```
? http -a user:pass http://example.com/bamboo/rest/api/latest/agent | jq '. | length'
4
? http -a user:pass http://example.com/bamboo/rest/api/latest/agent/remote | jq '. | length'
2
```

Terminating 1 elastic agent yields the expected outcome too:

```
? http -a user:pass http://example.com/bamboo/rest/api/latest/agent | jq '. | length'
3
? http -a user:pass http://example.com/bamboo/rest/api/latest/agent/remote | jq '. | length'
1
```

comments: author: Neeraj Singh
body: Currently, I am doing this way

curl --user adminuser:password <https://bamboo.com/bamboo/reconfigureVirtualAgents.action> \| grep -o '\<p\>Available remote agent slots'

I will try your suggested approach as well.


author: Neeraj Singh
body: @ Steffen: Yours suggested that doesn't fulfill my requirement.I guess I put the wrong question.

I have a license of x agents,I want to check how many agents are online at the moment so that I can plan my activities accordingly.


author: Steffen Opel _Utoolity_
body: [@Neeraj Singh](/t5/user/viewprofilepage/user-id/3618630) - I'm afraid I don't t really get what you are asking for here. I've updated my answer with a more specific example to confirm my memory, and it seems to yield the expected result by telling me how many agents are currently available - is this not the 'No of agent connected at the moment' that you are looking for?


author: Neeraj Singh
body: [@Steffen Opel _Utoolity_](/t5/user/viewprofilepage/user-id/781567)Thanks for your knowledge sharing.It was great and helpful


author: Neeraj Singh
body: 2. Done with following command

curl --user username:password -H "Accept: application/json" \[<https://bamboo.com/bamboo/rest/api/latest/server> \| jq .state


Tags: agent
Connection refused on AWS ubuntu server
Asked by Abdullah Fasih:

I have downloaded bamboo on an ubuntu aws server and created a bamboo home directory

++If you encounter issues starting or stopping Bamboo Server, please see the Troubleshooting guide at++ <https://confluence.atlassian.com/display/BAMBOO/Installing+and+upgrading+Bamboo>

++Using CATALINA_BASE: /home/cipipeline/atlassian-bamboo-6.10.3++   
++Using CATALINA_HOME: /home/cipipeline/atlassian-bamboo-6.10.3++   
++Using CATALINA_TMPDIR: /home/cipipeline/atlassian-bamboo-6.10.3/temp++   
++Using JRE_HOME: /usr++   
++Using CLASSPATH: /home/cipipeline/atlassian-bamboo-6.10.3/bin/bootstrap.jar:/home/cipipeline/atlassian-bamboo-6.10.3/bin/tomcat-juli.jar++   
++Tomcat started.++

i have JAVA_HOME after installation

set the bamboo home directory to an empty bamboo folder

and ran the start-bamboo.sh command which gave the underlined output above

i have port 8085 open. Connection is always refused i even turned off my proxy


Answers:
author: Daniel Santos
body: Hi [@Abdullah Fasih](/t5/user/viewprofilepage/user-id/3618150)

I see two possible reasons for a connection refused from what you describe:

1. The Bamboo server is not up and running. Maybe it crashed during the startup or was not able to bind with the 8085 port.
2. The port is still closed somehow.

Suggested troubleshooting steps:

* For number (1):
  * Check if the Bamboo process is still running
  * Check if you can **telnet** the server using the server terminal or even try to download the Bamboo startup/wizard page with **wget.**This will allow you to know if Bamboo is accepting connections from the server itself.
  * Check the server logs at **\<Bamboo_Install\>/logs/catalina.out** to identify if there are any errors regarding the port binding.   

* For number (2)  
  * For this one, you could use **nc** command (by running a server \<-\> client connection:  
    * On the server-side run:  
      ??make sure the Bamboo process is stopped  

      ```
      nc -l 8085
      ```

    * On the client-side run:  

      ```
      nc bamboo-server-address 8085
      ```

      <br />

      If the connection is established, you should be able to send text strings from one side to another. This should validate the network configuration.

I hope the suggestions above will help us to understand what is causing this issue.

Ah, one last thing, check if you are using JAVA 1.8 in your AWS server.

comments: author: Abdullah Fasih
body: 11 I guess that was the problem for me Thank you


author: Daniel Santos
body: Got it, the Java version was wrong. =\]  
I'm glad you found the issue.  
Have a good one!
Testing Bamboo plugin with Selenium
Asked by Sebastian_Knopp:

Hi,

i've written a first small plugin which implements a simple WebPanel by velocity template with some conditions. Now i want to test that those conditions work as expected. Because they were implemented in the template file i believe i'll need something like Selenium to test the real output.

What would be the best way to do that? I've found [something similar for Jira here](https://community.atlassian.com/t5/Agile-articles/How-to-write-integration-tests-for-Atlassian-Jira-jira-func-test/ba-p/915593). They have a 'jira-func-test-plugin' which implements some nice test classes with selenium under the hood. Is there something like that for bamboo too?

I'm looking for a good starting point for this kind of tests.

Thanks in advance for your help!

-----

**Update:** I've now tried to implement it myself like one would do it normally with Selenium. I added a setter to my test class to get the GeneralConfiguration and from that the baseURL of Bamboo (using [GeneralConfiguration.getBaseUrl()](https://docs.atlassian.com/atlassian-bamboo/6.10.3/com/atlassian/bamboo/admin/configuration/GeneralConfiguration.html#getBaseUrl--)).

```
package it.mypackage.path.package;

import com.atlassian.bamboo.admin.configuration.GeneralConfiguration;
import com.atlassian.bamboo.admin.configuration.GeneralConfigurationService;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

import java.net.URISyntaxException;

public class BuildResultSeleniumTest {

 private WebDriver driver;
 private GeneralConfiguration generalConfiguration;

 public BuildResultSeleniumTest(){
    driver = new FirefoxDriver();
 }

 public void setGeneralConfigurationService(GeneralConfigurationService generalConfigurationService){
    try {
        this.generalConfiguration = generalConfigurationService.getGeneralConfiguration();
    } catch (URISyntaxException e) {
        e.printStackTrace();
    }
}

 @Test
 public void testImagePresentForCuedBuild(){
    String address = (String) generalConfiguration.getBaseUrl();
    System.out.println("Address: " + address);
    driver.get(address);
 }
}
```

As described [here](https://developer.atlassian.com/server/bamboo/accessing-bamboo-components-from-plugin-modules/), Injection should work like that.

Unfortunately the variable 'address' remains NULL, so injection seems not work for tests. How do i get the baseURL in a test?


Answers:
author: Sebastian_Knopp
body: It showed out, that i was missing the correct constructor parameters.

The following worked for me:

```
    private String baseUrl;    public BuildResultSeleniumTest(ApplicationProperties applicationProperties,                                   MyPluginComponent pluginComponent){        this.applicationProperties = applicationProperties;        this.pluginComponent = pluginComponent;        this.baseUrl = applicationProperties.getBaseUrl(UrlMode.ABSOLUTE);    }
```

After that i was able to implement Selenium tests as usual..


Tags: bamboo-app

selenium

test
ENV variable to be used in task script argument
Asked by zzzz:

Dear Atlassian,

I have a custom variable

```
key: [executable.bamboo.test] value: [thisisatest] type: ENVIRONMENT
```

I want to use it in a deployment task as argument to a powershell script

-ConnectionURL ${executable.bamboo.test}

However, it looks it's not set yet or I used it wrong way.

What's interesting, if I dump all varialbles inside the script, I can see it's set.

Most probably I'm doing something wrong. It looks that ENV variable is not accessible to be used in scripts arguments. Other variables are fine, I mean global or build variables.

I appreciate you help.

Kind Regards


Answers:
author: zzzz
body: ok, guys, I finally realized that prefix bamboo is always required for variables.

cheers

comments: author: Jimmy Seddon
body: Hi [@zzzz](/t5/user/viewprofilepage/user-id/1084463),

I'm glad you were able to figure it out on your own! I was just logging in to tell you the same.

-Jimmy
Docker plugin fail task but avoid plugin exception
Asked by Chris Mitchell:

I currently use docker plugin as part of my build process in bamboo.

When the executable called by the docker plugin exits with a non-zero status, the docker plugin throws an exception. This means the end of the build logs contain the irrelevant docker plugin stack trace rather than the important detail of what has failed ie the output from the task run within the docker plugin

All of our builds are returning some status like "Error occurred while running Task 'Deploy(5)' of type com.atlassian.bamboo.plugins.bamboo-docker-plugin:task.docker.cli."

Is there some way to control the output of the docker plugin easily that would prevent the stack trace output?

Is there an approach that tasks within docker plugin should take to signal outcome (success or failure \& reason)?

I tried to include an example of the stack trace i want to get rid of but apparently that was enough to get marked as spam


Answers:
author: Daniel Santos
body: Hi [@Chris Mitchell](/t5/user/viewprofilepage/user-id/1046507)

I just ran some tests locally and was able to reproduce the scenario you've experienced. I even found an improvement request about it in our issue tracker.

* [\[BAM-18745\] Can't see docker command errors when use Docker task](https://jira.atlassian.com/browse/BAM-18745)  

> Is there some way to control the output of the docker plugin easily that would prevent the stack trace output?

Not if you keep using the Docker task.   
> Is there an approach that tasks within docker plugin should take to signal outcome (success or failure \& reason)?

Maybe if you use a script and treat the errors, but that doesn't sound like a good plan.  

**Moving forward**

I see two options to overcome this issue:

* Adjust your build to use [Docker Runner](https://confluence.atlassian.com/bamboo/docker-runner-946020207.html) instead.  
  It will return the error from the commands run, not from Docker itself.
* Use a script task with docker commands instead of the docker task.

I hope that allows you to move forward.
Does bamboo stores copy of scripts? Script History?
Asked by Alberto Pineda:

I made multiple improvements and changes to the deployment power-shell script.

If I wanted to see what changes I made, or if I break the script I would like to have a place to see the history of the scripts created/updated in bamboo for a deployment?


Answers:
author: Alexey Chystoprudov
body: There's another way to keep script code in repo and don't use Bamboo Specs.

Just checkout repo with script as part of your build/deployment and then script task call it from file. This way your team don't forget to modify script code as it will be stored at single place

comments: author: Alberto Pineda
body: I ended up using this approach, it was a bit annoying that had to pass all the bamboo variables that I needed via **Environment Variables**


author: Milos Zikmund (MoroSystems)
body: Hi Alberto,

this isn't exact answer for your question but take a look to Bamboo specs here <https://confluence.atlassian.com/bamboo/bamboo-specs-894743906.html>. It's a way how to configure your Bamboo builds as a code so you can have it as part of your app in source control.

Greetings,

M.

comments: author: Alberto Pineda
body: Thanks for the quick responses (To everyone), I created a ticket to review this alternative in a few weeks.


author: Alberto Pineda
body: I didn't see a way, so I'm storing a copy of the scripts in source control. But I fear that me or other team members will forget to update the source control files.

comments: author: Jimmy Seddon
body: Hi [@Alberto Pineda](/t5/user/viewprofilepage/user-id/3138113),

As [@Milos Zikmund (MoroSystems)](/t5/user/viewprofilepage/user-id/726701) has mentioned if you enable repository scanned Bamboo Specs. More information here: <https://confluence.atlassian.com/bamboo/enabling-repository-stored-bamboo-specs-938641941.html>

That will force you to use the version stored in source control to make changes so you will never have to worry about forgetting to update source control, it also gives you a 100% versioned copy of your configuration so you know what has been changed.

I hope that helps!

-Jimmy


Tags: deployment

script
Does bamboo support Oracle 12.2 ?
Asked by Alexander Garcia:

Does bamboo version 6.4 or higher support Oracle 12.2 (12cR2) ? THe supported platforms page says 12c but does that also include 12.2? If not, are there current plans to do so?


Answers:
author: Jimmy Seddon
body: Hi [@Alexander Garcia](/t5/user/viewprofilepage/user-id/2608188),

I jumped ahead a couple of versions and the only time 12cR2 is mentioned is in the 6.10 supported platforms document where it is still supported but R1 is being deprecated.

Given it's a minor patch release I'd be inclined to think it should be supported.
Don't fail task if Junit Test Results are not found
Asked by schow-lmi3d:

Is there a way to allow JunitTest Results Task to not fail if no test results are found?


Answers:
author: Jimmy Seddon
body: Hi [@schow-lmi3d](/t5/user/viewprofilepage/user-id/2182869),

I don't believe this is an option without disabling/removing the JUnit Parser task from the Build plan.

At the same time, I believe the main purpose behind this is that if it can't find the test results the assumption is that something went wrong with the way they were executed, or the build plan has been incorrectly configured when it comes to the location of those results.

If you really don't care about the results being displayed in the build maybe removing the task might be the best option for you.

comments: author: schow-lmi3d
body: I do care about the results being displayed but I also want the option to not care at the same time.  

The reason is because I wanted to add a variable that controlled if a set of test run or not. In the script task that starts the test runner, I added an if statement that runs the tests if the variable is equal to a certain value and not run otherwise. The problem I'm facing is that the junit parser always fails the job if tests are not found...   

Is there another way of doing this?


author: Jimmy Seddon
body: Hi [@schow-lmi3d](/t5/user/viewprofilepage/user-id/2182869),

If you check out the answer here: <https://community.atlassian.com/t5/Bamboo-questions/Conditionally-Skip-Tasks-in-Bamboo-Build/qaq-p/259368>

You'll see the suggestion from the Atlassian team indicated that this is not possible today, but there is an open feature request for this: <https://jira.atlassian.com/browse/BAM-11257>
Using Docker in Bamboo Container
Asked by Mirko Nell:

Is it possible to add the Docker-capability in Bamboo, when Bamboo is running as a Docker Container? If so, how? The tutorial just describes the native installation...


Answers:
author: Daniel Santos
body: Hi [@Mirko Nell](/t5/user/viewprofilepage/user-id/1589718)

I've answered this question in the following post, please take a moment to check it:

* [Solved: Does bamboo offer docker capabilities if it is itself deployed through docker?](https://community.atlassian.com/t5/Bamboo-questions/Does-bamboo-offer-docker-capabilities-if-it-is-itself-deployed/qaq-p/1029450?utm_source=atlcomm&utm_medium=email&utm_campaign=kudos_answer&utm_content=topic)

Long story short, you will need to restrict the builds using docker tasks to **remote agents** keeping in mind that they should be native processes. This way they will be able to spin docker containers.   

I hope that makes sense.


Tags: docker
Email set to jira@diptyqueparis.atlassian.net not received as comment in our tickets
Asked by Emma d'Imbleval:

Hi,

Working on our project Diptyque Americas (KEY - DIPAME, <https://diptyqueparis.atlassian.net/jira/servicedesk/projects/DIPAME>)

We "requested participant" our collegue DSI Support : dsi_support_oss@diptyqueparis.com on a ticket.

When he replies to our issue, his replies only create comments in our ticket if he send it to

[diptame@diptyqueparis.atlassian.net](mailto:diptame@diptyqueparis.atlassian.net) specific adress and not

[jira@diptyqueparis.atlassian.net](mailto:jira@diptyqueparis.atlassian.net)

![2024-06-07_18h01_36.png](https://community.atlassian.com/t5/image/serverpage/image-id/328679i6A206D3F19DE3A45/image-size/large?v=v2&px=999 "2024-06-07_18h01_36.png")![2024-06-07_18h06_19.png](https://community.atlassian.com/t5/image/serverpage/image-id/328680i249D1713658C0F96/image-size/large?v=v2&px=999 "2024-06-07_18h06_19.png")![2024-06-07_18h07_24.png](https://community.atlassian.com/t5/image/serverpage/image-id/328681i5D75CD46AE2942F6/image-size/large?v=v2&px=999 "2024-06-07_18h07_24.png")![2024-06-07_18h08_46.png](https://community.atlassian.com/t5/image/serverpage/image-id/328682i30646FB5214E987C/image-size/large?v=v2&px=999 "2024-06-07_18h08_46.png")![2024-06-07_19h03_07.png](https://community.atlassian.com/t5/image/serverpage/image-id/328683iC1A57A3D07CECC34/image-size/large?v=v2&px=999 "2024-06-07_19h03_07.png")


Answers:
author: marc -Collabello--Phase Locked-
body: Hi [@Emma d'Imbleval](/t5/user/viewprofilepage/user-id/5515712) ,

I'd recommend to directly contact Atlassian support. These forums are public, and your post above also.


Tags: cloud

jira-service-management

jira-service-management-cloud
Internal Ticket
Asked by ENNAFIRI Mohamed:

Can we create a Jira ticket linked to a client without giving the client visibility on their portal?


Answers:
author: Duc Thang TRAN
body: Hello [@ENNAFIRI Mohamed](/t5/user/viewprofilepage/user-id/5279410)

Without knowing your customer permissions and organization setup, I can suggest the following:

If the ticket was created in Jira via the 'Create' button (and not via the portal) and isn't linked to a "customer request type" field ? similar field , even if the reporter is your customer, they normally wouldn't be able to see the ticket


Tags: cloud

jira-service-management

jira-service-management-cloud
Restricting "Teams" Field in ITSM projects
Asked by Erin Blomert:

Hey there Jira community,

I'm curious to know if anyone has had success integrating the new "Teams" field into their incident response. My issues with it are as follows:

1) Anyone can make a team

2)All teams are available when choosing a team from the custom field.

This seems so useful, but unless I can limit the teams available to choose to only the ITSM response teams, I think this is dead in the water for me. Any suggestions?


Answers:
author: Fabian Lim
body: Hi [@Erin Blomert](/t5/user/viewprofilepage/user-id/3871314)

You may want to vote for this feature here: <https://jira.atlassian.com/browse/JRACLOUD-75734>

A lot of complaints about how this feature has rolled out.

Regards,

Fabian

comments: author: Erin Blomert
body: Thanks Fabian, I'll definitely vote.... yeah this seems kind of botched. Good idea but missing important practical features.


author: Erin Blomert
body: I don't see any feature request for adding project-level context for the teams field; that would be nice too.


Tags: cloud

itsm

jira-service-management

jira-service-management-cloud

teams
Statut change confirm question / Confirmation de changement de statut
Asked by Dominique GALIBERT:

Hi,

Is it possible to display a dialog box to confirm the requested action,namely: - change the status of the ticket (according to the defined workflow)

Yes = we move to the requested status

No = we remain on the current status

The context is ITIL Change Management

THANKS

Dominique

========================================

Bonjour,

Est-il possible d'afficher une boite de dialogue pour faire confirmer l'action demand?e, ? savoir :

- changer le statut du ticket (selon le workflow d?fini)

Oui = on passe au statut demand?

Non = on reste sur le statut actuel

Le contexte est la Gestion des changements ITIL

Merci

Dominique G.


Answers:
author: Fabian Lim
body: Hi [@Dominique GALIBERT](/t5/user/viewprofilepage/user-id/4997084)

Welcome to the community!

You can have a transition screen with a customfield "Yes" or "No". Based on the selection, you can move the status with Jira Automation. You will have to figure out in which transition this pop-up.

Regards,

Fabian


Tags: cloud

jira-service-management

jira-service-management-cloud
How do I create an automation based on user?
Asked by Grace O_Leary:

Hi,

I am trying to create an automation so that a new ticket automatically links to a "parent ticket" based on a specific field in a form (the employee's name). For context, when an employee is first onboarded, their manager will complete a form requesting certain hardware and software for them. I would like any new software/hardware requests that are created after that initial request to be automatically linked to this original ticket.

How might I go about this? Is there a way to create an automation based on user information? In the onboarding form, there is a field that will list the employee name. There will also be a field for this in the other software/hardware forms.

Thanks!


Answers:
author: Trudy Claspill
body: Hello [@Grace O_Leary](/t5/user/viewprofilepage/user-id/5515734)

Welcome to the Atlassian community.

The field on the form corresponds to a field in the underlying request type. What type of field is the Employee Name field?

You can create an automation thus:

```
1 Trigger: Issue Created
2 Action: Lookup Issues
    JQL: issue!={{issue.key}} and "Employee name"={{issue.Employee Name}} and issue not in linkedIssues("{{issue.key}}) order by created asc
3 Condition: {{smart value}} condition
    First value: {{lookupIssues.size|0}}
    Condition: is greater than
    Second value: 0
4 Action: Link Issues
    Link type: <your choice>
    Link to: {{lookupIssues.first.key}}
```

Action 2 looks for any issue, other than the trigger issue, where the Employee Name field values match and the trigger issue is not already linked to it. This could return 0..n issues. So I added an ORDER BY clause to order them oldest to newest. My assumption the one you want to link to is the oldest issue.

Condition 3 confirms that you got at least one issue returned by the lookup.

Action 4 creates a link between your trigger issue and the oldest issue returned by the lookup, assuming at least one issue was returned by the lookup.


Tags: cloud

jira-service-management

jira-service-management-cloud