youngmon/atlassian-qna huggingface dataset:
Automatic Branch management of tags in Bamboo
Asked by Daniel Cruver:

Is there a way that I can make Bamboo's Automatic Branch Detection work for tags as well. I am stuck creating branches for each tag when a release tag is made.

If this feature needs to be added I would suggest it be added under Branches with an option like this:

Automatically manage tags

\[\] Automatically manage tags

Only create tags that match \[ \]

Remove after \[ \] days

Just like you do for Branches.


Answers:
author: PiotrA
body: Hello Daniel,

I don't think Bamboo can auto-detect tags at this moment. I think there is an open issue in the Bamboo tracker: <https://jira.atlassian.com/browse/BAM-13618> - if you feel this is what you are after then I'd recommend placing your vote on that issue (and add yourself to the watchers).

Does it help you?

regards
Bamboo predefined variable getting overwritten
Asked by Kent Rollins:

I have a build with multiple repositories so I'm using a plan variable to define the branch name so that all the repositories get checked out on the same branch for the build.

I defined a plan variable "repobranch". Each repository's branch field is set to ${bamboo.repobranch}. And I set the branch value for this variable on each branch of the plan. This all works great.

But then I wanted to use the branch name in my ant build scripts so I set an environment variable for the build: bamboo_branch=${bamboo.repository.branch.name}.

Now when the build runs, I get the following lines at the start of each task:

```
command	10-Oct-2013 16:32:27	Substituting variable: ${bamboo.buildNumber} with 110command	10-Oct-2013 16:32:27	Substituting variable: ${bamboo.repository.branch.name} with ${bamboo.repobranch}command	10-Oct-2013 16:32:27	Substituting variable: ${bamboo.build.working.directory} with C:\build\xml-data\build-dir\SFB-BAO-JOB1
```

So when I echo out ${ENV.bamboo_branch} in ant, the value is "${bamboo.repobranch}". That's the literal value that echos out.

I tried removing the repobranch variable from the whole plan and all branches on the plan, running it, then putting it back, but this problem is still occurring.

Any tips?

Kent


Answers:
author: Marcin Gardias
body: Hi,

Bamboo does not interpret variables recursively. In other words if you use variable to define another variable it won't work. That includes built-in variables that derive their value from configuration fields.

My question is why don't you just export

bamboo_branch=${bamboo.repobranch}

That should work exactly as you expect.

comments: author: Kent Rollins
body: The thing I am trying to control is the checkout of the repositories. I have multiple repositories and I want them all to check out the same branch. Bamboo only checks out the updated branch of the default repository. All other repositories check out "master" by default.

I did define a variable as you suggest so that I can use that in the build itself, but I was trying to control the repository checkout.

I found that the problem was that I was assigning the above variable to the "branch" field of the default repository. I can use that variable in the "branch" field of the other repositories and they will check out the branch assigned to that variable. I am now leaving the default repository set to "master" and then changing it on each branch.


Tags: variable
How to set global variables from within a script
Asked by Karim Maassen:

Is this possible? I want to change and or create global variables in a bash script.


Answers:
author: Jobin Kuruvilla [Adaptavist]
body: Check this out: <https://confluence.atlassian.com/display/BAMBOO/Bamboo+variables#Bamboovariables-Usingvariablesinbash>

comments: author: Jobin Kuruvilla [Adaptavist]
body: Actually, start reading from the top if you are new to Bamboo variables ;)


author: Karim Maassen
body: I see how I can use global variables. But, they aren't really variables, are they? I can't change a set global variable once it's been defined. Or am I mistaken?


author: Jobin Kuruvilla [Adaptavist]
body: Why don't you create a plan variable and change it if you need to do that later.


author: Karim Maassen
body: I want the variable to be changed by a script. Not manually.
Run Selenium tests on remote windows machine
Asked by Shai:

We need to run Selenium test on a windows 7 / 8 machine on different browsers.

How can i do it using Bamboo OnDemand?

It seems like there is no relevant elastic instance for us and i can't install Bamboo agent on my own instance.

What is the trick here then?

Thanks


Answers:
author: LucasA
body: You can do it (if Amazon provides you Windows 7/8 AMIs) but we'll not be able to provide you the necessary support for this setup.

- <https://confluence.atlassian.com/display/BAMBOO/Creating+a+custom+elastic+image>

- <https://confluence.atlassian.com/pages/viewpage.action?pageId=253231639>

Cheers,

Lucas Lima


author: Shankar KC
body: cant you use selenium grid? your grid nodes have all configurations of OS/browser combinations. you specify where you want to run your tests using some json config like this.

<br />

SELENIUM_GRID_BROWSER_SPECS=FF_21_Linux_BrowserSpec.json,FF_WINDOWS_BrowserSpec_dacenter.json,IE_WINDOWS_BrowserSpec.json,CHROME_WINDOWS_BrowserSpec.json

Here I am specifying that my test can run on linux_FF, Windows_FF, Windows_IE, Windows_chrome. You can specify one or more browser specs for your tests and your tests automatically run on the selenium grid and logs are copied to your CI system(in my case its jenkins) I am using here an inhouse automation tool. You can develop your code to run tests on grid in similar way.

One sample json file content looks as below.

{  
"browserSpec":  
\[  
{  
"ignoreProtectedModeSettings":true,  
"browserName": "ie",  
"platform": "VISTA",  
"maxInstances": 1  
}  
\]  
}

Here is a sample node spec.

{ "capabilities":  
\[  
{  
"browserName": "firefox",  
"platform": "LINUX",  
"version": "21.0",  
"maxInstances": 10,  
"firefox_binary": "/usr/bin/firefox_21/firefox"  
}  
\],  
"configuration":  
{   
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",   
"maxSession": 5,   
"port": 8888,   
"host": "[adcd-017.adx.pool.corp.xxxxxx.com](http://adcd-017.adx.pool.corp.ne1.yahoo.com)",   
"register": true,   
"registerCycle": 5000,   
"hubPort": 4444,   
"hubHost": ip  
}   
}

Hope it helps you to move in proper direction.


Tags: cloud
how do I get git revision number in my bamboo release version tag
Asked by Ronnie Otts:

I have a deployment project set up in bamboo, my relase tag has the bamboo build number on it, but I want to add my git revision number  
how do I get git revision number in my bamboo release version tag  

I tried the following  

```
1.2-${bamboo.buildResultKey}-${planRepository.revision}
```

comes out as

```
1.2-PROJ1234-${planRepository.revision}
```


Answers:
author: Marcin Gardias
body: `please try: 1.2-${bamboo.buildResultKey}-${bamboo.planRepository.revision}`


author: IC24
body: I am using ${bamboo.CpmsVersion}.${bamboo.buildNumber}.${bamboo.planRepository.revision} to build my version but the revision comes out as a GUID

1.0.6.dc52de7df96caae56236cc79f9b840e1948dbdb3

I am using the version in a C# project and it is not happy with this version. How do i get the revision number as an integer from git (I am using BitBucket), is this even possible?

comments: author: guidovezzoni
body: I am having the same issue - apparently every time I run a regular build rather than a customised one - I would expect planRepository.revision to be null in this case but it isn't.


author: Marcin Gardias
body: AFAIK There's no such thing as version _number_ in git. The hash is the revision.


author: Ronnie Otts
body: That did it, thanks!
Bamboo Project Graph Plugin
Asked by Robert Ozga:

Hello,

is there any support for the "Bamboo Project Graph Plugin" in Bamboo 5.1.1? If not, is there such an alternative plugin to show a graphical dependencies?

Thanks in advance.

Cheers,

Robert


Answers:
author: Panayot R.
body: we have the same problem ... is there any possibility to show the project dependencies in a grafical way?


author: Robert Ozga
body: We don't any more need this feature. I cann't close this question.

comments: author: Sh4kE r0cKz
body: How did you solve your problem? Did you find another plugin that can do similar things?


author: Robert Ozga
body: Unfortunately Not. We decided to not using this plugin. Greetings Robert
Is there any way to set up agents to be enabled and disabled based on the time of day?
Asked by Christopher Woodruff:

I'd like to turn on all local agents at night when I'm not worried about license contention for the tools we are using in our jobs. Some of those agents, I'd like to disable during the day.


Answers:
author: Felipe Kraemer
body: Hi Christopher,

Unfortunately this functionality is not currently implemented in Bamboo.

I have created a new issue in the Atlassian development issue tracker for this functionality to ensure the Atlassian development team is aware of your request:

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

I would suggest adding any comments to the issue above as well as [voting](https://confluence.atlassian.com/display/JIRA/Watching+and+Voting+on+an+Issue) on the issue to create it's popularity and likelihood of being implemented in a future release.

For more information on how Atlassian implements new features and improvements please see the following document:

<http://confluence.atlassian.com/display/DEV/Implementation+of+New+Features+Policy>


author: roy_lyons
body: Actually, I think you can with rest api. You would need to put it in cron, or in the bamboo instance (as long as you have at least 1 agent running) or in another bamboo instance.

Here is what chrome tells me it is doing as I enable and disable an agent. You will need to know the agent id... but you could use curl to do this rest call.

[https://bamboo:8443/admin/agent/enableAgent.action?returnUrl=%2Fadmin%2Fagent%2FviewAgent.action%3FagentId%3D1835012\&agentId=1835012
<br />
URL:https://bamboo:8443/admin/agent/disableAgent.action?returnUrl=%2Fadmin%2Fagent%2FviewAgent.action%3FagentId%3D1835012\&agentId=1835012](https://bamboo:8443/admin/agent/enableAgent.action?returnUrl=%252Fadmin%252Fagent%252FviewAgent.action%253FagentId%253D1835012&agentId=1835012%3Cbr%3E%3Cbr%3E%3Cbr%3EURL:https://bamboo:8443/admin/agent/disableAgent.action?returnUrl=%252Fadmin%252Fagent%252FviewAgent.action%253FagentId%253D1835012&agentId=1835012)

comments: author: EddieW
body: Thats not a REST api. That's a xwork action protected by xsrf tokens and credentials.

See [](/questions/29420/best-way-to-reboot-agents-in-bamboo/313364)<https://answers.atlassian.com/questions/29420/best-way-to-reboot-agents-in-bamboo/313364>

But using cron is an approach, and can pass credentials to the link ROy shared or use the recently releaae Agent APIs for Bamboo plugin. [](https://marketplace.atlassian.com/plugins/com.edwardawebb.bamboo-agent-apis)<https://marketplace.atlassian.com/plugins/com.edwardawebb.bamboo-agent-apis>

![](../../upfiles/Screen_Shot_2014-08-02_at_11.43.25_AM_1.png)


Tags: bamboo-administration
Bamboo, Copy File from Server to Remote Agent.
Asked by Jason Huntley:

Is there a know or preferred method, via [API](https://docs.atlassian.com/atlassian-bamboo/latest/) for example, for copying a speicific file from the Bamboo server to a given remote agent?

I'm trying to provide a workaround for [using private keys with remote agents](https://jira.atlassian.com/browse/BAM-11369). Only I would like for Bamboo to distribute the private key currently in use.


Answers:
author: Gretchen
body: It seems like it would be possible using ssh or alternately using cscript or wscript. I've done some stuff like that before (to recycle servers on a windows box for example). The only issue with it is that some of the scripts go off and never return (forking processes). (Not an editorial comment btw).

You would have to push the key file to the server using robocopy (or the like) or scp then execute the command on the remote server to import the file into the specific java keyfile using keytool I think. Let me know if you want more info along these lines.

comments: author: sparshgu
body: Any Idea if its not possible still using the Java API? The same is easily achievable in Jenkins.

Could you share some of your snippets,in any case?


Tags: copy

ssh
Bamboo OnDemand Instances are Elastic IP's mandatory?
Asked by abarnes_cox:

Hi,

Can anyone confirm if Bamboo OnDemand instances MUST have an Elastic IP (public IP address) attached?

We are trying at the moment to get it working without and have not been successful yet.

The instance does have complete internet access for outbound connections via a gateway.

I notice that port 26224 on the "elasticbamboo" security group and wondered if that was a port that Bamboo uses to connect inbound to the running instance?

<br />

Thanks

Alex


Answers:
author: Przemek Bruski
body: On OnDemand, EIPs are mandatory only if you use VPCs.

You can't use custom routings though.

comments: author: abarnes_cox
body: Yes it is inside a VPC, thats a bit of a shame about the EIP as I was hoping to run the instance in a private subnet.

Never mind, thanks for quick response :)


author: Przemek Bruski
body: With VPCs \& OnDemand, the idea is that you can talk to your other instances and your private server room over a private subnet. OnDemand is not a part of your VPC, unfortunately.

The communication channel between Bamboo and an EC2 instance (regardless whether it's VPC or EC2) is encrypted and mutuallly authenicated with keys generated per EC2 instance. It's secure.


Tags: cloud
Bamboo OnDemand Service and Using Existing Amazon EC2 Instances
Asked by Vehbi Sinan Tunalioglu:

I am trying to understand if I can use an existing Amazon EC2 instance with the Bamboo OnDemand Service. If not, can I use the new Amazon EC2 instance created for/by Bamboo OnDemand Service for other operations?

Rationale: We suspect that we are going to fully utilize the EC2 instance. We just want to squeeze the lemon fully.

Thanks in advance.


Answers:
author: Michael Knight
body: Bamboo has to be the one to start the EC2 instance for it to be able to use it. You should be able to use the instance for other things at the same time though.

comments: author: Vehbi Sinan Tunalioglu
body: Thanks Michael. "Other things" sound very good...


author: Przemek Bruski
body: What Michael said, but please keep i mind that if your Bamboo Server gets restarted (e.g. for an upgrade), Bamboo will try to terminate all instances. You can prevent it from happening by disabling restarts from AWS console - but Bamboo won't access these instances anymore.


Tags: cloud
Viewing NUnit results in Bamboo
Asked by dmiser:

I have a .NET project in Bambo 4.4.5. The solution has multiple test projects. My Bamboo plan has multiple tasks that look much like this:

1. Checkout the code

2. Delete the previous testresult\*.xml files

3. Build the solution

4. Run multiple NUnit Runner tasks to run each project, specifying a unique testresult\[n\].xml output file

Everything works fine where we get notifications on build breaks, etc. The problem is that when I click on the Tests tab for the build, this is all I get:

* **849** tests in total
* **1 minute** taken in total.

Is there a way to see more details?


Answers:
author: dmiser
body: Yes. Basically, the same stuff you would see with the junit tests. Break out tests and counts by assembly too?

comments: author: PiotrA
body: Hm... I don't believe there is much reported in Bamboo for the successful tests. But I think you can try to navigate down to the JOB tests tab (which is displaying something different than PLAN level test tab). You should see there at least the passed tests names.

(To navigate JOB you need to use the 'navigator' thing on the left side of the Bamboo - you might need to expand it by clicking an arrow-button in the left-middle part of the screen).

Does it help you?

regards,


author: PiotrA
body: Hello dmiser,

What kind of test details would you like to see? The test names?


Tags: nunit
One Bamboo Plan Triggering Other Plans
Asked by Timothy:

I have this sturcture in Bamboo:

Project A

- Plan 1

- Plan 2

- Plan 3

- Plan 4

How can I get Plan 1 to trigger Plan 2 and Plan 3 (as a task perhaps) one at a time?

And if Plan 2 and Plan 3 is a success, then run Plan 4?


Answers:
author: Jason Monsorno
body: If you want Plan dependecies, look under the Plan Configuration -\> Dependecies tab for Child Plans, "When the current plan successfully builds, it will trigger the child plans to build."

Since Bamboo seems to use child plan dependencies only, they isn't a native way to have 2 plans have to succeed unless you trigger them individual 1 -\> 2 -\> 3 -\> 4.

You can make it all one plan and just use stages or combine just 2 \& 3. Jobs in the same stage will run in parallel (if resources/agent are available to do so).

comments: author: Timothy
body: > "When the current plan successfully builds, it will trigger the child plans to build."

I don't really want this. Plan 1 is suppose to trigger Plan 2 and Plan 3.
> You can make it all one plan and just use stages

Thanks for this input. Hopefully the team accepts this as they now see it as different plans.


author: Jason Monsorno
body: Going the first comment, you can provide more than 1 child plan for Plan1 can have Plan2 AND Plan3 as children. The difficult part is making them trigger Plan4 together.

Second Comment:

Build 1 is Triggered  
--Trickle effect, assuming success--  
1 Success implies build 2  
--Trickle effect, assuming success--  
2 Success implies build 3  
--Trickle effect, assuming success--  
3 Success implies build 4

2 has to succeed to build 3 and 3 has to succeed to build 4 so it makes it sequential. If 2 fails, 3 won't trigger so 4 can't be triggered.


author: Timothy
body: One last question.
> unless you trigger them individual 1 -\> 2 -\> 3 -\> 4.

How would you do Plan 4 then? Plan 4 can only run if 2 and 3 are executed with success.


author: Timothy
body: I think your above comment will work.

Cheers!


author: Vineela
body: One query here , is there any possibility to trigger only a stage when a build is successful ? and the stage result shouldn't affect the build in any case.


author: Bob Swift (personal)
body: [CLI Plugin for Bamboo](https://bobswift.atlassian.net/wiki/display/BCLIP) provides the ability to queue other builds and optionally wait for completion. This can help with situations where the Bamboo dependency handling isn't sufficient or you have multiple Bamboo servers and you need to have some coordination between them. See [queueBuild](https://bobswift.atlassian.net/wiki/display/BCLI/Documentation#Documentation-queueBuild).


author: Timothy
Sync branch with Salesforce Sandbox
Asked by Romarr Garcia:

Hi,

Has someone tried implementing Continuous Integration for Salesforce using Bitbucket pipelines and SFDX? I cannot keep the repository, UI and my local in sync at the same time. When the pipeline runs, Bitbucket seems to always redownload the repository files thus SFDX thinks the files have changed and it pushes everything again. So even if the files are all the same between repo, Salesforce and my local, when pipeline runs it thinks otherwise and still pushes files instead for sfdx force:source:status to return no results (meaning no change detected).

Thanks in advance.

Romarr


Answers:
author: Neha Jain
body: Hi [@Romarr Garcia](/t5/user/viewprofilepage/user-id/4733299)   

**Here are some tips to fix the issue you're facing with Bitbucket pipelines and SFDX:**

**Exclude unnecessary files:** Double-check your Bitbucket pipeline settings and make sure you're excluding any files or folders that don't need to be sent to Salesforce. This way, you'll avoid pushing stuff that doesn't need to be pushed.

**Leverage Git's file timestamp:** Git keeps track of file timestamps, so you can take advantage of that. In your Bitbucket pipeline, compare the modification time of files between your repository and Salesforce. If the timestamps match, it means the files haven't changed, so you can skip the deployment step.

**Use Git diffs:** Git's diff feature allows you to compare the differences between your local repository and Salesforce. This way, you can pinpoint the specific files that have changed and only deploy those, instead of deploying the whole repository every single time.

**Optimize your deployment strategy:** Instead of pushing all files each time the pipeline runs, consider using SFDX's incremental deployments. This cool feature lets you deploy only the changes you've made to your Salesforce metadata, rather than everything. It saves time and makes the process more efficient.

By following these tips and tweaking your Bitbucket pipeline configuration and SFDX commands, you'll be able to sync your repository, Salesforce, and your local development environment more smoothly.

**Here are some resources which may help -**   
**From Salesforce website:**   
<https://www.salesforce.com/video/3598965/>  
<https://www.youtube.com/watch?v=rqhyU99aU0E>

**Sample Bitbucket Repo-**   
<https://bitbucket.org/sfdc-cookbook/salesforce-bitbucket-pipelines/src/master/>

**From Medium articles:**   
<https://medium.com/@maheshchouhan1995/setting-up-salesforce-environment-c4ac75bf1bec>  
<https://medium.com/@maheshchouhan1995/ci-cd-using-bitbucket-pipeline-for-salesforce-part-2-8fe982823e02>


Tags: salesforce
I have Bitbucket access but I wanted to connect with source tree
Asked by HiralPatel:

I have Bitbucket access but I wanted to connect with source tree


Answers:
author: Nic Brough -Adaptavist-
body: Welcome to the Community!

Um, yes, that's fine, but there's no question in your statement. Nor any information on what you are doing or what you are trying to achieve.

What do you want to connect with Sourcetree?
Why is the machine readable IPs out of date
Asked by Nic P:

Hi,

Is anyone able to explain why the machine readable list of IPs is missing IPs that are displayed on the web page?  

<https://support.atlassian.com/bitbucket-cloud/docs/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall/>  
<https://ip-ranges.atlassian.com/>  

The machine readable version is missing:  
3.216.235.48/32  
3.221.151.112/32  
34.231.96.243/32  
44.199.3.254/32  
44.199.127.226/32  
44.199.45.64/32  
52.72.137.240/32  
52.205.184.192/32  
174.129.205.191/32  

Applications are failing due to these missing IPs.   
Do I need to write a html scraper instead? Or is there some up to date list somewhere?  

Thanks


Answers:
author: Norbert C
body: Hi [@Nicolino Pucacco](/t5/user/viewprofilepage/user-id/4733199)

Thank you for contacting Atlassian Community, my name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you! Also welcome to the Atlassian Community.

I'd like to inform you that you're right, the <https://ip-ranges.atlassian.com/> website doesn't contain all the IPs,

I'm going to talk with the our engineering team and I'm going to keep you informed.

Thank you for your patience.

Best Regards,  
Norbert  
Atlassian Bitbucket Cloud Support

comments: author: Norbert C
body: Hi [@Nicolino Pucacco](/t5/user/viewprofilepage/user-id/4733199)

Thank you for your patience, our team has refreshed the <https://ip-ranges.atlassian.com/> page and it includes all the IPs.

Best Regards,  
Norbert  
Atlassian Bitbucket Cloud Support


author: Craig Castle-Mead
body: Hi,

I'd suggest submitting a support ticket with Atlassian. Feels like there's been a disconnect in update process here.

CCM


Tags: bitbucket-cloud

cloud