youngmon/atlassian-qna huggingface dataset:
Timeout to complete the process
Asked by ??????? ???????:

Good day!

When there is a manual shutdown (Actions-\> Stop build in the bamboo interface), bamboo has a timeout for which it terminates the process, if the process does not terminate by the signal itself. At the same time, messages appear in the bamboo logs

```
Build HRN2SYS-DEB21-IPSH-301 had to be cancelled: agent had been requested to stop the build but sent no response
```

Is it possible to configure this timeout?


Answers:
author: ??????? ???????
body: We have version of bamboo 5.14.3.1 build 51416 and we dont plan to upgrade. We understand local agents are part of the Bamboo server process. We need to know exactly can we define timeout through configurations files like .xml or this timeout is magic number in code?

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

The timeout check is hardcoded to 60 seconds.  
Can you share with us if you are experiencing a timeout bigger than that?


author: Daniel Santos
body: hi [@??????? ???????](/t5/user/viewprofilepage/user-id/2142867),

<br />

Bamboo has a feature to deal with such situation if the build is run by remote agents. Local agents are not covered because they are part of the Bamboo server process.

The feature was added in Bamboo 6.4 and is described in [Configuring the hanging build event](https://confluence.atlassian.com/bamboo/configuring-the-hanging-build-event-289277188.html).

For previous versions \< 6.4 you will need this plugin: [Hung Build Killer for Bamboo](https://marketplace.atlassian.com/apps/848939/hung-build-killer-for-bamboo).
Link Release Notes doesn not work for 6.7
Asked by Gonchik Tsymzhitov:

Hi!

Could you fix the link on the page?

<https://confluence.atlassian.com/bamboo/bamboo-releases-671089224.html>

![image.png](/t5/image/serverpage/image-id/41143iD0822B5038280B96/image-dimensions/836x401?v=v2 "image.png")

Linked to the <https://confluence.atlassian.com/display/BAMBOOSERVERM/.Bamboo+6.7+Release+Notes+v6.7>

instead of this one

<https://confluence.atlassian.com/bamboo/bamboo-6-7-release-notes-959795979.html>

Cheers,

Gonchik Tsymzhitov


Answers:
author: Mateusz Miara
body: Thanks for letting me know [@Gonchik Tsymzhitov](/t5/user/viewprofilepage/user-id/726117). It's fixed.

Cheers,

Mateusz

comments: author: Gonchik Tsymzhitov
body: Thanks for fix it :)

Cheers,

Gonchik


Tags: documentation
Build Bamboo plan with Plastic SCM
Asked by ??:

Hi, all

When I built Bamboo plan with plastic SCM. At the beginning, everything works fine when first link SCM to Bamboo and build. Then I made new changesets(2) in SCM and tried to rebuild in Bamboo, error appeared "*Plan could not be started. Exception: Changes from 2@\*@localhost:8087 to its parent couldn't be retrieved: Error: Input String was not in a correct format.*" Then I add new changesets(3) in SCM and rebuild, the same issue appears.

Could anyone please to tell me, what should I do to solve this?

Thanks


Answers:
author: Daniel Santos
body: Hi [@??](/t5/user/viewprofilepage/user-id/2482192),

The plugin to integrate Plastic SCM was not developed by Atlassian therefore I believe this issue will be better addressed on Plastic SCM support. This is the page where you can get help from them: <https://www.plasticscm.com/support>.

I'll kindly ask you to share here the solution for this problem if solve it through the Plastic SCM support.

comments: author: ??
body: Hi, the above issue is solved. Cause the plastic version i used is too old(version 5.X). After it is updated to 7.0, the bug is then fixed.


author: Daniel Santos
body: I'll set this as an accepted answer so others can see this thread is resolved. Thank you for getting back to share the solution you found. I hope now you can do a lot of great things with Bamboo.

Take care.


Tags: plastic

source-control
How can i use bamboo to import code into an application
Asked by Ajay Moorthy:

In my application, i need to go to the UI and import a file as part of the deployment. Can i use bamboo to do this automatically for me whenever there is any new file added to the repository? Is there a plugin of sorts that I can use?


Answers:
author: Daniel Santos
body: Hi [@Ajay Moorthy](/t5/user/viewprofilepage/user-id/2478967),

Bamboo is capable of detecting changes on the source code and calling any external tool through a script task, but then you will need to have a script or an API to call the right action on your application.  

There are multiple UI testing tools that would be possibly capable of doing what you need. There are even others used to automate such type of task. Bamboo would be the one calling this tool when the new changes are detected.

If your application has REST APIs, Bamboo could call them directly avoiding the need of an external tool to automate part of the process.


Tags: automation

deployment

user-interface
Migrating Bamboo on Windows from Oracle to OpenJDK starts interactively but not as windows service
Asked by v8lust:

There are many related links on this topic. The rest of my stack is on Linux, but I have a Windows build server. I have confirmed the following

local service account

OS (2016), JVM (OpenJDK 64-Bit Server VM AdoptOpenJDK) and Application are 64bit

JAVA_HOME points to JDK root (not bin or jre)

This is a new host with only 64bit Java 8 update 192 installed and service account has login rights

The only log I get is in commons-daemon with the familiar:

%1 is not a valid Win32 application.  
Failed creating Java C:\\Program Files\\AdoptOpenJDK\\jdk8u192-b12\\jre\\bin\\server\\jvm.dll

I've also remove user path definition (as this has been a problem with remote agents in the past, but that has quite a different error log)


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

The issue you have commented may be related to <https://jira.atlassian.com/browse/BAM-19683> - **Bamboo service does not start on Windows with 64-bit Java**, in which provides you with a suggestion on how to move forward (in comments section)

Kind regards,

Rafael

comments: author: v8lust
body: Greatly appreciated. For now I shall leave it running in a disconnected remote desktop session until Atlassian deliver a product level solution for this.


author: v8lust
body: Is there any word on a fix for this in latest Bamboo (6.9+)?

comments: author: v8lust
body: no, same problem in Windows 6.9.1
Introducing Atlassian CloudFormation Backup Machine
Asked by Zohaib_Ahmad_hassan:

I have Create a Cloud formation template to install bamboo now when it is installed and first time i contact with web interface it asks for license , admin user setup and installation type . I want to automate these options as well. is there any command line utility or any configuration file in bamboo available for doing this ?


Answers:
author: Daniel Santos
body: Hi [@Zohaib_Ahmad_hassan](/t5/user/viewprofilepage/user-id/2332594),

<br />

Bamboo does not have an unattended installation configuration process/file, but once you understand how the installation/setup process works you should be able to automate part of it or even entirely.

A Bamboo instance is composed basically by 3 parts

* The installation folder
* The home folder
* The DB

When you download Bamboo you only have the installer part.

The setup process (wizard where you see the license) will:

1. Save the license details.
2. Save the DB configuration (I'm assuming you will use an external DB).
3. Create the DB and populate the tables.
4. Create the home directory and all related configuration files.
5. Populate the DB.

If you want to install Bamboo multiple times this is what I would suggest:

**Backup process (1 time job)**

1. Run a normal installation and go through the whole wizard (adding license, configuring DB, admin user, so on ...)
2. Stop Bamboo.
3. Create a copy of the Bamboo home directory.  
   The following folders can be ignored: *jms-store, temp, index* and *caches*. They are built on startup time.
4. Create a backup of your external DB

**New instance process**

1. Create the installation files (either by backup or downloading if from [Download Bamboo - Atlassian](https://www.atlassian.com/software/bamboo/download))
2. Configure the file *\<Bamboo_Install\>/atlassian-bamboo/WEB-INF/classes/bamboo-init.properties* pointing the location where you want the *\<Bamboo_Home\>* folder to be set.
3. Copy the Bamboo home to the location configured in the previous step.
4. Copy the DB backup to the new DB server using the external DB tools.
5. Edit the *\<Bamboo_Home\>/bamboo.cfg.xml* :
   1. To add the right license details, in case it is a different instance (not the same license used to create the backup).
   2. Adjust the DB URL so it points to the newly copied DB.
6. Start Bamboo

In case you need special tomcat configuration files, you can add/edit them before starting Bamboo.

I understand this process is not that simple neither complete (not covering all possible configuration details), but it can be adjusted and automated.

<br />

I also created this feature request to cover this scenario: [Unattended installation for Bamboo](https://jira.atlassian.com/browse/BAM-20221). Please add your comments and vote on it if you think this feature should be implemented.

I hope it helps.


Tags: automation
The "Detach container" option does not keep container up after task execution
Asked by Marcio de Jesus:

Hi guys,

I'm using the docker plugin to run a "docker run" by Bamboo with the settings below.

![run nginx.JPG](/t5/image/serverpage/image-id/40846i3A75316DE99B2EF4/image-size/large?v=v2&px=999 "run nginx.JPG")

my log is this

![log.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/40862i9664D05D38297A27/image-size/large?v=v2&px=999 "log.JPG")

The problem I'm facing is that according to the documentation the "Detach container" option should keep the container running in background (<https://confluence.atlassian.com/bamboo0603/configuring-the-docker-task-in-bamboo-939491356.html#ConfiguringtheDockertaskinBamboo-run>), but the behavior is different.

You can see in the photo below that the container is created but it is destroyed at the end of the terefa. It is also possible to see that I executed the same command generated by the plugin and the container in this case is still online.

![docker ps with empty result.JPG](/t5/image/serverpage/image-id/40855iFE0B06290DE72B34/image-size/large?v=v2&px=999 "docker ps with empty result.JPG")

Anyone have any idea what might be happening?

Thank you all!


Answers:
author: Rafael Pinto Sperafico
body: Hi [@Marcio de Jesus](/t5/user/viewprofilepage/user-id/2463925),

Please, have a look at the announcement below, extracted from <https://jira.atlassian.com/browse/BAM-17395> - **Docker Task "Detach container" still terminates container**, comments section:
> **Atlassian Update -- 18 September 2018**
>
> Hi everyone,
>
> Thank you for your interest in this issue.   
> While designing Docker Tasks in Bamboo we made a decision that all containers started in background during execution of a job **will be terminated at the end of the job** . Note that we don't have "terminate container" task.  
> The checkbox *Detach container* that we exposed on the UI allows to start container in a task and then use the started container in subsequent tasks (ie. to run tests).
>
> If you're looking for a way to start a container and keep it running after Bamboo job has been completed, you need to run the docker command from the script task.
>
> Please share your feedback in the comments below.
>
> Kind regards,  
> Bamboo Team

Kind regards,

Rafael


Tags: bamboo-app
Unable to setup a remote agent image configuration using a VPC
Asked by Angel Ruiz:

Hi,

I am trying to use new EC2 types like M5 Large, but whenever I tried to spin up an agent an got the following error:

```
com.amazonaws.services.ec2.model.AmazonEC2Exception: The specified instance type can only be used in a VPC. A subnet ID or network interface ID is required to carry out the request. (Service: AmazonEC2; Status Code: 400; Error Code: VPCResourceNotSpecified; Request ID: 18c6a0dd-aee9-483e-ab03-e0f653ac0ecd)
```

We have defined a VPC in Amazon, but Bamboo does not provide anywhere in the UI any means to introduce the configuration details of the VPC:

![Elastic_image_configuration_details_-_Atlassian_Bamboo.png](/t5/image/serverpage/image-id/40821i4554D40C0D7AFCD8/image-size/large?v=v2&px=999 "Elastic_image_configuration_details_-_Atlassian_Bamboo.png")

I am probably missing something and I would appreciate any help you could provide.

Kind regards,  
Angel


Answers:
author: Johan Soetens _Dumblefy_
body: Just a suggestion but do you still have your default VPC?

[Default VPC and Default Subnets](https://docs.aws.amazon.com/vpc/latest/userguide/default-vpc.html)

comments: author: Angel Ruiz
body: Hi Johan,  

I don't think so. I created a new one. First time I am using a VPC as I am a developer and not a sys. admin

![vpcs___VPC_Management_Console.png](https://community.atlassian.com/t5/image/serverpage/image-id/40823i705E0EB4AF2098F3/image-size/large?v=v2&px=999 "vpcs___VPC_Management_Console.png")

We could have up to 25 build agents available.

Thanks!


author: Johan Soetens _Dumblefy_
body: If you can't select your VPC from that form, it will probably try to create it in your default VPC. Try to recreate it in the relevant region or ask help from your sysadmins.

Good luck!
Schedule existing release in Bamboo
Asked by ashishpanwar:

Hi ,

We would like to know if there any way to schedule existing release in Bamboo.

As of now with existing functionality we can trigger the deployment job at any specific time but it will always pick up the latest successful build from either the custom branch or the default branch depending upon how triggers are configured.

We have a business case where only certified packages can be promoted to next environment , so scheduling of existing release remains very important point in Bamboo framework where anyone can schedule a certified existing release to higher environment.

please let us know in case this is achievable with some other Bamboo feature or its readily available to utilize.

Regards,

Ashish Panwar


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

You could potentially make use of Bamboo REST API (<https://docs.atlassian.com/atlassian-bamboo/REST/6.7.2/>) and promote the build you are looking for creating the release / version you need. However, this should be scripted as a cron job, for instance.  

Here is just an example, lets say you have a PROJ-PLAN and have ran 3 builds with it:

```
# Fire build execution for specified plan
# /queue/{projectKey}-{buildKey}

curl -k -u USERNAME \
     -H 'X-Atlassian-Token: no-check' \
     -X POST 'http://localhost:8085/rest/api/latest/queue/PROJ-PLAN'
```

Then, you decided creating a release from the 2nd build, called *version2*:

```
# Create deployment version for given deployment project.
# /deploy/project/{deploymentProjectId}/version

curl -k -u USERNAME \
     -H 'X-Atlassian-Token: no-check' \
     -H 'Content-Type: application/json' \
     -H 'Accept: application/json' \
     -d '{"planResultKey":"PROJ-PLAN-2","name":"version2","nextVersionName":"version3"}' \
     -X POST 'http://localhost:8085/rest/api/latest/deploy/project/1114113/version'
```

Then running the deployment by issuing the version:

```
# Trigger deployment for deployment environment and version.
# /queue/deployment?environmentId={environmentId}&versionId={versionId}

curl -k -u USERNAME \
     -H 'X-Atlassian-Token: no-check' \
     -H 'Content-Type: application/json' \
     -H 'Accept: application/json' \
     -X POST 'http://localhost:8085/rest/api/latest/queue/deployment?environmentId=1212417&versionId=1376257'
```

Please, refer to <https://developer.atlassian.com/server/bamboo/rest-api-deployment-triggers-for-bamboo/> for more information.

Kind regards,

Rafael
Selenium with Bamboo
Asked by Siddarth Taneja:

I am using Selenium with Maven for web automation. Now, I am trying to integrate it with Bamboo. Is it possible to integrate Selenium (with Maven) with Bamboo without Selenium grid or browser stack? Our Test cases include functionality as well as UI Test cases.


Answers:
author: Gonchik Tsymzhitov
body: Hi!

Looks like better way using the Selenium grid

Cheers,

Gonchik Tsymzhitov

comments: author: jag chauhan
body: Can it be done without Selenium Grid and Browser Stack?

Could you please share the appropriate steps link for Selenium Grid implementation with Bamboo.


author: jag chauhan
body: [@Siddarth Taneja](/t5/user/viewprofilepage/user-id/2464609) Do you able to find any solution to the problem state?
Powershell script fails when run from Bamboo
Asked by Naveen Jones:

I've a Script task (Windows PowerShell) in a Build plan that automates MS Office Word to convert .docx files to PDF. The script runs fine and creates the PDF files when run directly from Powershell console on the machine (Windows Server 2016). Running the same script file from Bamboo task generates the error below.

```
New-Object : Retrieving the COM class factory for component with CLSID error	19-Dec-2018 12:36:13	{000209FF-0000-0000-C000-000000000046} failed due to the following error: error	19-Dec-2018 12:36:13	80080005 Server execution failed (Exception from HRESULT: 0x80080005 error	19-Dec-2018 12:36:13	(CO_E_SERVER_EXEC_FAILURE)).error	19-Dec-2018 12:36:13	At [PATH TO Powershell Script file]:75 char:22error	19-Dec-2018 12:36:13	+ ...             $wdApplication = New-Object -ComObject "Word.Application"error	19-Dec-2018 12:36:13	+                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~error	19-Dec-2018 12:36:13	    + CategoryInfo          : ResourceUnavailable: (:) [New-Object], COMExcept error	19-Dec-2018 12:36:13	   ionerror	19-Dec-2018 12:36:13	    + FullyQualifiedErrorId : NoCOMClassIdentified,Microsoft.PowerShell.Comman error	19-Dec-2018 12:36:13	   ds.NewObjectCommand?
```

The Bamboo task calls a PS file that has an Import-Module statement to import the function defined in second PS file that actually does the PDF conversion. Bamboo is running as a Windows Service and the task is setup to call the PS file with some arguments.

Does anyone have any suggestions on what I might be missing in the task or Bamboo setup?


Answers:
author: Daniel Santos
body: Hi [@Naveen Jones](/t5/user/viewprofilepage/user-id/1338160),

Is your service configured to use a local user account to start Bamboo?  
This is the configuration we recommend, and you can use this page to configure it: [Running Bamboo as a Windows service as the local user](https://confluence.atlassian.com/bamboo/running-bamboo-as-a-windows-service-as-the-local-user-416580754.html).

If you have Bamboo running as a local user, can you confirm you are using the same user that was able to run the script from terminal?

The error you have is also described in this article: [You may receive an "Error code 80080005 -- server execution failed." error message when you start many COM+ applications](https://support.microsoft.com/en-us/help/870655/you-may-receive-an-error-code-80080005-server-execution-failed-error-m). You may want to read it and check if it applies to your case.


Tags: powershell
is there a way to tag a commit of source used in bamboo build?
Asked by lance_lyons:

is there a way to tag a commit of source used in bamboo build?

for each build we can see the commit guid but we would like to tag that commit with release number


Answers:
author: Daniel Santos
body: Hi [@lance_lyons](/t5/user/viewprofilepage/user-id/853588),

If the repository type is **Subversion** you can use the **VCS Tagging** task.  
If you want to tag a **git** repository you will need to use a **script task** for this and set the same commands you use for tagging in the terminal.

Examples of how this can be done for commit/push can be seeing below:

* [How to commit and push to a Git repo during a build](https://confluence.atlassian.com/bamkb/how-to-commit-and-push-to-a-git-repo-during-a-build-720641378.html) (user and password)
* [How to push to repository under SSH protocol using Script task](https://confluence.atlassian.com/bamkb/how-to-push-to-repository-under-ssh-protocol-using-script-task-747831642.html) (SSH)

I hope they can help you to build your tagging solution.


Tags: bamboo-administration

bamboo-development
Dowload Plan Artifacts
Asked by Vishal Gala:

An API to download the Artifacts of a plan .


Answers:
author: Daniel Santos
body: Hello [@Vishal Gala](/t5/user/viewprofilepage/user-id/2458525),  

Firs of all you need to know what job result from which you want to extract the artifact.

Let's say it is

```
PROJ-PLAN-JOB-<BUILD_NUM>
```

Then you can list all the artifacts from it using:

```
curl -u <USERNAME>:<PASSWORD> -X GET \
<BAMBOO_URL>/rest/api/latest/result/PROJ-PLAN-JOB-<BUILD_NUM>?expand=artifacts
```

The results should include the **artifacts**section listing all artifacts and the links to access them:

```
<artifacts>
 ...
 <artifact>
 <name>fortune</name>
 <link href="<BAMBOO_URL>/browse/PROJ-PLAN-28/artifact/shared/<ARTIFACT_NAME>/<ARTIFACT_FILE>" rel="self"/>
 <producerJobKey>PROJ-PLAN-JOB-<BUILD_NUM></producerJobKey>
 <shared>true</shared>
 <size>105</size>
 <prettySizeDescription>105 bytes</prettySizeDescription>
 </artifact>
 ...
</artifacts>?
```

Once you decide what artifact to download you can use the following command:

```
curl -u <USERNAME>:<PASSWORD> -X GET \
<BAMBOO_URL>/browse/PROJ-PLAN-<BUILD_NUM>/artifact/shared/<ARTIFACT_NAME>/<ARTIFACT_FILE> \
> <ARTIFACT_FILE>

```

Please notice that we are redirecting the output of curl to a file otherwise it would just trow the artifact content on the terminal.

??In case you need a solution for Windows you might need to install curl and adjust the commands to match the Windows terminal needs.
Why bamboo takes the branch as a job.
Asked by Carlos Luis Castro Marquez:

I'm using the standard version of bamboo. I know it's limited to 10 jobs. I have define only one job. But now there is a message on page footer saying: **Unleash the full power of Bamboo - [Upgrade](http://www.atlassian.com/software/bamboo/pricing?utm_source=starter&sid=B1VM-QBI0-PW9Q-LZ46) to unlimited jobs and remote agents today! (1 free jobs remaining).**Why this is happening, my thoughts are that you are taking a branch execution as a new job, because I deleted one and decreased that number. In that job I have setup the Plan Branch. Please this is how it have to be, I'm wrong? Please need some help.

Thanks in advance!


Answers:
author: Daniel Santos
body: Hi [@Carlos Luis Castro Marquez](/t5/user/viewprofilepage/user-id/2247458),

That is how Bamboo works by design when using an starter license. The details on how this type of license work are stated in the [Starter Licensing and Pricing](https://www.atlassian.com/licensing/starter?&_ga=2.63241519.1218039605.1544977977-499457697.1543430345#bamboo-1) page.
> **1. What restrictions are there when using a Bamboo Starter License?**   
> With a Bamboo Starter License, you are restricted to 10 build Jobs, and 0 remote agents, but can run unlimited local agents. A Job is a single build unit within a Plan. One or more Jobs can be organized into one or more Stages. Given a 10 Job limit, you may distribute your Jobs between up to 10 Plans - for example, one Job per Plan or all 10 Jobs within one Plan. There is no limit on the number of times a Plan is built/executed.
>
> Please note that use of the Plan Branches has a multiplicative effect on the number of jobs configured, and therefore an effect on the 10 jobs cap. For example, a plan with two jobs that is building against a total of three branches (the plan's original branch, plus two additional branches) will contribute 6 jobs toward the limit.

I hope that can clarify this scenario.


Tags: evaluator-resources