youngmon/atlassian-qna huggingface dataset:
Component test on Bamboo cloud
Asked by Steve Vega:

Hi,

I'm just starting to use Bamboo Cloud, and I'm trying to integrate some component tests (many of them have to connect to the database) that runs using PHPUnit to the build plan. Apparently there is no way to connect to a database using the cloud version, so how are this kind of component tests usually ran using Bamboo cloud?


Answers:
author: Alexey Chystoprudov
body: You can create your own Amazon instance (AMI) which contains required DB and use it in your tests


Tags: cloud

database

phpunit
Stage stuck with status "Job has not yet been queued. Waiting for prior stages to complete." for no evident reason.
Asked by David R Cattley:

I have a plan that blocks a stage with status "Job has not yet been queued. Waiting for prior stages to complete." and yet the prior stages report status completed and at least 9 agents are available that can build the stage currently waiting.

This also affects a clone of the plan.

How can one go about troubleshooting what the issue is and resolving it?


Answers:
author: David R Cattley
body: I did check that before posting and, yes, multiple agents were online and able to run the job.

I subsequently discovered the issue:

The Job contained a disabled Task of type Artifact Download. The Artifact Download task had been created with a reference to a Plan that had subsequently been deleted from the system. Even though the Task was disabled, the system evidently blocked the Job from being scheduled because the referenced Artifacts were not available. After removing (deleting) the Task from the Job, the system now schedules the Job.

There are a few things that could have made this easier to understand:

1. If the Task is disabled, it need not play a role in job scheduling.
2. There was no indication in the error message that the Job was being held due to unsatisfied Artifact dependency. The presented message was completely misleading as it mentions prior stages instead of Artifacts (from another Plan).
3. There was no indication in the Task as displayed in the Job that the parameterization of the Task (which Plan and Artifacts were specified) were no longer valid.
4. While I cannot be sure I suspect that there was no warning (or notice) at the time the original source Plan of the Artifacts was deleted thus leaving the dangling reference in the consuming Job/Plan.

In any event, I have figured it out and I appreciate your response.

Regards.

-Dave

comments: author: Alexander Borkun
body: Thanks Dave, the same problem in 2017 :)


author: Amanda Culver
body: ... and 2018

No disabled tasks in either Stage1 or Stage2. All Stage2 artefact download tasks pull valid and non-zero shared artefacts.

Solution: I had changed the built artefacts in Stage1, and reflected the changes in the artefact downloads of Stage2 - but still Stage2 was not starting. The solution was to set all tasks download \*ALL\* artefacts, run a build, then reset it to pull only the new artefacts and success.


author: ChS
body: I simply cloned a plan with artifact download tasks and got the same problem as David reported.

It turned out the clone used the artifact references to its original plan in all Artifact download tasks. Putting the right data into the downloader tasks' dialogs solved the issue.


author: rsperafico
body: Hello David,

Thank you for your question.

Could you check Agent Matrix (in Administration) to see if your agent(s) can build your plan, please?

---

Kind regards,  
Rafael P. Sperafico  
Atlassian Support


Tags: bamboo-administration
Does Bamboo support nested variables?
Asked by a b:

Assume we have a variable A=abc, is it possible to define a variable B=${bamboo.A}xyz?


Answers:
author: Krystian Brazulewicz
body: Can you please check if this plugin works for you: <https://marketplace.atlassian.com/plugins/net.collabsoft.plugins.bamboo.nestedVariables>

comments: author: a b
body: Hi @Krystian Krystian , we can make do with hard coding the variable for now. Your suggestion is appreciated.


author: a b
body: Ha, I could answer my own question. The answer is YES, see [Bad+Substitution+in+nested+variables](https://confluence.atlassian.com/display/BAMKB/Bad+Substitution+in+nested+variables). The ticket [BAM-8266](https://jira.atlassian.com/browse/BAM-8266) has been dormant there for 3 years!!


author: a b
body: Rafael, Bamboo ver 5.7.2. I am going to define some global variables, one of them is a version number or something, which is referenced by others.

Looks like the plugin mentioned by @Kendall Shaw is what I need. Thanks, @Kendall Shaw.

Just want to double confirm that, nested variables are not natively supported by Bamboo, right?


author: Kendall Shaw
body: I haven't tried it, but:

<https://marketplace.atlassian.com/plugins/net.collabsoft.plugins.bamboo.nestedVariables>

If you look at the documentation on variables there are links on the subject.


author: rsperafico
body: Hello,

Thank you for your question.

Could you please let us know which Bamboo version are you running and where are you planning on using the nested variable, please?

---

Kind regards,  
Rafael P. Sperafico  
Atlassian Support
Bamboo ArtifactTransferPayload
Asked by Alicia Pena:

What are the com.atlassian.bamboo.v2.build.agent.messages.ArtifactTransferPayload##################.tmp files in the artifacts folder? Out bamboo disk is 90% full and I'm in the process of adding another hard drive the VM and pointing links around to spread the data. But I noticed there are many of those ArtifactTransferPayload.tmp files there taking up space. How do I clear those?


Answers:
author: Przemek Bruski
body: You can just delete all these files older than one day.

comments: author: Alicia Pena
body: Okay, thank you! Do you know what left those behind and is this something I have to continually check on?


author: Przemek Bruski
body: These are failed artifact transfers, most likely due to server restart. Bamboo should really be cleaning these up during restart, but it does not - it looks like you need a cleanup job set up on the server.


author: Alicia Pena
body: Thank you!


author: Przemek Bruski
body: Bamboo 5.10 should clean them automatically.


Tags: bamboo-administration
SVN postcommit trigger redirects to login page
Asked by Curtis Stewart:

We've updated our SVN postCommit script according to the Bamboo docs [here](https://confluence.atlassian.com/display/BAMBOO/Configuring+source+code+management+triggers+for+Subversion). However, when a commit triggers this command the request is redirected to the login page. I've tested the same link in a browser, and if I then login I receive a valid error: "Build request for plan.....originated from....which is not an allowed address...".

Is there a setting we've missed that will avoid this redirect?


Answers:
author: cstewart
body: We have defined IPs specific to our repository. The response to the request is as follows:  

Build request for plan "PROJECT - Plan" originated from 172.31.146.59,127.0.0.1 which is not an allowed address (one of\[129.83.19.45, 172.31.146.59\]).

This response doesn't make sense to me because the orginating address is included in the allowed addresses.

comments: author: rsperafico
body: Hello Curtis,It seems you are experiencing the issue described in here: <https://jira.atlassian.com/browse/BAM-1172>---Kind regards,Rafael P. SperaficoAtlassian Support


author: Krystian Brazulewicz
body: Yeah, try adding "127.0.0.1" to your list of allowed IPs


author: Curtis Stewart
body: That did the trick (adding 127.0.0.1). Thanks for the support Rafael and Krystian!


author: rsperafico
body: Hello Curtis,

Thank you for your question.

It might be the case where you have specified "*Trigger IP addresses* " under "*Plan Configuration \>\> Triggers*" tab.

Screen Shot 2015-03-03 at 9.40.54 AM.png

Please, refer to [Repository triggers the build when changes are committed](https://confluence.atlassian.com/display/BAMBOO/Repository+triggers+the+build+when+changes+are+committed) documentation for further information.

If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.

Thank you for your understanding.

---

Kind regards,  
Rafael P. Sperafico  
Atlassian Support  
[](https://community.atlassian.com/t5/Bamboo-questions/SVN-postcommit-trigger-redirects-to-login-page/qaq-p/119352?attachment-id=12514){#link_11690092e79cc3}  
[](/tnckb94959/attachments/tnckb94959/bamboo-questions/3786/1/Screen%20Shot%202015-03-03%20at%209.40.54%20AM.png){#display_11690092e79cc3_0}


Tags: bamboo-administration
I want to use checkstyle, static code analysis plugin with bamboo, is there any way to use them? are they supported?
Asked by NAGA SAKETH JALIGAMA:


Answers:
author: Felipe Kraemer
body: Hello Naga,

The only add-ons that can be installed in Bamboo Cloud are listed here:

<https://marketplace.atlassian.com/plugins/app/bamboo/new?hosting=cloud>

So, I don't believe you will be able to install this plugin you want.

If this answer was helpful, please allow me to ask you to mark my answer as accepted in order to have it in the top of the thread, also helping other customers.

Thanks in advance!

Kind regards,  
Felipe Kraemer

comments: author: Karthikeyan Kulasekaran
body: Hi FelipeWhat do you suggest for Bamboo on premises installations. Do you have any plugin which gives a nice report for checkstyle , PMD and static code analysis ?


author: Felipe Kraemer
body: Hi Karthikeyan,What do you mean by 'premises installations'? Self-hosted instances? There is an unsupported and outdated plugin at Marketplace: <https://marketplace.atlassian.com/plugins/com.atlassian.bamboo.pmd_bamboo>You might also find this useful: <https://answers.atlassian.com/questions/173061/bamboo-pmdcheckstyle-integration>Cheers,Felipe Kraemer


author: Karthikeyan Kulasekaran
body: Hi FelipeYes , We host bamboo in our own server and evaluating Bamboo for continuous integration and deployment . Since most of the bamboo plugins are being outdated what do you suggest for fulfilling users needs ?


Tags: cloud
Is the script task's PWD always the same as the build working directory?
Asked by Kendall Shaw:

?


Answers:
author: Krystian Brazulewicz
body: Yes, if you find that it differs it qualifies as a bug.


author: Kendall Shaw
body: I think I need to clarify:

Is $PWD always the same as $bamboo_build_working_directory?


author: Kendall Shaw
body: Sorry, I don't understand the answer. Yes it is always the same?


author: Krystian Brazulewicz
body: Yes Bamboo changes working directory to a build working directory for the script task. You can use [Bamboo variables](https://confluence.atlassian.com/display/BAMBOO/Bamboo+variables#Bamboovariables-Build-specificvariables) to get build working directory (and more) injected into your script task.
Checkout Default Repository(1) failed with code 128
Asked by a b:

Hi all, the environment we are using is stash, bamboo and clover. Initially, I enabled git flow branch, everything goes well, the code can be fetched from stash, compile correctly, artifact, etc. Then I tried to integrate clover with bamboo, one job for Clover, one job to produce artifact, however the error shows up frequently (not every time). The credential is not updated for the time being. Any ideas? Thanks.

bamboo_authentication_error_1.png

```
om.atlassian.bamboo.plugins.git.GitCommandException: command /opt/git/2.1.0/bin/git ls-remote ssh://6ea4a535-4dbd-4ee2-8c56-b25826d042d0@127.0.0.1:44090/~xx/xx.git failed with code 128? stderr: Authenticating remote session failed stdout: [Warning: Permanently added '[127.0.0.1]:44090' (RSA) to the list of known hosts.?Authenticating remote session failed: Session is closed], fatal: Could not read from remote repository., , Please make sure you have the correct access rights, and the repository exists.])
```

[](https://community.atlassian.com/t5/Bamboo-questions/Checkout-Default-Repository-1-failed-with-code-128/qaq-p/265994?attachment-id=5692){#link_116900caa5cf14}  
[](/tnckb94959/attachments/tnckb94959/bamboo-questions/8441/1/bamboo_authentication_error_1.png){#display_116900caa5cf14_0}


Answers:
author: a b
body: Stash v3.5.0I cannot run git command in agent, because I am not admin. If running the git command in my local machine, it is fine.The error did not occur today. Let's put aside this issue. I will ping you if the error is up again.Thanks a lot.


author: Marek Parfianowicz
body: - what Stash version do you use? - did you try to run exactly the same git command outside Bamboo? what happens?


Tags: bitbucket-server

clover

git
Create a build artifact?
Asked by Kendall Shaw:

I am having trouble understanding the documentation. I want the plan to create a file and have it presented in some way in a UI so that a human can click somewhere and get the file.

In a stage artifact definition, does artifact location mean the place where my build will put artifacts? Or is there some mysterious mechanism by which bamboo puts files in that location?

What is the copy expression relative to? If it's generic bamboo location blah, how does my script find out where that is so it knows to deposit files there for bamboo to copy, if that is necessary?


Answers:
author: Kendall Shaw
body: The copy pattern is required, so I do need it. It is an inclusion pattern.

It appears that:

out/some-file

doesn't work, because the pattern is relative to the location.

Any of these work:

some-file

\*\*/\*

\*

This does not:

out/\*

<https://confluence.atlassian.com/display/BAMBOO/Configuring+a+job%27s+build+artifacts>

I missed this in the documentation:

* The location is relative to the build directory. Do not use the absolute path to refer to the location.
* The copy pattern is relative to the location specified.

"The build directory" is ${bamboo_agentWorkingDirectory}.${bamboo.buildKey}

Your build script puts the artifact into the specified location (as opposed to your build script needing to expect it to have been put there by some builtin task).


author: Timothy
body: > In a stage artifact definition, does artifact location mean the place where my build will put artifacts? Or is there some mysterious mechanism by which bamboo puts files in that location?

Whatever your build generates in the **Tasks** tab can be defined as an artifact in the **Artifacts** tab. You just need to give it a name, place to find it and what regex to find the artifact.

comments: author: Kendall Shaw
body: The place to find it and what regex to find the artifact is the part I am asking about.

Do I put the artifact there? Or do I find the artifact there?

I've tried using this definition, e.g.:

Location: out

Copy pattern: out/some-file

My build script puts some-file in ${bamboo_agentWorkingDirectory}.${bamboo.buildKey}/out

After the build, the file is there, but the result of the build says the job created no artifacts.

If Location means the place where Bamboo put the artifacts (somehow), I have no idea what value that would be.


author: Timothy
body: You need to understand the difference between "Location" and "regex". If you already specify the location, you don't need to add the location in your regex.
log output of script task?
Asked by Kendall Shaw:

I have an inline shell script as a script task.When I run the plan that it is part of (it's set to manual), it says it completed successfully. On the logs tab it says no logs were found for this job. The script did not execute the commands that are in the script. Is there some way to see what it did? Can I log stdout and stderr somehow?

Actually, other posts seem to indicate that this is supposed to be happening already. Any ideas?


Answers:
author: Kendall Shaw
body: Thanks. I had the stage set to manual and was running the plan.


author: Caley Goff
body: I find this always helps when using scripts in Bamboo... it adds just enough verbosity to understand whats going gone

```
#!/bin/bashset -x?do stuff here...
```
Bamboo Oracle 12c support
Asked by Jason Smith:

According to the Bamboo documentation Oracle 12c is not supported. After January 2016 we will be required to purchase extended support from Oracle if we need to remain on the latest 11g version (11.2.0.4). This is not ideal as it involves a substantial additional cost on top of our existing support agreement with Oracle. Will Bamboo be supported for Oracle 12c before January 2016?


Answers:
author: Craig Oliver
body: Feature request is here <https://jira.atlassian.com/browse/BAM-15685>

Atlassian do not seem to rate it as a high priority. I've had Bamboo running on Oracle 12c without issues except for an apparent incompatiblity with the SonarQube add-on.


author: gilesthefourth
body: Hi Jason,

I'm afraid that the current road map for Bamboo will not officially support Oracle 12c before January 2016. However, I do encourage you to file a feature request if possible at <https://jira.atlassian.com/>. Please feel free to leave comments explaining your use case.   

Also, for your review: [Implementation of New Features Policy](https://confluence.atlassian.com/display/DEV/Implementation+of+New+Features+Policy)  

Please let us know if you have any questions or concerns.  

Regards,  
James


Tags: bamboo-administration
can bamboo integrate and deploy oracle database code?
Asked by Lavanya R:

Generally the code in DB is deployed incrementally.can this be achieved with the help of bamboo?Does the execution of .sql scripts possible with bamboo?


Answers:
author: agtinternational
body: I have done it in the past using SQL plus as normal shell. I have also used a text file as log which I parsed after for any ORA- messages and printed as failed test results in Bamboo

I have wrote a plugin for Oracle Log files that treats ORA- error messages as test failures (configurable using REGEX). I can provide this or place it in marketplace

comments: author: Sergei
body: Hi Lulius, Have you published your plugin in the marketplace. Would be curious to see what it looks like. Thanks


author: Krystian Brazulewicz
body: Bamboo doesn't provide any DB integration tools. However if you can script (in terms of shell script) your DB interaction then you can use Bamboo to do it for you.
How can I reference multiple build plans in deployment project
Asked by ericmulvihill:

I'm attempting to retrofit a continuous deployment pipeline onto our existing Bamboo CI infrastructure. For us, a "release" consists of a set of several Wars built by several different build plans.

It seems like a Bamboo deployment project can only reference the artifacts from a single build plan. For us, getting all the different artifacts under a single build plan feels impossible.

I'd like to aggregate build X of plan A, build Y of plan B, and build Z of plan C and call that "Release N".

Any way to do this? (I'm using 5.7.2) I tried making an aggregator build plan and copying the artifacts from several plans, but that method loses all references to what build the shared artifacts came from.


Answers:
author: Elli Pope
body: I found this article helpful - <http://blogs.atlassian.com/2013/10/sharing-artifacts-between-plans-and-other-best-practices/>

Essentially, in your primary build plan you need to download the artifacts from all of your other build plans, then republish the artifacts again. Now your primary build plan contains all of the artifacts from your other builds, and your deployment job can access any/all of the artifacts.

comments: author: Pushkar Rege
body: We ended up using this approach as well. Big downside of this approach is that when you want to make any change to the secondary build plan(s), you need to kick off the entire build pipeline


author: phil_scala
body: I am embarking on the same situation as the OP, any experts have some opinions? As of now I have to have separate "deployment" projects


author: Alec Keeler
body: Same issue here, my Build Project contains multiple build plans that build various sub-components of our product from different svn repos. These components are dependent on each other for build purposes and bamboo dependencies work well for triggering the rebuild of components when something they build against changes. But to deploy a release we need to deploy all the components, from about 40 build plans. How do you suggest we configure a Deployment project to collect and deploy the artifacts from these 40 Build Plans ?


author: Eclipse Trading
body: Same problem, it is troublesome to have multiple Deployment project tho, because 1) we need to remember to deploy together during deployment, and 2) in case of issue, we need to remember to roll back both projects.

On top of this, our system is quite complex, these inter-dependency is not the same during every release.


Tags: bamboo-administration
Bamboo service shuts down unexpetedly.
Asked by Chaitanya:

We have Bamboo version 5.5.1 build 4306 installation on a Linux CentOS machine. The problem is, it shuts down unexpectedly.   
I checked the catalina.out log file which does not show anything abnormal. I am only able to figure out one thing: Bamboo has generated a system error which I can see in the 'System errors' tab:

```
com.atlassian.bamboo.repository.RepositoryException: java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: com.atlassian.bamboo.plugins.git.GitCommandException: command /usr/local/bin/git ls-remote http://root:********@xyz/test.git/ failed with code 128. Working directory was [.]., stderr:[fatal: unable to access 'http://root:********@xyz/test.git/': Failed connect to xyz:80; Operation now in progress]
```

Is that causing bamboo shutdown?


Answers:
author: Krystian Brazulewicz
body: It is unlikely that this Git problem causes shut down of your instance. Please contact [Bamboo Support](https://support.atlassian.com/servicedesk/customer/bsp) with your case


Tags: bamboo-administration
How to run a stage or job only for one branch?
Asked by J:

We have regression and performance tests that we only need to run against our master branch (we're using feature branching on the project). How can I add a condition to only run those stages or jobs (either will work) when the master branch has been triggered for build/test?


Answers:
author: Krystian Brazulewicz
body: It's not possible. I suggest creating separate plan without branches for your regression/performance tests.


Tags: bamboo-administration