youngmon/atlassian-qna huggingface dataset:
How to get a status active deployment in Bamboo
Asked by Sergey Obozhin:

I've created custom plugin for Bamboo - task, when I want to search deploy log for result: "Failed" or "Success".

How can i find result status of all tasks in deployment plan while it in progress?


Answers:
author: Sergey Obozhin
body: I solved the problem this way - in finally task:

URL url = new URL("http://hostname:8085/rest/api/1.0/deploy/result/" + deploymentTaskContext.getDeploymentContext().getResultKey().getResultNumber(); + "?includeLogs=true");  
String user = ""; // username  
String pass = ""; // password or API token  
String authStr = user + ":" + pass;  
String encoding = DatatypeConverter.printBase64Binary(authStr.getBytes("utf-8"));  

HttpURLConnection connection = (HttpURLConnection) url.openConnection();  
connection.setRequestMethod("GET");  
connection.setDoOutput(true);  
connection.setRequestProperty("Authorization", "Basic " + encoding);  
InputStream content = connection.getInputStream();  
BufferedReader in = new BufferedReader(new InputStreamReader(content));  
String line;  
while ((line = in.readLine()) != null) {  
System.out.println(line.contains("with result: Failed"));  
}


author: Steffen Opel _Utoolity_
body: I realize you have identified a solution already, just in case:  

The information is a bit buried, but given you are implementing a custom plugin, you might want to check section 'Reading Logs' in the [Task overview](https://developer.atlassian.com/bamboodev/bamboo-tasks-api/tasks-overview#TasksOverview-ReadingLogs), which references a dedicated Java interface for log interception at runtime:
> We've added infrastructure for analysing build logs on the fly. For documentation, see [LogInterceptor](http://docs.atlassian.com/atlassian-bamboo/latest/com/atlassian/bamboo/build/logger/LogInterceptor.html). You can add these interceptors to the [LogInterceptorStack](http://docs.atlassian.com/atlassian-bamboo/latest/com/atlassian/bamboo/build/logger/LogInterceptorStack.html) in the [BuildLogger](http://docs.atlassian.com/atlassian-bamboo/latest/com/atlassian/bamboo/build/logger/BuildLogger.html). For examples of usage, see com.atlassian.bamboo.build.logger.interceptors.StringMatchingInterceptor and com.atlassian.bamboo.plugins.ant.task.AntBuildTask .

As hinted upon, you probably need to check the Bamboo source for details on how to use it.  

Please note that I'm not aware whether the exact same interface applies to the unfortunately ever so slightly different deployment projects as well, but would at least expect a similar mechanism to be in place there.


author: Sergey Obozhin
body: Maybe i can get current status tasks in deployment project?
Import yaml file (5.14)
Asked by ashbelmokadem:

There seems to be an option to export a build plan as a yaml file in Bamboo 5.14. However, I can't seem to find a way for importing that same yaml file into a new or existing build.

Is there such an option available?


Answers:
author: Marek Parfianowicz
body: There is no such option in **Bamboo 5.14**. However, please have a look at newer Bamboo versions:

* **Bamboo 6.0+** allows you to define plan as code using [Bamboo Specs](https://confluence.atlassian.com/bamboo/bamboo-specs-894743906.html) feature.
* **Bamboo 6.2+ allows** you to define plan [also using YAML](https://confluence.atlassian.com/bamboo/bamboo-yaml-938844479.html) (Bamboo Specs uses Java by default); keep in mind that this is a technical preview, so the exact file format may change in future versions

comments: author: Marcin Gardias
body: To clarify, the YAML format we used in Bamboo 5.14 has been discontinued and we are not going to support importing it.

Our intention is to support simpler format of YAML for the most common use cases and Bamboo Specs (Java) if you need more power from you 'configuration as code' solution.


Tags: import
changing SQLnode from existing to another machine without re-installation
Asked by simhadri mallikarjun:

currently i am using my localhost sql. now what i am thinking is keeping bamboo on same machine but I need to point out sql data to another machine. Is there any option to achive this without re-installation.


Answers:
author: somethingblue
body: Hi Simhadri,

The process in [Moving your Bamboo data to a different database](https://confluence.atlassian.com/bamboo/moving-your-bamboo-data-to-a-different-database-289277250.html) may be of use:

#### Alternative DB migration {#toc-hId-1370749951}

If the database systems are:

* the same (for example, you are moving from PostgreSQL to another PostgreSQL) OR
* compatible (for example, you are moving from SQL Server 2005 to SQL Server 2008),

you can move the data manually. To migrate the data:

1. Stop the Bamboo instance that is using the source database.
2. Manually transfer the data.
3. Go to `<bamboo-home>` and open the `bamboo.cfg.xml` file.
4. Provide the properties of the new database.
5. Start the Bamboo instance.

Once you move the database data and modify the `bamboo.cfg.xml` you should be set once you restart Bamboo.

Cheers,

Branden

comments: author: simhadri mallikarjun
body: sothat after approaching the above procedure shall I replace this **hibernate.connection.url**property value eith my desired server node.

is it enough (or) still I need any changes.
Remote Agent Startup Issue Java version
Asked by Patrick Schaller:

Hello,

I ran into a startup issue with the bamboo remote agent.

The [supported platforms article](https://confluence.atlassian.com/bamboo/supported-platforms-289276764.html) means that only java 1.8 is supported. The log of the agent means:

```
INFO | jvm 4 | 2017/10/09 14:46:01 | Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
INFO | jvm 4 | 2017/10/09 14:46:01 | has value '1.8', but '1.6' is required.
```

After changing the registry key manually to 1.6 (it is also installed) I get the following messages:

```
INFO | jvm 1 | 2017/10/09 14:49:58 | Wrapper (Version 3.2.3-atlassian-1) http://wrapper.tanukisoftware.org
INFO | jvm 1 | 2017/10/09 14:49:58 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
INFO | jvm 1 | 2017/10/09 14:49:58 | 
INFO | jvm 1 | 2017/10/09 14:49:58 | WrapperSimpleApp: Unable to locate the class com.atlassian.bamboo.agent.bootstrap.AgentBootstrap: java.lang.UnsupportedClassVersionError: com/atlassian/bamboo/agent/bootstrap/AgentBootstrap : Unsupported major.minor version 52.0
INFO | jvm 1 | 2017/10/09 14:49:58 | 
INFO | jvm 1 | 2017/10/09 14:49:58 | WrapperSimpleApp Usage:
INFO | jvm 1 | 2017/10/09 14:49:58 | java org.tanukisoftware.wrapper.WrapperSimpleApp {app_class} [app_arguments]
INFO | jvm 1 | 2017/10/09 14:49:58 | 
INFO | jvm 1 | 2017/10/09 14:49:58 | Where:
INFO | jvm 1 | 2017/10/09 14:49:58 | app_class: The fully qualified class name of the application to run.
INFO | jvm 1 | 2017/10/09 14:49:58 | app_arguments: The arguments that would normally be passed to the
INFO | jvm 1 | 2017/10/09 14:49:58 | application.
```

bamboo 6.2.1

java 8u114

win 7x64

Does anyone know what I did wrong?


Answers:
author: somethingblue
body: Hi Patrick,

Did you install the JDK?:
> For Bamboo server, it is not enough to have just the JRE. Please ensure that you have the full JDK.
>
> You can download the Java SE Development Kit (JDK) from the [Oracle website](http://www.oracle.com/technetwork/java/javase/downloads/index.html).

Once you install the JDK you'll need to set the JAVA_HOME:
> Once the JDK is installed, you will need to set the **JAVA_HOME** environment variable, pointing to the root directory of the JDK. Some JDK installers set this automatically (check by typing 'echo %JAVA_HOME%' in a command prompt, or 'echo $JAVA_HOME' in a shell). You need to do this before installing Bamboo, as Bamboo will automatically [configure JDK capabilities](https://confluence.atlassian.com/display/BAMBOOM/.Supported+platforms+vBamboo-5.9) based on the system environment variables on your machine.

Let me know if that is all set and we'll go from there.

Cheers,

Branden

comments: author: Patrick Schaller
body: Hi Branden,

I have installed the jdk 1.8.0_144 (x64).

The environment variable JAVA_HOME points to C;\\Program Files\\Java\\jre_1.8.0_144

Thanks,

Patrick


Tags: bamboo-administration
Have issue in curl POST COMMAND to get bamboo global variable
Asked by salamon pradeep:

Hi I am trying to retrive bamboo global variable eg key=\> (bamboo.projectName) and value =\> AdvDetails

So i am trying to use this global variable by following CURL commands.

curl -X POST --user username:password --header "Content-Type: application/json" --header "Accept: application/json" -d "{ \\"applicationId\\": 185, \\"description\\": \\"Creating project for AdvDetails\\", \\"name\\": \\"%**bamboo.projectName** %\\" }" "<http://cara.test.com/datamanagement/a/api/v4/create-project>"

please let me know how to retrive this global variable details in the curl post rest api commands.

thanks in advance.


Answers:
author: bozhidarmarinov
body: Did you try with ${**bamboo.projectName**}
Script Task Argument Limit
Asked by Golden Goat (GoldenGoat):

Is there a limit on the number of arguments you can pass down to a script.  

Noticing in a script of ours we're getting incorrect arguments passed into the scripts and the only major difference is that we're passing down more arguments.


Answers:
author: Nic Brough -Adaptavist-
body: Duplicate of <https://community.atlassian.com/t5/Bamboo-questions/Script-Task-Argument-Limit/qaq-p/652090>

comments: author: Golden Goat (GoldenGoat)
body: Ah sorry there was an issue submitting this at first. Must have published two.
Script Task Argument Limit
Asked by Golden Goat (GoldenGoat):

Is there a limit on the number of arguments you can pass down to a script.  

Noticing in a script of ours we're getting incorrect arguments passed into the scripts and the only major difference is that we're passing down more arguments.


Answers:
author: robhit
body: Hi,

May I know how you are passing the arguments.

Please refer the screenshots for configuring more than one argument for the script task. Please accept the answer if it works for you so that others can also benefit from it.![Screen Shot 0029-10-11 at 10.20.00 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/7549i368CE9EDA8C16DDA/image-size/large?v=v2&px=999 "Screen Shot 0029-10-11 at 10.20.00 PM.png")![Screen Shot 0029-10-11 at 10.20.27 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/7550i8D0724CD15431DDD/image-size/large?v=v2&px=999 "Screen Shot 0029-10-11 at 10.20.27 PM.png")

comments: author: Golden Goat (GoldenGoat)
body: Apologies  

We found exactly what the issue was and it was bash itself and how it takes in args.   

When you hit 10 arguments we needed to encase the input assignment in {}.  

So instead you have ${10}. $10 was being treated as $1


author: robhit
body: > When you hit 10 arguments we needed to encase the input assignment in {}.So instead you have ${10}. $10 was being treated as $1

<br />

Yes, that is what the Linux part is.  
In shell scripting, if you want to use arguments to pass on to a script and if the argument number reaches 10 and above you have to use it like this ${10}

Makes sense!

Thanks for accepting the answer.

Cheers,

Robhit
Bamboo server does not starting as a service
Asked by marouane baini:

Hello,  
I'm working on making bamboo service started as a service.  
This is the error that i have got:  

ERROR \[PluginSchedulerTask-IncompatiblePluginsCheckPluginJob-job\] \[AbstractUpmScheduledJob\] Error executing job 'IncompatiblePluginsCheckPluginJob'

com.atlassian.util.concurrent.LazyReference$InitializationException: com.atlassian.util.concurrent.LazyReference$InitializationException: com.atlassian.extras.common.LicenseException: Failed to verify the license


Answers:
author: Gonchik Tsymzhitov
body: Your error looks like your license is not correct or expired.

Go to Administration **Configuration -\> System -\> License Details and check "Support period lasts until"** date.

Cheers,

Gonchik Tsymzhitov


author: Gonchik Tsymzhitov
body: Your error looks like your license is not correct or expired.

Go to Administration **Configuration -\> System -\> License Details and check "Support period lasts until"** date.
bamboo encoding
Asked by Anton Alyoshkin:

I have some bamboo (server) installation with

System encoding = Cp1251

and wheh I do some builds with bamboo in logs i have something like this:

????????? ????: 4.  
???? ???? "C:\\Program Files\\Atlassian\\Application Data\\bamboo-home\*\*\*\*\*" ??????? (???? ????? ?? ?????).

???? ??? ???????.  
?????????: 0  
????: 0

??? ????? 00:00:02.20  
????? ??????? ??? ????? ?? "\*\*\*\*.csproj".

What changes I can make for taking correct log messages (Russian language)?


Answers:
author: Gonchik Tsymzhitov
body: Hi Anton!

I hope this parameters will help for you

[https://confluence.atlassian.com/bamkb/how-to-change-the-wrong-encoding-in-bamboo-that-is-causing-the-application-to-crash-318670134.html](https://confluence.atlassian.com/bamkb/how-to-change-the-wrong-encoding-in-bamboo-that-is-causing-the-application-to-crash-318670134.html )

As you know we have Telegram chat for Russian community:

you can ask some times any questions about Atlassian Stack.

<https://t.me/augspb>

Have a nice day!

Cheers,

Gonchik Tsymzhitov


Tags: developer
How to build only modified subdirectory in bamboo?
Asked by Alok Singh:

I have been trying to implement a solution where I can build services based on a mono-repos architecture. The biggest blocker here is the sparse-checkout not supported by bamboo. So every time a service is getting modified all the services are getting rebuild. Is there a way I can streamline this in Bamboo. Any suggestions from the community?


Answers:
author: Alok Singh
body: I could use bamboo rest api to have a workaround this.
How to build mono repo based microservices in bamboo?
Asked by Alok Singh:

I have been trying to implement a solution where I can build micro-services based on the a mono-repos. The biggest blocker here is the sparse-checkout not supported by bamboo. So every time a service is getting modified all the services are getting rebuild. Is there a way I can streamline this in Bamboo. Any suggestions from the community?


Answers:
author: Dave Attard
body: you can use a plan based repo with change-detection

```
repositories:
- repo1:
    type: bitbucket-server
    server: Bitbucket
    project: XXXX
    slug: xxxx
    clone-url: 
    public-key: 
    private-key: 
    branch: master
    command-timeout-minutes: '30'
    use-shallow-clones: true
    cache-on-agents: true
    submodules: false
    ssh-key-applies-to-submodules: false
    verbose-logs: false
    fetch-all: false
    lfs: false
    change-detection:
      file-filter-type: include_only
      file-filter-pattern: folder1/.*
```


author: Trevor Raiss
body: Hi Alok, did you get this working? I can't find much content on this topic anywhere
Bamboo Deployment permissions issue
Asked by ranjith kumar:

Hi,

In one of our deployment project, one enviornment permissions are removed completely even logged in user permissions as well. This was happened accidentally . After this i am not able to see the environment itself. I have complete project permissions for that deployment project, still i am not able to see . might be because of disabling logged in user permission. how can i get back my environment in my deployment poject?


Answers:
author: Marek Parfianowicz
body: Did you try to log in as Bamboo admin to fix permissions? Admins can access everything, even if all explicit permissions are removed.
Getting Agent Hostname or IP address as a variable
Asked by ANKIT OJHA:

Getting Agent Hostname or IP address as a variable

We have 5 bamboo agents and bamboo server triggers the tests to one of the bamboo agent.

Could we get the agent's hostname or IP as a variable in bamboo?  

Eventually we want that variable as -Dhost=${bamboo.hostname} or something like that.


Answers:
author: robhit
body: I don't see any such variable presently in Bamboo.

But, how about this idea:  
Bamboo has this variable: "bamboo.agentId"

1. Use this variable to get the agent id (agent id is never changed)

2. This agent is configured in the file \<agent-home\>/bamboo-agent.cfg.xml with the parameter \<id\>1234\</id\>. This file has the other details as well which are name, agent uuid. Manually assign the bamboo global variable to have the hostname for each of these agents id's.

2. Have a script task to check for the "bamboo.agentId" and have something like case statement to get the hostname based on the agent id and then assign this hostname to a variable which can be used later as per the requirement. Something like:  

```
case  ${bamboo.agentId}  in                <agent-id1>)                            export hostname=<globalvariable1>                   ?;;                <agent-id2>)           export hostname=<globalvariable2>                   ?;;                *)                        esac 
```
Cannot access network path with bamboo
Asked by ANKIT OJHA:

Shared/Network drive not accessible through bamboo test execution

<br />

\*\*Architecture\*\*

Bamboo Server (Windows)

Agent (Windows)

Selenium Nodes (Windows)

Java, Cucumber and JUnit

Bitbucket

We have a requirement to access files located at some shared location while executing tests from Bamboo Plans.

All the corresponding servers have access to the shared. Manually verified.

File file = new File("\\\\\\\\SHARED_DRIVE\\\\Folder\\\\Automation\\\\download");  
System.out.println(file.exists());  
System.out.println(file.isDirectory());  
System.out.println(file.isFile());

<br />

Scenario 1 : Executing test through IDE (locally)

true  
true  
true

Scenario 2 : Executing test on Agent's VM

true  
true  
true

Scenario 3 : Executing test through Bamboo Plan

false  
false  
false  

As stated above, results were false while accessing shared drive when we were executing tests though Bamboo plan.

As stated in Scenario 2, we have manually logged in to the Agent's VM and executed maven goal and checked the logs

<br />

What could be the possible issue here?


Answers:
author: jamshiduk
body: Is there any solution for this issue?


author: somethingblue
body: Hi Ankit,

The first thing to check would be the user/privileges the Bamboo plan is running under. It would make sense if the other tests worked based on the privileges/user you used.

Another thing I would try is the [IP address instead of the FQDN](https://community.atlassian.com/t5/Bamboo-questions/Access-to-network-drives-in-Bamboo/qaq-p/174943). I have seen this work and have heard from other Support Engineers this has worked.

Let me know and we'll go from there.

Cheers,

Branden

comments: author: tryatlassianproduct
body: Hi Brandon

i have tried using IP as well but no luck.

also checked the user priveleges. The same user checks out the repo to a bamboo agent but unable to access the share drive.

Bamboo agent where the code is checked out can access the share drive when i manually login with the same user and test was executed as expected. But when the bamboo server triggers the test, java's isDirectory() returns false for the share drive path.
Bamboo install error on windows
Asked by Jyothsna:

I am getting an error while running start-bamboo.bat in windows..can someone tell me what could be the issue. I have installed JRE, JDK 9 version installed, and JAVA_HOME set. Thanks.

-Djava.endorsed.dirs=c:\\bamboo\\endorsed is not supported. Endorsed standardsand standalone APIs  
in modular form will be supported via the concept of upgradeable modules.  
Error: Could not create the Java Virtual Machine.  
Error: A fatal exception has occurred. Program will exit.


Answers:
author: Alexey Chystoprudov
body: Hello,

JDK 9 is not supported yet, please use JDK 8: <https://confluence.atlassian.com/bamboo/supported-platforms-289276764.html>

comments: author: Jyothsna
body: Hi,

It worked now with JDK 8. Thank you very much for quick guidance..


author: BlckStar
body: This is sad.
Como crear una regla de automatizaci?n donde el aprobador sea el mismo informador
Asked by Andres Arteaga:

Como crear una regla de automatizaci?n donde el aprobador sea el mismo informador si al momento de crear al regla y seleccionar aprobador no tengo opci?n para escoger el mismo informador automaticamente.![Captura.JPG](/t5/image/serverpage/image-id/307916i20E49F0A0EBC6715/image-size/large?v=v2&px=999 "Captura.JPG")


Answers:
author: John Funk
body: Hola Andr?s. ?Bienvenido a la Comunidad Atlassian!  
Deber?a poder hacer clic en los 3 puntos a la derecha del campo Aprobadores y elegir Copiar desde.  
Deje la primera opci?n en N?mero actual pero cambie el campo debajo a Reportero o lo que diga la versi?n en espa?ol.


Tags: cloud

jira-service-management

jira-service-management-cloud
Exporta Excel and appear with errors all in one line
Asked by Ya Ding:

hi,

Could someone help me on this , does it is a Jira issue or excel Issue ?

thanks in advance,

![Screenshot issue.png](/t5/image/serverpage/image-id/307930i2738CD200D30D51A/image-size/large?v=v2&px=999 "Screenshot issue.png")


Answers:
author: Ya Ding
body: Hi Ram, i see you have pleinty of solutions, could you have a look into my issue ? thanks [@Ram Kumar Aravindakshan _Adaptavist_](/t5/user/viewprofilepage/user-id/2988015)

comments: author: Ram Kumar Aravindakshan _Adaptavist_
body: Hi [@Ya Ding](/t5/user/viewprofilepage/user-id/5435520)

Could you please provide a little bit more information, i.e. what information have you exported to the Excel document?  

Please provide the steps to replicate this issue.

Also, please share some screenshots on the steps to reproduce this issue.

Thank you and Kind regards,

Ram


author: Ya Ding
body: hi [@Ram Kumar Aravindakshan _Adaptavist_](/t5/user/viewprofilepage/user-id/2988015)

Thanks for reaching out,

here some detail :

i selected the issues liste and export CVS (all filed) then comes a CVS file with only one collum that all informations are presented in one collum, and one issue per line.

and this is all i did,

Best,


Tags: cloud

jira-service-management

jira-service-management-cloud
Add a New Button to Jira Cloud Service Management Ticket
Asked by Jesse Ortega Jr:

Is it possible to add a new button, "Create Change", to the buttons that appear under the summary. The idea is that when that button is used, automation will create a change ticket cloning the summary \& assigned team also linking the tickets.

![Screenshot 2024-02-21 102042.png](/t5/image/serverpage/image-id/307887iD907FCDABDB5DD11/image-size/large?v=v2&px=999 "Screenshot 2024-02-21 102042.png")


Answers:
author: Luka Hummel - codefortynine
body: Hi [@Jesse Ortega Jr](/t5/user/viewprofilepage/user-id/3558849)

If you are willing to use a third-party app, you can try our [Deep Clone for Jira](https://marketplace.atlassian.com/apps/1218652?utm_source=atlassian&utm_medium=referral&utm_campaign=deepj-new-reach-ops-2616679).

While Deep Clone can't add a button under the issue summary, you can [add a button in the](https://documentation.codefortynine.com/deep-clone-for-jira/presets#PresetsforRecurringClones-AddaPresettotheIssueActionsMenu)[**Actions menu**](https://documentation.codefortynine.com/deep-clone-for-jira/presets#PresetsforRecurringClones-AddaPresettotheIssueActionsMenu)**[???](https://documentation.codefortynine.com/deep-clone-for-jira/presets#PresetsforRecurringClones-AddaPresettotheIssueActionsMenu)**of your issues, which will trigger a Deep Clone preset that you can configure to clone to your liking.


author: Mark Higgins
body: Hi Jesse,

I don't believe so, but I'd be interested to find out if you can. Your options are differnt to the options we see, which suggests that they are controlled by Features, issue Types, etc.

When we have cloned tickets in the past, we have used Automation, based on something iside the ticket, that we can check for.

Mark


Tags: cloud

jira-service-management

jira-service-management-cloud