youngmon/atlassian-qna huggingface dataset:
Bamboo build hangs on script that spawns subprocess
Asked by mike obrien:

Hi,

I have a bamboo build in which one of the tasks is a python script which spawns a subprocess (using subprocess.Popen) to launch a database server which needs to stay alive throughout the rest of the build while tests run.

The script completes successfully, however the build does not proceed to the next task and just hangs. My theory is that bamboo is waiting for the subprocesses to complete as well, before continuing.

Is that what's most likely happening? Is there a way to get bamboo to recognize a script as having completed, even if a subprocess that it's spawned is still running?

Thanks in advance.


Answers:
author: PiotrA
body: Can you try to redirect the output streams and use nohup, e.g.

```
nohup /tmp/boo.sh &gt; foo.out 2&gt; foo.err &lt; /dev/null &amp;
```

?

comments: author: Heather Wells
body: I have what I believe is the same problem. One of the tasks starts jetty, which returns the correct exit code, but then after the application starts it writes a few more lines to the console. Bamboo hangs at this point. The solution above solved the problem.


author: Jay Barra
body: Has this been solved for launching a Windows program?

I've tried this

```
@echo offstart cmd /c myprogram.exe &gt; nul
```

But that doesn't quite seem to cut it, Bamboo keeps grabbing the sub-process that is launched and won't progress.

comments: author: Guyverthree
body: I am struggling with the same issue.I have a simulator for a driver that i want to start as the first build job but it just hangs.


Tags: build

process

python
Can Junit Parser collect multiple test results in the same directory?
Asked by Hans Sebastian:

I have a bamboo plan and have Junit Parser as one of the tasks for its run.

My tests generate multiple test results and they are all placed in the same directory. For example I have these under the working sub directory:

* tests/foo.xml
* tests/foolib.xml
* tests/fooutil.xml

In the JUnit Parser, I put test/\* for the custom results directories. When I run, I only get results from the last file, which is fooutil.xml. Is this expected? Does bamboo only pick up one test results file per directory?

This is bamboo 3.3.2 build 2718.

Thanks


Answers:
author: PiotrA
body: I think you have to use ant-style regexp: <http://ant.apache.org/manual/dirtasks.html#patterns>

So, looking at your example I'd guess you have to specify "test/\*\*" - double asterisk instead of single one.

edit: hm... after looking once again at the issue it seems to me that this shouldn't be relevant...

comments: author: Hans Sebastian
body: Thanks for answering. I really appreciate it. I will try your suggestions. All though, I may have found the reason for the test results from a file not being picked up by bamboo. I'll post another question for that.
Hide port number in bamboo URL
Asked by srinumanthena:

How did you do it? I want do the same for bamboo


Answers:
author: Przemek Bruski
body: If you are using a standalone install (i.e. not the WAR distribution) and don't want to go through the hassle of setting up a proxy, just change

wrapper.app.parameter.2=8085

to

wrapper.app.parameter.2=80

In conf/wrapper.conf file located in your Bamboo installation directory.


author: Krystian Brazulewicz
body: You can do that using Apache httpd proxy: <http://confluence.atlassian.com/display/BAMKB/Running+bamboo+behind+apache+httpd+proxy>

Cheers


author: Nic Brough -Adaptavist-
body: Krystian gave you the best answer - use a web-server as a front end. You could also configure Tomcat to listen on a url without a port, but that is less flexible, and makes maintenance a bit more complex.
Change the workspace path in Bamboo
Asked by Luis Luis:

How can I change the workspace path that Bamboo uses to do the builds?

Thanks,

Luis


Answers:
author: Luis Luis
body: I found it by myself.

It's explained here:

[http://confluence.atlassian.com/display/BAMBOO/Specifying+Bamboo%27s+Working+Directory](http://confluence.atlassian.com/display/BAMBOO/Specifying+Bamboo%2527s+Working+Directory)
How do I prevent Bamboo from reporting Grails errors loading config files that truly do not exist?
Asked by Tim Colson:

Grails tries to load a properties config file from four locations (classpath \& file locations with .groovy and .properties extension), and reports errors when they do not exist. This isn't an error in the build, so I'm wondering if there is a way to have Bamboo ignore them?

|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 21-Nov-2011 06:21:06 | \[groovyc\] Compiling 1 source file to /users/bamboo/.grails/1.3.7/projects/WIKITOOL-STATS-JOB1/classes                                                                           |
| 21-Nov-2011 06:21:07 | Unable to load specified config location classpath:wiki-stats-config.properties : class path resource \[wiki-stats-config.properties\] cannot be opened because it does not exist |
| 21-Nov-2011 06:21:07 | Unable to load specified config location classpath:wiki-stats-config.groovy : class path resource \[wiki-stats-config.groovy\] cannot be opened because it does not exist         |
| 21-Nov-2011 06:21:07 | Unable to load specified config location file:/users/bamboo/.grails/wiki-stats-config.properties : /users/bamboo/.grails/wiki-stats-config.properties (No such file or directory) |
| 21-Nov-2011 06:21:07 | Unable to load specified config location file:/users/bamboo/.grails/wiki-stats-config.groovy : /users/bamboo/.grails/wiki-stats-config.groovy (No such file or directory)         |


Answers:
author: James Dumay
body: Hi Tim,

Bamboo is reporting these as errors because Grails is outputting the warning to stderror. Currently there is no way for Bamboo to suppress these warnings.

Thanks,

James
Bamboo plan repository configuration not changing
Asked by Kevin Mitchell:

I'm trying to update the repository configuration (change the CVS branch name) of a plan via the API, but it's not persisting across system reboots.

What am I missing? I can't find anything in the forums relating to this.

below is the code snippiet:

...

Plan defaultPlan = planManager.getPlanByKey(CIT-TMPLT);

Repository repo = defaultPlan.getBuildDefinition().getRepository();

((CVSRepository)repo).setBranchName(BRN2);

planManager.savePlan(defaultPlan);

...


Answers:
author: Marcin Gardias
body: \> planManager.savePlan(defaultPlan);

please try:

planManager.savePlanAndDefinition(defaultPlan);

Please note however that this code will not work in Bamboo 3.3 and later due to introduction of Multiple Repositories
How can I export/import individual Bamboo plans
Asked by Charles:

We are migrating all our builds to a new data centre. I'd like to carry across all plan configs as well build history. However because there's a lot of builds to get up and running I'd like to do this one plan (or maybe project) at a time.

Unfortunately there doesn't seem to be a way to export/import individual plans? I can see a feature request in JIRA for this (<https://jira.atlassian.com/browse/BAM-1223>) which is unresolved, so I assume it's not easily possible?

Is there a way to do this?


Answers:
author: Krystian Brazulewicz
body: Charles

Unfortunately import/export of individual plans is not possible at the moment. I suggest voting on BAM-1223 and nagging the Bamboo team are the best ways to get that functionality.

Krystian

Atlassian Bamboo Development
Bamboo version 3.3.2 build 2718 - PHPUnit bug
Asked by David Ferguson:

Hi Folks,

I recently upgraded Bamboo and have been having problems with the phpunit as a result. In the example below I'm executing phpunit via an ant script, however the same problem occurs when using the phpunit 3.3.x builder

Environment:

Bamboo version 3.3.2 build 2718

PHPunit 3.2.16

Start of PHPUnit test file:

1.\<?php  
2.  
3.set_include_path(get_include_path() . PATH_SEPARATOR . './share');

...

Bamboo log:

|----------------------|--------------------------------------------------------------------------------------------------------------|
| 15-Nov-2011 23:07:26 | phpunit:                                                                                                     |
| 15-Nov-2011 23:07:26 | \[exec\] ./UT/RebateDelivery/RebateDeliveryRequestTest.php: 1: cannot open ?php: No such file                |
| 15-Nov-2011 23:07:26 | \[exec\] ./UT/RebateDelivery/RebateDeliveryRequestTest.php: 3: Syntax error: word unexpected (expecting ")") |


Answers:
author: James Dumay
body: Hi David,

Not entirely sure whats going on there. If you file a ticket with [Atlassian support](support.atlassian.com) we can help you with this issue.

Thanks

James


Tags: phpunit
How to copy artifacts to a network location ?
Asked by Srinivas Chinthapandu:

Is it possible to copy artifacts to a network location or change the default location where artifacts are stored in server for plan ?


Answers:
author: Bob Swift (personal)
body: Regarding copying:

1. Use the SCP task: <https://plugins.atlassian.com/plugin/details/609524>

2. Or to script it: [Bamboo Command Line Interface](https://studio.plugins.atlassian.com/wiki/display/BCLI) **getArtifact** action


author: PiotrA
body: As for the "change the default location where artifacts are stored in server for plan" part, please check your *bamboo.cfg.xml* file - it contain a property:

\<property name="bamboo.artifacts.directory"\>${bambooHome}/artifacts\</property\>

Maybe tweaking it would be sufficient?

comments: author: Srinivas Chinthapandu
body: Thanks, After posting my orginal question, I came across this property, but this will ovverride for all my plans. I want to change this bamboo.artifacts.directory for few selected plans.
PAIN: Shared Artefacts accumulate across builds when workspace isn't not rebuilt
Asked by PilchardFriendly:

Using the new features in bamboo 3.2 to share artifacts across the pipeline is a great idea, and we use it successfully.

However, we have no way to clear out previous artefacts in our stage workspaces. Ideally, this would be a configuration option on the shared artifact settings. Alternatively, a prebuild step between VCS sync and artifact copying would allow us to clean out the shared directory before the build kicks in.

Right now we have to know which artefacts we need in current build, and delete anything else. This means too much logic for filtering out files that shouldn't be there in the first place.


Answers:
author: Marcin Gardias
body: You can use Build Expiry feature. One of the options there is to delete only the artifacts.
Developer not getting notifications
Asked by Kurt Frank:

I have one developer (eas) that is not getting notified when they break a build since changing from JIRA handling the users to Crowd.

I have the bamboo plan set to trigger a build when a developer checks in new code. The Bamboo plan is set to send notifications if a build fails.

One clue to this may be that if I go to any build that the developer has triggered by checking in code and clicking on his name I get this error message.

Unable to find the user. The username *ed* may be incorrect.

I am thinking bamboo is using the same routines to look up the user to send notifications.

Along those lines I peeked into the database (MS SQL 2005) that bamboo uses and found these two records in the AUTHOR table.

AUTHOR_IDLINKED_USER_NAMEAUTHOR_NAME

4456450 ed eas

6356997 eas [eas@ed-0001.onedomain.com](mailto:eas@ed-0001.onedomain.com)

And when I do this select

SELECT \*

FROM bamboo . dbo . USER_COMMIT

WHERE AUTHOR_ID = 4456450

I get a couple hundred records of his commits

And when I do this select

SELECT \*

FROM bamboo . dbo . USER_COMMIT

WHERE AUTHOR_ID = 6356997

I don't get a single record.

So it looks to me that all his commits are being logged as ed and not eas so he is not getting any notifications.

What do I need to do in order for eas to start getting his notifications?


Answers:
author: James Dumay
body: Hi Kurt,

This problem sounds a little complicated to answer on Atlassian Answers. If you [open a support request](support.atlassian.com) we could have one of our support engineers look at this for you ASAP.

Thanks

James
deploy to glassfish?
Asked by John Clancy:

We would like to use Bamboo to deploy to several Glassfish servers. Bamboo seems to support Tomcat and there is a plugin for JBoss deployment, but I cannot find a plugin, documentation, or forum posts concerning remote deployment to a Glassfish server. Is this possible? If so, where can I find documentation on how to do so? Thanks!


Answers:
author: ReneR
body: Bamboo integrates with Maven so if you're using Maven to drive your build, you could use the maven-glashfish-plugin:

<http://maven-glassfish-plugin.java.net/>

Also Bamboo can run any arbitrary command so if there's a command-line tool to do what you need it's very easy to plug that into Bamboo:

<http://stackoverflow.com/questions/3635861/best-way-to-deploy-on-glassfish-v3>


author: James Dumay
body: Hi John,

There is currently no support for deploying to Glassfish servers like the JBoss and Tomcat plugins provide. [Please vote on this feature request](https://jira.atlassian.com/browse/BAM-10275).

Thanks

James
Bamboo Agent 3.3.2 seems to loose os.name on the way
Asked by Christian Schneider:

On the verge of migrating from v2.4 to 3.3.2 i\`am facing some odd behaviour from the Standalone Agent on an IBM z/OS V1.11. I was able to run the Agent under Unix System Services with the jvm parameter -Dos.name=unix. This made the spacecheck in org.apache.commons.io.FileSystemUtils work. With the 3.3.2 Agent i\`am getting lots of java.lang.IllegalStateException: Unsupported operating system at org.apache.commons.io.FileSystemUtils.freeSpaceOS(FileSystemUtils.java:200) even with the env. variable set.

The Agent seems to loose or unset the variable while running which is kind of odd.


Answers:
author: Christian Schneider
body: After some more testing i came to the enlightnment that the issue is a JDK one. Appareantly the IBM JDK overwrites the os.name variable which makes my workaround of setting it manually to something already known by apache.commons.io worthless. Great!

Have to dig in the IBM Docs to investigate a little bit further. Extending apache.commons.io would probably an option.


author: Christian Schneider
body: as a follow up to the suggested Solution (modified apache.commons.ioFileSystemUtils.java)... I\`am appareantly not able to modifiy the Agents Classpath (Dir) on the Client side. The Classpath zip with the Agents Classpath\`s jar\`s gets downloaded from the Bamboo server and modifying the classpath dir\`s contents only triggers redownloading on agent restart.

Also working with -cp on the agents startup command does not seem to work at all.
Bamboo builds aren't triggered automatically
Asked by Luis Luis:

Hi,

I need to configure a build in Bamboo in several stages, but I don't want that the workspace is updated and compiled in every single step. So, I configured the build to use my repository and poll every 3 minutes, and the stages don't inherit that configuration.

I think that change made that the poll stopped working anymore (it worked before); is that possible?

I want to poll my repository for changes but I don't want to update and compile in every single stage; how can I do that?

Another question: is it possible to avoid that the build stops when a job fails? I would like (if possible) to continue to the end of the process altough any job has failed.

Thanks,

Luis


Answers:
author: James Dumay
body: Hi Luis, do you still have a Repository defined for your Plan? In order for your build to automatically run you must have a repository defined for your Plan and the build strategy set to either Polling or triggered.

comments: author: Luis Luis
body: It was a bug in my plugin, so it was my fault, sorry.

Thanks,

Luis


author: James Dumay
body: No worries Luis :)
Babboo wrapper.exe on windows-2000 not a valid win32 application
Asked by Remon van G:

When installing the latests bamboo version on windows standalone and trying to run it or installing as a service I get an error on Wrapper.exe

"wrapper.exe is not a valid win32 application".

This is on Windows-2000 server. I have redownloaded already but no effect, there is no logging either it must be more basic. I was thinking of C++ redistributables but have no answer.


Answers:
author: James Dumay
body: Hi Remon,

Are you using the correct Windows installer for your platform (In this case you would need the 32 bit installer). If this does not work please [file a support request](support.atlassian.com) with us and we will get back to you ASAP.

Cheers,

James

comments: author: Remon van G
body: yes i tried atlassian-bamboo-3.3.2-standalone-windows-x32.exe, and after that the ZIP file version.

no effect


author: Remon van G
body: I downloaded the latest release of the java wrapper directly from the vendor (the community x86 version), with this wrapper it does work in win2000. ( <http://wrapper.tanukisoftware.com/doc/english/download.jsp#stable> )

It looks like the wrapper used in Bamboo is a modified version?   
Its also much smaller (195kb vs 365kb) then the one from the wrapper-vendor.

(a support issue was creates also btw under BSP-5837)


author: Remon van G
body: Conclusion:Yes it's a confirmed bug.

<https://jira.atlassian.com/browse/BAM-10173>


Tags: wrapper
Bitbucket Commits List Doesn't Show All Tags
Asked by Duc Nguyen Nhu:

We have a problem with displaying the tags in the commits list. We have the scenario that in the Bitbucket UI less tags are shown than the actual number (in our specific case 2 of 4 tags are only displayed).

But if you check it on the Git Terminal all tags are correctly displayed.

**Bitbucket Server Version:**  
Atlassian Bitbucket v7.12.1

Can anyone help?


Answers:
author: Aron Gombas _Midori_
body: What is "actual number"? Is this what you see in your local clone?

(If so, then maybe you just forgot to push the recently tags to Bitbucket. A plain vanilla push doesn't push tags, you have to use "git push --tags".)

comments: author: Ingo Mohr
body: Hi Aron,

I'm w/ [@Duc Nguyen Nhu](/t5/user/viewprofilepage/user-id/4396068) 's team.

When we clone the repo from Bitbucket to an empty folder and the call \`\`git log\`\` on a terminal, Git (2.32.0.windows.1) shows 4 tags for that commit. Bitbucket UI, however, only shows 2.

The commit SHA is the same on both the terminal and Bitbucket UI. So is the message. Only 2 tags are missing on Bitbucket UI.

(We also checked this on another Git client - Eclipse. Which also shows 4 tags).

i.e. the entire Git repo didn't exist before on the local machine. It came all - including tags - from the Bitbucket server.


author: Aron Gombas _Midori_
body: Hmm, if I were you, I'd compare a tag that is shown against another that isn't and would try to find a common characteristic. (For example, one may be a lightweight tag and the other an annotated one... Dunno.)


author: Ingo Mohr
body: Good point. We'll check that. Thx :)


author: Duc Nguyen Nhu
body: Hi Aron,

thanks for the hint. I checked all tags if they are lightweight or annotated tags. Referring to the initial post only 1 of the 4 tags is a lightweight tag but it seems that there is no difference in what is displayed. Both can be shown in the commits view (verified it by checking former lightweight tags which are also displayed).

Do you know if there is a limitation of number of displayed tags?

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


author: Aron Gombas _Midori_
body: I'm quite sure that there is a limit on the number of tags displayed, but I can't imagine this being as low as 2...


author: Duc Nguyen Nhu
body: Do you have any idea how I can find out about the limit on the number of tags or who might know this?

thanks in advance.


author: Aron Gombas _Midori_
body: If you have a valid license for Bitbucket, you have access to its source code, so you can check it for yourself. But, I guess, it's faster to open a ticket at Atlassian as you are eligible for commercial support.


Tags: bitbucket-server

server
Bitbucket pipeline with Terraform and OIDC
Asked by Lucas Possamai:

Hello,

I'm trying to setup Bitbucket pipeline with terraform and OIDC authentication. Following [this](https://support.atlassian.com/bitbucket-cloud/docs/deploy-on-aws-using-bitbucket-pipelines-openid-connect/) article works, but only if I use awscli.

Was wondering if someone used this in the past with Terraform and could help?

Thanks!


Answers:
author: Lucas Possamai
body: I managed to get this working. Please, check [this](https://www.reddit.com/r/Terraform/comments/pe6kzi/help_with_bitbucket_pipeline_terraform_and_oidc/) link for more info.

comments: author: Oleksandr Kyrdan
body: Hi [@Lucas Possamai](/t5/user/viewprofilepage/user-id/4475937)

Thank your for sharing working solution and contributing to the community!

Best regards,  
Oleksandr Kyrdan


author: Halyna Berezovska
body: [@Lucas Possamai](/t5/user/viewprofilepage/user-id/4475937) Terraform is working with different providers. If yours is not AWS , then what? for Google cloud it may be a little bit different configuration, e.g.

Regards, Galyna

comments: author: Lucas Possamai
body: Yes... I'm using Terraform with the AWS provider. Please, check my answer below.


Tags: bitbucket-pipelines
Bitbucket runners Error STARGATE_BITBUCKETCI_REST_SERVICE_GET_WORKSPACE_RUNNER
Asked by Joris Vleminckx:

Hello,

We are trying to deploy self-hosted runners and one of our pipelines always seems to fail in the same point, while pushing to GCP, with the below error message:  

--  
\[2021-08-30 20:55:38,173\] An error occurred whilst getting the runner.  
java.util.concurrent.TimeoutException: null  
at com.netflix.hystrix.AbstractCommand.handleTimeoutViaFallback(AbstractCommand.java:997)  
at com.netflix.hystrix.AbstractCommand.access$500(AbstractCommand.java:60)  
at com.netflix.hystrix.AbstractCommand$12.call(AbstractCommand.java:609)  
at com.netflix.hystrix.AbstractCommand$12.call(AbstractCommand.java:601)  
at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.onError(OperatorOnErrorResumeNextViaFunction.java:140)  
... 14 common frames omitted  
Wrapped by: com.netflix.hystrix.exception.HystrixRuntimeException: STARGATE_BITBUCKETCI_REST_SERVICE_GET_WORKSPACE_RUNNER timed-out and no fallback available.  
at com.netflix.hystrix.AbstractCommand$22.call(AbstractCommand.java:822)  
at com.netflix.hystrix.AbstractCommand$22.call(AbstractCommand.java:807)  
--

Other images are pushed just fine.  

Any ideas why this might happen?


Answers:
author: Alejandro Garc?a
body: After further troubleshooting, this just seems to be a problem on our end regarding our network's MTU. The timeout error (originated in one of the runner dependencies) was just a symptom of packets not being replied due to our networking issues. After adjuting the MTU settings in our servers we were able to solve this problem.


Tags: bitbucket-cloud

bitbucket-server

cloud