youngmon/atlassian-qna huggingface dataset:
Bamboo site cannot be reached
Asked by Arun Kadarla:

Hi,

We are using Bamboo for continuous deployment and from past few days we facing the issue saying that 'The site cant be reached'.

![Capture.JPG](/t5/image/serverpage/image-id/50736i2EFEC37346E78270/image-size/large?v=v2&px=999 "Capture.JPG")

We could see the in the logs that Connection didnt happen.

Please help in this.


Answers:
author: Jobin Kuruvilla [Adaptavist]
body: Is the Bamboo server running? How about the builds? Are you just not able to access it on browser?

If it is an issue accessing the site on browser, that could be a firewall issue. You might even have some firewall rules blocking the port.

comments: author: Kushaal Bafna P
body: I have tried "ufw allow 8085" for changing firewall rule, but still it doesn't work.
Bamboo: How to get an AdministrationConfigurationManager in a CustomPrebuildAction?
Asked by Michael Haider:

I am trying to build a CustomPrebuildAction and need to access the resultsUrl from inside it.

Through similar posts here and elsewhere on the internet I have found that I can piece the resultsUrl together from base url and the plan result key.

I have managed to retrieve the plan result key via the build context, but I can't figure out how to get the base url.

I have read in a different post that I can try to get an AdministrationConfigurationManager injected, but it seems this is only valid for plugin modules of type Task.

In my CustomPrebuildAction I get a dependency injection error.

Does anybody know how to get an AdministrationConfigurationManager in a CustomPrebuildAction or else how to figure out the base url in a different way or even how to get a complete resultsUrl?

Thanks in advance,

Michael


Answers:
author: Michael Haider
body: I managed to get this working by using an AdministrationConfigurationAccessor instead which I retrieved via the ComponentLocator:

```
public class MyCPBA implements com.atlassian.bamboo.build.CustomPreBuildAction {

private AdministrationConfigurationAccessor administrationConfigurationAccessor = ComponentLocator.getComponent(AdministrationConfigurationAccessor.class);
```

Seems to work fine, I managed to retrieve the resultsUrl correctly.

```
AdministrationConfiguration config = administrationConfigurationAccessor.getAdministrationConfiguration();
String resultsUrl = config.getBaseUrl() + "/browse/" + buildContext.getPlanResultKey().toString();
```

HTH,

Michael


Tags: developer
PKIX path building failed
Asked by max:

Hi,

i have imported my custom certificate with intermediate certificate into my truststore which is set by: -Djavax.net.ssl.trustStore=/var/lib/bamboo/cacerts

and:

/usr/lib/jvm/java-8-oracle/bin/java -Djavax.net.ssl.trustStore=/var/lib/bamboo/cacerts SSLPoke \<mailserver.domain\> 443  
Successfully connected

but i still get this error when the server should be sending mails:

The mail settings you entered were not valid. Error thrown was: javax.mail.MessagingException: Could not convert socket to TLS; nested exception is: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

any idea?


Answers:
author: max
body: Ok,

i've figured it out, there was a different certificate for the Port 25 then Port 443. So adding this to the truststore did the trick.

Additionally i needed an receiving connector (the server being exchange), because bamboo didn't seem to support ntlm auth.

Thanks for your feedback!

comments: author: Daniel Santos
body: I'm glad you could find out the solution yourself =\]  

Thank you for coming back to share it with others.  
See you in the next thread!


author: Daniel Santos
body: Hello [@max](/t5/user/viewprofilepage/user-id/2797735)

* Can you confirm this configuration is failing for Bamboo?
* If yes, can you try using the JNDI configuration as configured for Google in this document: [Configuring Bamboo to send SMTP Email.](https://confluence.atlassian.com/bamboo/configuring-bamboo-to-send-smtp-email-289276984.html)

Some mail servers have their own specifications that may cause this configuration to be tricky.

If you want to double check your configuration prior to follow my suggestion, please make sure that Bamboo is using the exact same Java implementation and trust store. It might be the case that other Java implementation is being used therefore causing this issue.


Tags: atlassian-support

tls
failed server health post postgres migration for bamboo
Asked by Jeremiah Alfrey:

We have an existing bamboo application which is using a local postgres db. I have installed a new copy of the application on a new VM and am attempting to migrate the data to a new/different postgres db (networked). I have attempted to follow the directions on the Atlassian page: <https://confluence.atlassian.com/bamkb/how-to-upgrade-migrate-bamboo-720833273.html>

While importing the data from the dump I got several errors.

I then switched from db (bamboo) to the imported (bamboo_old) and restarted the application. After some time I get a failure and am advised to contact atlassian support.


Answers:
author: Daniel Santos
body: Hi [@Jeremiah Alfrey](/t5/user/viewprofilepage/user-id/2953043)

Thank you for explaining in details what you have done so far.

Let me ask you some questions from your comments:
> While importing the data from the dump I got several errors.

* Are the Postgres instance versions matching (source and destination)?
* What were the errors you saw?
* Did you stop Bamboo before creating the first DB backup?

> I then switched from db (bamboo) to the imported (bamboo_old) and restarted the application. After some time I get a failure and am advised to contact atlassian support.

* What are the errors you see in **\<Bamboo-Home\>/logs/atlassian-bamboo.logs**?
* Are you using the same Bamboo version used before?

Answering those questions will help us moving forward.

comments: author: Jeremiah Alfrey
body: After some delay I opted to use the export/import functionality. I allowed bamboo to setup it's defaults in the new postgres DB then imported the jobs from the old server. This worked out well. I now need to go delete the old DB which I imported via psql.


author: Daniel Santos
body: Sorry, I wasn't able to work on this one before, but I'm glad that you found a workaround for the issue.

Let me know if I can still help you with anything on this matter.
Bamboo Deployment plan - determining cause of trigger
Asked by Subhi Andrews:

In our bamboo deployment environments, we would like to execute a task step only if it was manually triggered by a user. If it was triggered using an automatic trigger like scheduled or after another successful deployment, we would like to skip a task. Is there a way to achieve this?


Answers:
author: Alexey Chystoprudov
body: Try [https://marketplace.atlassian.com/apps/1219706/conditional-tasks-for-bamboo?hosting=server\&tab=overview](https://marketplace.atlassian.com/apps/1219706/conditional-tasks-for-bamboo?hosting=server&tab=overview) it allows to add condition for user who executes build

comments: author: Subhi Andrews
body: This could work.

But we want a certain thing to happen when deployment environment is automatically triggered vs we do not want it to happen when the environment is manually triggered. We will need a mechanism to add multiple users in the condition or need to know what the username will be when the job is automatically triggered. It seems we can have only one username used in the condition.   

Another way would be to have a variable that would set (or unset) for manual deployment vs automatically triggered deployment.
Which file/folder are global and build/deployment audit log saved?
Asked by Luca Ballerini:

I can see the global and build/deployment audit logs through the UI, however I am trying to locate the file on Bamboo where those are saved. Thanks. Bamboo v. 6.8.1


Answers:
author: Luca Ballerini
body: Thanks for confirming this


author: Alexey Chystoprudov
body: It's in DB. AUDIT_LOG table
Is there a way to supply values for variables when selecting the release to deploy?
Asked by Jimmy Seddon:

Hello Everyone,

Currently, we have a Bamboo Deployment project with a few environments that run powershell based deployment scripts. This started as something that was run manually that we are trying to move into Bamboo.

When we runs these scripts manually there have been times where a couple of the servers in the powershell list fail to deploy for whatever reason, instead of running a full deployment again they added an override flag to be able to define a subset of the servers to re-deploy to. Instead of editing the environment taks and adding this into the script task, then running the deployment, and finally removing it from the task again, our deployment team was wondering if there is a setting our add-on that would allow them to provide that value on the fly when they are selecting what release to deploy.

Does anyone know if this is something that is possible?


Answers:
author: Daniel Santos
body: Hi [@Jimmy Seddon](/t5/user/viewprofilepage/user-id/512822)

Thank you for explaining in details what is your scenario there. I totally get why you need custom run for deployments allowing you to set the variables previously, even though this feature is not available.

We do have an old feature request for this at [\[BAM-13707\] Parameterised variables for Deployment environments](https://jira.atlassian.com/browse/BAM-13707) which was not prioritized among other more important features along the time.  
(i) Please check our [Implementation of New Features Policy](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) for more details on how we prioritize the implementation of new suggestions.  

**Possible workaround**

If you know the remote agent used for your deployment (which can be dedicated), you could get the flag from a file in that server and inject it into the deployment using the [Inject variables task.](https://confluence.atlassian.com/bamboo/configuring-a-variables-task-687213475.html)

**Add-ons from third-party vendors**

I was searching for possible add-ons for this and found this one that could potentially help you: [Custom Deployments for Bamboo.](https://marketplace.atlassian.com/apps/1216138/custom-deployments-for-bamboo?hosting=server&tab=support)  

I hope I could help.

comments: author: Jimmy Seddon
body: Hi Daniel,

Thanks for the response. Bare minimum I'll go and vote for that feature request, and I'll take a look at your suggested work around.

Thanks for your help!

-James


author: Daniel Santos
body: If you think this answer can help other users, please click the button "this helped me".   
See you in the next thread!


Tags: automation

deployment
Bamboo variables do not work in Command of NPM task
Asked by Eric Hill:

Incredibly frustrating.

I created a plan variable named "webjmp.build.script" with value "build-dev-ci".

In my plan's default stage, I have an **npm** task. In the **Command** box of the **npm** task, I have:

**run ${bamboo_webjmp_build_script}**

When I run the plan, I see this in the log, plain as day:

**bamboo_webjmp_build_script=build-dev-ci**

but the npm task fails with:

npm ERR! missing script: ${bamboo_webjmp_build_script}

Why doesn't it get substituted with its value?

Eric


Answers:
author: Eric Hill
body: I figured this out. I should not have switched periods to underscores. This works:

**run ${bamboo.webjmp.build.script}**

Eric


Tags: variable
Need to add dedicated agents to deployment plans using Bamboo Specs
Asked by Harshith:

I need to create deployment plans from Bamboo Specs. I tried to export Java-Specs from one Plan which I created manually. But it did not export the dedicated agent setup that I had. The documentations of Java Bamboo Specs talk about adding "requirements" but does not clearly mention the syntax to add dedicated agents.

Could you provide me the exact syntax/class for adding dedicated agent to deployment plan using Java Bamboo Specs.


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

Dedicating an agent using Bamboo Java Specs is currently unavailable, I am afraid - <https://jira.atlassian.com/browse/BAM-18495> - **Add possibility to dedicate an agent via Bamboo Specs**

Kind regards,  
Rafael


Tags: spec
Failed execute Gradle Script HTTP Status 403
Asked by Gareca Nanda:

Hi All,

I tried to do integration with Silk Central through gradle script and got error when executing it. This is from the log

build 02-Apr-2019 15:28:41 :silkCentralLaunch FAILED

error 02-Apr-2019 15:28:41

error 02-Apr-2019 15:28:41 FAILURE: Build failed with an exception.

error 02-Apr-2019 15:28:41

error 02-Apr-2019 15:28:41 \* Where:

error 02-Apr-2019 15:28:41 Build file 'D:\\GradleBuild\\silkcentral.gradle' line: 43

error 02-Apr-2019 15:28:41

error 02-Apr-2019 15:28:41 \* What went wrong:

error 02-Apr-2019 15:28:41 Execution failed for task ':silkCentralLaunch'.

error 02-Apr-2019 15:28:41 \> Failed to start execution plan '83': \<!doctype html\>\<html lang="en"\>\<head\>\<title\>HTTP Status 403 ??" Forbidden\</title\>\<style type="text/css"\>h1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} a.name {color:black;} .line {height:1px;background-color:#525D76;border:none;}\</style\>\</head\>\<body\>\<h1\>HTTP Status 403 ??" Forbidden\</h1\>\<hr class="line" /\>\<p\>\<b\>Type\</b\> Status Report\</p\>\<p\>\<b\>Message\</b\> Access Denied\</p\>\<p\>\<b\>Description\</b\> The server understood the request but refuses to authorize it.\</p\>\<hr class="line" /\>\<h3\>Apache Tomcat/9.0.8\</h3\>\</body\>\</html\>

I confirmed that the execution plan is exist and the Bamboo has access to Silk Central server.


Answers:
author: Daniel Santos
body: Hi [@Gareca Nanda](/t5/user/viewprofilepage/user-id/2966334)

I don't use **silkCentral**, but I want to share my 2 cents on this error with you.

It looks like this issue is not really related to Bamboo.  
I can see that the Gradle build is failing in line 43 which is probably when you are trying to call silkCentral.

Can you try running this build from your Bamboo Server terminal (in other words not using Bamboo, but in the same environment) to check if this issue persists?  

If it still does, I would recommend you seeking for help on <https://supportline.microfocus.com/> which is the support for silkCentral.


Tags: gradle

silk-central
rest api for "after successfull stage" trigger in deployment project
Asked by robin:

I want to deploy the artifacts generated after a successful stage of a build plan. I don't want to wait until the build is over because the second and third stage of that plan is much time consuming. I am aware of the "after successful stage" trigger available in the deployment environment settings. But in our case, lot of bamboo plan branches are creating for that plan automatically, so we can't manually add the trigger in the deployment environment for each branch. Is there any way to do it by REST api? Currently what I am doing is waiting for the entire plan to get completed, after that creating a release using that 'plan-key' and deploying there...

Thanks in advance


Answers:
author: Foong
body: Try using [Bamboo Specs](https://confluence.atlassian.com/bamboo/bamboo-specs-894743906.html) to edit the deployment project with all the triggers
Does Bamboo support SAP JVM.
Asked by abhinandan nandella:

I am looking for definitive answer on support of SAP JVM 8 by Bamboo 6.6.0 server.


Answers:
author: Nic Brough -Adaptavist-
body: Do you mean if Bamboo is supported while running on SAP JVM, or wither it can run a SAP JVM for build/test?

comments: author: abhinandan nandella
body: [@Nic Brough -Adaptavist-](/t5/user/viewprofilepage/user-id/781454) , I wanted to know if Bamboo is supported while running on SAP JVM. Any article or support page stating the same would be helpful.


author: Nic Brough -Adaptavist-
body: See <https://confluence.atlassian.com/bamboo/supported-platforms-289276764.html>


author: abhinandan nandella
body: [@Nic Brough -Adaptavist-](/t5/user/viewprofilepage/user-id/781454) , I did see that page but it does not provide direct information for support of SAP JVM. We need definitive answer to make the switch. Please direct me if possible. Thank you!


author: Nic Brough -Adaptavist-
body: Bamboo is only supported on the platforms listed there.


author: Jeyanthan I
body: You may try to run it with SAP JVM and see if Bamboo starts with it.

If it did, that's great! But if you encounter any issues later, Atlassian might not be able to support you.
Change the tempDir folder on Bamboo Elastic Custom Images
Asked by Felipe Augusto de Castro Ribeiro:

Hi all.  

I've been working on creating a elastic custom image to be used on my AWS account but I'm not able to change the tempDir property configured on the SystemInfoImpl class.

Since my base AMI do not allow scripts being executed from /tmp, I've been facing some issues to spin up my elastic agents.

Does anyone have faced this issue before and knows how to change the tempDir path to a different directory?

Thank you!

Felipe


Answers:
author: Alexey Chystoprudov
body: You need to follow solution how to change memory settings: <https://confluence.atlassian.com/bamkb/outofmemory-errors-in-bamboo-elastic-agent-826899144.html> and update it to include setting of java.io.tmpdir

For example this code set Temp folder to /tmp/bamboo

```
sed -i 's@.*MARKER.*@sed -i "s/-Xmx256m/-Xmx256m -Djava\\\\.io\\\\.tmpdir=\\/tmp\\/bamboo\\//" $startupScript@' /opt/bamboo-elastic-agent/bin/bamboo-elastic-agent
```
How to stop build job from script
Asked by Michael Schneidt:

Is there a way to stop a build job from script?

What I am trying to do is to have script task do a check on a URL with curl and when curl fails the build job should not execute any further tasks and end the build with "did not complete" and not as "failed".

The script task itself can succeed (exit 0) or fail (exit 1), but I find no possibility to prevent proceeding the following tasks without failing the whole build.

It's for an acceptance test job, that should not run tests when the stage is offline. I also found no other way to create such a condition.


Answers:
author: Foong
body: Save your script into a file. Then, use Script task Inline option to run the file and detect the exit code.

If the exit code is 1, then use this [REST API](https://docs.atlassian.com/atlassian-bamboo/REST/6.8.0/#d2e2564) to stop the build

comments: author: Edward_Burns
body: Please provide example


Tags: script

stop

task
NCover XML file format suitable for Job Miscellaneous tab path
Asked by Lukasz Zasada:

I've specified XML directory in Job's Miscellaneous tab NCover section and the files are picked up correctly, but results displayed in NCover tab of Build Project Result are empty (Line Rate%). I've tried different report samples besides my generated one (books, ReportGenerator tests etc.). However, it seems that none is parsed correctly. Also, documentation for NCover 3 is obsolete and considered a legacy solution, but versions 4 and 5 generate HTML versions of the report and not XML. You can find one sample file [here](https://github.com/danielpalme/ReportGenerator/blob/master/src/Testprojects/CSharp/Reports/NCover1.5.8.xml "NCover sample report"), another sample pasted below. I'll appreciate if somebody can point out why it happens for attached files and maybe provide a working sample. ++Bamboo version 6.8.1 build 60805 - 13 Mar 19.++

```
<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet href="coverage.xs1" type="text/xs1"?> <!-- saved from ur1=(0022)http://www.ncover.org/ --> <coverage> <module name="C:\Dev\NCover\Main\Samples\SimpleParam\adder.exe" assembly="Adder"> <method name="Main" class="Main.Program"> <seqpnt visitcount="1" line="10" column="13" endline="10" endcolumn="61" excluded="false" document="c:\Dev\NCover\Main\Samples\SimpleParam\Adder.cs" /> <seqpnt visitcount="1" line="11" column="13" endline="11" endcolumn="25" excluded="false" document="c:\Dev\NCover\Main\Samples\SimpleParam\Adder.cs" /> <seqpnt visitcount="1" line="11" column="25" endline="11" endcolumn="33" excluded="false" document="c:\Dev\NCover\Main\Samples\SimpleParam\Adder.cs" /> <seqpnt visitcount="1" line="12" column="25" endline="12" endcolumn="30" excluded="false" document="c:\Dev\NCover\Main\Samples\SimpleParam\Adder.cs" /> <seqpnt visitcount="1" line="16707566" column="0" endline="16707566" endcolumn="0" excluded="false" document="c:\Dev\NCover\Main\Samples\SimpleParam\Adder.cs" /> <!-- Some lines removed for brevity --> <seqpnt visitcount="1" line="28" column="3" endline="28" endcolumn="4" excluded="false" document="c:\Dev\NCover\Main\Samples\SimpleParam\Adder.cs" /> </method> </module> </coverage>
```


Answers:
author: Daniel Santos
body: Hi [@Lukasz Zasada](/t5/user/viewprofilepage/user-id/387367)

I see you've filed a support case in our portal as well.

As our support team shared with you, this problem is caused by a bug: [\[BAM-17507\] DotNet Plugin: tab with NCover results not working.](https://jira.atlassian.com/browse/BAM-17507)

We will need to wait for our team to fix this one so you can move forward using NCover integration.


Tags: coverage

ncover

test