youngmon/atlassian-qna huggingface dataset:
Run a script file from Checked out code in bamboo
Asked by Shamsudeen Shaikh:

I am completely new to bamboo, I have a build.sh file in my checked out code, which i want to run for my build process.

Can anyone help me with the steps to be followed.

Thanks,

Shams


Answers:
author: Shamsudeen Shaikh
body: I got it...

comments: author: Gretchen
body: For others users .\\appropriate build directories within the ${bamboo.build.working.directory}\\script name with extension (quote if spaces are present)
Cannot get plan variable
Asked by Khoa Nguyen MInh:

I'm testing the evaluation of Bamboo system. I denfined a plan variable: bamboo_db_ipAddress. When I tried to echo this variable from build.xml, it seems to be I got the variable name, not the variable value. anyone can help me to figure it out?

|----------------------|---------------------------------------------------|
| uploaddb:            |
| 29-Oct-2013 15:46:11 | \[echo\] db Ip address is: ${bamboo_db_ipAddress} |


Answers:
author: rambabu patina
body: I'm not sure if this was just a copy/paste error, you need to put 'bamboo' infront of the varaible name.

Like.. ${*bamboo*.bamboo_db_ipAddress}

Hope helps you

comments: author: Khoa Nguyen MInh
body: I've found the reason. the variable name should be ${bamboo.db.ipAddress} instead of ${bamboo_db_ipAddress}. Actually, I imported the configuration from the earlier version of Bamboo system, and it still can work well with this kind of variable name in the earlier version.


author: rambabu patina
body: If you satisified with my answer please accept the answer/upvote my answer.


Tags: plan

variable
Bamboo - Undesired prompt for install
Asked by mustard:

I successfully installed Bamboo and had it running builds from Stash. Upon stopping Bamboo, restarting server, and returning to the Bamboo home page, I was taken to the beginning of the setup wizard.

It looks like everything is there from the last install such as user and home variable. Any help would be appreciated.

Thanks


Answers:
author: mustard
body: Marcin - thanks for getting in touch. I ended up submitting a ticket and it looks like the issue was that I had previously installed Bamboo on my local machine. I was testing everything before moving to a remote machine and I either didn't completely uninstall or forgot to altogether. Upon removing all Bamboo-related files from the local machine and reinstalling on the remote, everything works as expected affter stop/start and reboot.

Thanks again


author: Marcin Gardias
body: It's probably the best to take this kind of problems to Atlassian Support.

Please attach Bamboo logs when doing so.


Tags: bamboo-administration
Grails -non-interactive except it's not. Any ideas to work around?
Asked by Gretchen:

I'm trying to use the grails plugin to compile a grails project and in the plugin command box it claims to append --non-interactive to each command. Yet I'm still prompted to send info to VMWare (in grails 2.1.2 from the UaaIntegration piece, or if I run my 2.1.2 project with 2.2.4 it prompts me if I'm sure that I want to upgrade my project to 2.2.4.   

Suspiciously like not really non-interactive. Anyone have any suggestions to get around these? I can run it from the command line in a script, but then I can't collect the output as an artifact to share with deployment projects etc.


Answers:
author: Gretchen
body: Looks like in some cases a simple syntax error in the build will cause this. I didn't fully understand the syntax of the grails commands and by putting an argument to a command on a newline it caused this problem.


Tags: grails
Binding Cucumber test results with Bamboo build
Asked by Johnson Eapen:

We are using Cucumber JVM for writing our acceptance tests and we have Bamboo as our CI and Gradle as the build tool. Currently we are using the [Cucumber Bamboo](https://marketplace.atlassian.com/plugins/com.hindsighttesting.behave.cucumber-bamboo-plugin) plugin to see the test results.

Is there a way we can bind these test results to the Bamboo build itself, so that we can tell that a build has failed based on the results generated by Cucumber.

Any help is greatly appreciated.

Thank you,

John


Answers:
author: VikasB
body: You can use Cucumber For Bamboo plugin. This plugin adds Cucumber parsers in Build as well ad Deployment plans. It provides options to pass or fail build if any test is failed or based on failure threshold or can just print test results in Log without affecting deployment status.  
The plugin also adds new UI elements to display deployment tests, Cucumbers results and pie chart of tests. It also has features to automatically link tests with JIRA issues.  
<https://marketplace.atlassian.com/plugins/com.mdb.plugins.cucumberforbamboo/server/overview>

comments: author: janakik
body: Hi Vikas

I tried to use in deployment project but I could not hook the results to show up in the bamboo server after the deployment is success, but I can see the cucumber_parser results in the logs. Any help is much appreciated.


author: VikasB
body: If you can send logs to vikasborse@autotestingtools.com I could help.


author: Alan Parkinson
body: The updated version of [Cucumber Reports for Bamboo](https://marketplace.atlassian.com/plugins/com.hindsighttesting.behave.cucumber-bamboo-plugin?utm_source=atlassian-answers) (Renamed BDD Insights for Bamboo) now binds Cucumber-JVM test results to the Bamboo within the "Tests" tab
In a bamboo BuildRequirementUpdated event, how can I get the user who made the change?
Asked by DaveD:

I'm trying to write a Bamboo plugin that will perform some actions when a jobs requirements change and I'd like to find out who is making the change (either an admin or a user).

The problem I'm seeing is that the event is firing correctly but the user reported by the sal.api.user.UserManager is always the SYSTEM user.

My plugin is as follows:

```
public class BuildRequirementUpdatedListener {    private static final Logger log = Logger            .getLogger(BuildRequirementUpdatedListener.class);    private UserManager userManager;    public BuildRequirementUpdatedListener(UserManager userManager) {        this.userManager = checkNotNull(userManager);    }    @EventListener    public void handleEvent(            BuildRequirementUpdatedEvent buildRequirementUpdatedEvent) {        log.info("Plan Key: " + buildRequirementUpdatedEvent.getPlanKey());        log.info("Logged in user: " + userManager.getRemoteUsername());    }}
```

Can anyone advise on how I can find if the person making the change to the build requirements is an admin or a regular user.

Thanks


Answers:
author: EddieW
body: getRemoteUsername on the uiser manager has nothing to do with the event. Your listener is being run by the system, the change (object we are inspecting) was not.

try poking with

buildRequirementUpdatedEvent.toString()

and

Object o = buildRequirementUpdatedEvent.getSource()

o.getClass();

You may end up needing to just get the plankey (buildRequirementUpdatedEvent.getPlanKey()) and then lookup the change using the auditlog service to get the acrtor.

[](https://docs.atlassian.com/atlassian-bamboo/latest/com/atlassian/bamboo/persister/DefaultAuditLogService.html)<https://docs.atlassian.com/atlassian-bamboo/latest/com/atlassian/bamboo/persister/DefaultAuditLogService.html>

auditLogEntry.getUsername(), getOldValue(), etc.


Tags: user
Bamboo Notifications to Google Talk
Asked by Ben:

We use Google Talk (now Google Hangouts, I suppose) in Google Apps (for your domain).

AFAIK, the Instrant Messaging Address in that case is just our email (which has no indication that it is google/gtalk/etc). Is there something special we can do to make Bamboo work with Google Talk in this way, so we can get IM notifications from Bamboo.

I recognize that Google is going away from XMPP with Hangouts, but my pidgin IM client still works, so I think Google is still supporting it (albeit with the XMPP server being explicitly set to talk.google.com:5222, which is different from the domain).

Note that the [documentation about Google Talk for Bamboo](https://confluence.atlassian.com/display/BAMBOO/Configuring+Bamboo+to+use+Google+Talk+for+Instant+Messaging) does not apply to OnDemand - I am looking for an answer in OnDemand. Perhaps it is just as simple as knowing what the Bamboo sender user is so I can add it to my approved list of receipients.


Answers:
author: Ben
body: Turns out this is a [bug in Bamboo OnDemand (BAM-13938)](https://jira.atlassian.com/browse/BAM-13938) - that the admin can no longer administer the IM configuration...if you have this issue, please vote for that!


author: LucasA
body: Hi Ben,

Atlassian doesn't provide a direct integration with Google Hangout / Talk. You can write your own scripts and add the message as a script task on your plan.

However, customer can integrate Bamboo with Atlassian HipChat. The documentation can be found at <https://confluence.atlassian.com/display/BAMBOO/Integrating+Bamboo+with+HipChat>

Cheers,

Lucas Lima

comments: author: Ben
body: Specifically, you mean create a **command configuration** task in our plan? Is there a variable for the **responsible user** (I suppose [bamboo.ManualBuildTriggerReason.userName](https://confluence.atlassian.com/display/BAMBOO/Bamboo+variables#Bamboovariables-Build-specificvariables) would work in some cases) and how do you make it do this only on failed builds and first successful build.

Assuming you could do all that (which I doubt you can) then this would have to be added to all our plans rather than the nice notification system in Bamboo.

I have created a [feature request](https://jira.atlassian.com/browse/AOD-6877) for it as well. Atlassian does not seem to be afraid of Google Apps integration in general, so that's a good sign...


Tags: cloud
Is there a way to move over individual plans/builds to a different Bamboo instance?
Asked by Jeremy Neuharth:

We are moving over to a new Bamboo server and believe it would be way easier to move over just the plans we want rather then do a full restore (moving from windows to Linux \& we don't want a lot of our old plans as we are cleaning up a bit).

Is there a way we can "export" specific plans and then "import" them into the new Bamboo server?


Answers:
author: Bharadwaj Jannu
body: I haven't tried but see the below link work for you

[https://answers.atlassian.com/questions/204845/can-i-export-import-individual-projects-plans](/questions/204845/can-i-export-import-individual-projects-plans)


author: Jeremy Neuharth
body: Looks like the simple answer is no. There is an improvement open on this if you want to vote on it: <https://jira.atlassian.com/browse/BAM-1223>
Adding New Agent - Restrict Plans
Asked by P Singh:

Hi,

I'm adding a new agent to our Bamboo Server (v4.3)

This new agent should only run one Plan and no other.

I know its possible to add a capability to the agents and the to the plans but I have more than 100 plans so don't really want to have to go into each one. It also means in the future i must always remember to add that requirement.

How do i control this/ensure once I add my new agent it doesn't start running the other Plans?

Thanks.


Answers:
author: Timothy
body: Add a custom requirement to the agent. Then in your plan, use that custom requirement.


Tags: remote-agent

restriction
auto-snapshot on sucessful build in Bamboo?
Asked by Judah Diament:

is there a way for Bamboo to trigger creation of a snapshot of a code base built by a given plan whenever the build succeeds? The SCM being used is Rational Team Concert


Answers:
author: Judah Diament
body: snapshot of the code that was just built as part of the plan. the scm is Rational Team Concert.


author: Przemek Bruski
body: snapshot of what?


Tags: snapshot
If a plan has multiple build plans, will the second child plan not start until the first child is complete?
Asked by David Karr:

We recently upgraded to Bamboo 4.4.5, from I believe 3.4.3.

One thing I noticed is that there seems to be less flexibility in setting child plan relationships. I used to be able to change a child plan and make itself a child of another plan, without changing the parent plan. I could set this so the child plan would run asynchronously from the parent plan. Now, in 4.4.5, I have to edit the parent plan in order to have a child plan. This could be just a minor annoyance, as long as the functionality is still the same.

Where I'm really concerned is when I have multiple child plans. I would think that in the old Bamboo, I could define multiple child plans that would start asynchronously after the parent plan completes. I never tested that, but it seems logical.

Now, in 4.4.5, I have to define all of the child plans specifically in the parent, and they are listed in a specific order. There is no indication of whether these plans will run synchronously or asynchronously. I would assume that if it doesn't state it, it would be synchronously. That could be a big problem if someone needs the results from the second plan and the first plan takes a long time to complete, and the two plans are not dependent on each other.


Answers:
author: Marcin Gardias
body: When the parent plan finishes all his children are queued immediately. They will then build as soon as agents are free to pick them up (so if you have enought agents, they will all start building in parallel)
Bamboo ORA-01400: cannot insert NULL into ("BAMBOO"."BRS_ARTIFACT_LINK"."LABEL")
Asked by Edwin Priebernig:

Hi,

I upraded Bamboo from 4.4.5 to 5.1.1. Now a build plan fails with this message:

```
org.springframework.dao.DataIntegrityViolationException: Hibernate operation: Could not execute JDBC batch update; SQL []; ORA-01400: cannot insert NULL into ("BAMBOO"."BRS_ARTIFACT_LINK"."LABEL"); nested exception is java.sql.BatchUpdateException: ORA-01400: cannot insert NULL into ("BAMBOO"."BRS_ARTIFACT_LINK"."LABEL")Caused by: java.sql.BatchUpdateException: ORA-01400: cannot insert NULL into ("BAMBOO"."BRS_ARTIFACT_LINK"."LABEL")
```

Additionally it seems that the artifacts of old successful builds cannto be found. The Artifacts Tab shows an empty list and "No files found". If I check the path in bamboo-home, I see lots of files.  
So I'm afraid that the database upgrade did fail.


Answers:
author: Marcin Gardias
body: Please contact Atlassian Support. Attach all the log files you can find to the ticket. (just zip everything in \<bamboo_home\>\\logs)


Tags: bamboo-administration
Running build as root
Asked by Rob Latcham:

I'm currently trying to build an application. However, the API that I'm using cannot be run as root. Is there a way that I can change this? Hope for a speedy response!I use ANT to build.


Answers:
author: Rob Latcham
body: I \*don't\* want to run bamboo as root. But it appears that it is.


author: Daniel Wester
body: Not really sure what you're asking.. Are you wanting to run Bamboo as root(don't) or are you having to for this one build(even then - don't).I wouldn't advise running the bamboo build agents as root since you're letting anyone that can edit a build plan have full access to those servers(side effect of the script task).


Tags: bamboo-administration
Pre/Post Build Command Plugin compatible with bamboo 5.1.1
Asked by B:

When will "Pre/Post Build Command Plugin" be made compatible with bamboo version 5.1.1?


Answers:
author: ssetayeshfar
body: Hello Bryan and ndhanks,

I created the following ticket and asked for an update. Please vote and add yourself to this ticket as a watcher to receive future updates.

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

Thank you.

Best,

Sepideh


author: NedH
body: I'm also interested in when ready for 5.1.x.
Do Non-Bamboo Running EC2 Instances Count Toward my Remote Agent Limit?
Asked by Joe McCall:

We are currently running EC2 instances to host our solution. When we try to build using Elastic Bamboo it complains that there are too many unknown instances on my account. Is the expected use pattern to use a separate account entirely for our builds?

Thanks in advance!


Answers:
author: Przemek Bruski
body: You can share that account, you only need to bump the amount of unknown instances in Bamboo's configuration.

If your build agent instances don't need access to your account, it's a good idea to create a separate account for them. You can have them billed together by Amazon through combined billing.

comments: author: Alan Cabrera
body: Interesting. What is the purpose of this limit? Why does Bamboo even care about non-Bamboo instances?


author: cazcazn
body: I have run into the same problem. Our deployment stack is on Amazon services, and the account needs access to everything in order to work, however Bamboo won't build anything because it sees 100+ other instances which have nothing to do with it, and I don't see why Bamboo is concerned.


author: Przemek Bruski
body: Vote here: <https://jira.atlassian.com/browse/BAM-14354>


Tags: cloud
fail the build from a script inline
Asked by Giovanni Azua:

I have a C++ CMake project that after running unit tests using CMake I also would like to run couple of automated integration \[smoke\] tests. This is where the "Script Task" comes in handy. For example, we know that the correct default run of one of our algorithms should produce a specific MSE. Therefore I write an integration test using "Script Task" with the following:

```
./debug/my_ml_algorithm 2&gt; out &amp;&amp; grep "\[info\] mse\=1\.99624e-05" out
```

And this works fine, however, if the line is not matched and therefore grep produces a non-zero exit value the build will fail but it will not indicate that this Script Task named "Integration Test #1: my_ml_algorithm default run" has failed, instead Bamboo shows that the build failed with error "**No failed tests found, a possible compilation error occurred.**" How can I make the Script Task "inform" Bamboo that this integration test is responsible for the failed build?


Answers:
author: Gretchen
body: I would probably parse the output and stick an evaluation in there which sets the exit value to "0" if it is an acceptable result. I do this with robocopy results that are not 0 but are not failures.

I don't know what you're scripting in but something like this should work:

:error rem eval results in a fail  
exit 1;   
:end rem eval results in a success  
exit 0;

comments: author: s2zaman
body: To **forcely fail a bamboo build** , use this one-liner script command *(in a bamboo script task with PowerShell interpreter)*.

```
throw "your test custom message."
```

just try this, run your build and it will fail with this message in the logs :)

**in my case, i use:**

```
$myPath = "C:\just1\just2"if(Test-Path $myPath){
 Write-Host "Sent fail trigger to bamboo" throw "your test custom message."}
```

HOPE THIS IS YOUR ANSWER :)


author: Rodion Stratov
body: +
Connect Bitbucket-repository to my own live server
Asked by Rowdysign:

Hello, I am hosting all my websites and webapps in GIT at Bitbucket. Untill now if I have updates regarding my code I upload my code manually to my live server, not really handy ofcourse I know. So I am trying to install GIT with post-receive on my live server but it's not working all the time (I don't have a lot of knowledge regarding servers).

I was wondering if there is some other way to connect my Bitbucket repositories to my live server? If so, how? Thanks in advance.


Answers:
author: Patrik S
body: Hello [@Rowdysign](/t5/user/viewprofilepage/user-id/153830) ,

Thank you for reaching our to community.

You could make use of Bitbucket Pipelines in order to deploy the code in your repository to another server.

To start using pipelines, you will have to create a YML file named *bitbucket-pipelines.yml* in the root of your repository repository. In this YML file you can configure a series of steps and the scripts to be executed in each step whenever the pipeline is triggered. For example, if you want to execute your deployment scripts every time a push is made to master branch, your YML file would look like the following :

```
pipelines:
? branches: #these will run on every push of the branch
? ? master:
? ? ? - step:
? ? ? ? ? script:
? ? ? ? ? ? - <command 1>
            - <command 2>
```

For more details on the different trigger options you can use in the YML file, and guidance on how to configure it, you can refer to the following documentation :

* <https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/>

Specifically for deployment, we have several pipes that can be used as commands in the script section of your yml file, and help on automating the process. Allow me to share a few examples :

* [Deploy using SCP](https://bitbucket.org/product/features/pipelines/integrations?p=atlassian/scp-deploy)
* [Deploy using rsync](https://bitbucket.org/product/features/pipelines/integrations?p=atlassian/rsync-deploy)
* [Deploy using FTP](https://bitbucket.org/product/features/pipelines/integrations?p=atlassian/ftp-deploy)

We also have pipes that facilitate the deployment to cloud services, such as AWS, Google Cloud, Azure and so on. For a full list of available pipes you can refer to below link :

* [Bitbucket Pipelines Integrations](https://bitbucket.org/product/features/pipelines/integrations)

Hope that helps. Let us know in case you have further questions :)

Thanks, [@Rowdysign](/t5/user/viewprofilepage/user-id/153830) .

Kind regards,

Patrik S


Tags: bitbucket-cloud

cloud

git

server

workflow
Should I go to Bitbucket enterprise or cloud?
Asked by baz baz:

Hi,

I am using Bitbucket Server and since Atlassian discontinue the server support, should I move to Bitbucket Enterprise or Bitbucket Cloud?

Is Atlassian going to continue to support Bitbucket Enterprise? Will it be discontinued in the future?

Thank you.

Barry


Answers:
author: Fabio Racobaldo _Herzum_
body: Hi [@baz baz](/t5/user/viewprofilepage/user-id/4736686) ,

it depends from your needs. Data Center instance will be supported by Atlassian in the future. Many enterprise customers need DC instances in order to manage their data.

Btw, an interesting article is provided by clear vision <https://www.clearvision-cm.com/blog/atlassian-cloud-vs-atlassian-data-center/>

Hope this helps,

Fabio


Tags: bitbucket-server

server
Plan limit
Asked by iamfida:

Hi,  
I have been invited to the repository, when I go for the accept invitation, it says **"This account is already at its plan limit and will need to be upgraded before adding more** users."  
Kindly let me know, is this issue with my account or an issue with the repository admin account?


Answers:
author: Theodora Boudale
body: Hi [@iamfida](/t5/user/viewprofilepage/user-id/1512536),

This issue has to do with the workspace where you were invited, not with your own account.

A workspace on the free plan allows for 5 users and the message indicates that the workspace of the repository you were invited to has already 5 users.

The owner/admin will need to do either of the following:

1. Upgrade the billing plan of the workspace to allow more than 5 users to have access from <https://bitbucket.org/>\<workspace-id\>/workspace/settings/plans-and-billing

2. OR if there is a user in the workspace that doesn't need to have access, the admin can remove that user from <https://bitbucket.org/>\<workspace-id\>/workspace/settings/plan-users so you can be added to the repo

Kind regards,  
Theodora


Tags: bitbucket-cloud

plan