youngmon/atlassian-qna huggingface dataset:
Bamboo for multiple customization with single code base
Asked by m_vibeeshan:

We have built a thick client application with multiple customization (For multiple clients) using one code base. Our customer specific customization are done by changing some XML files, Images and adding additional DLLs.

Previously we had a build script (written in power shell) console app. This is how we have designed the build script.

1. There are XML files specific for every customer. The XML file will contains the path to the folder containing customization (Images, XMLs files), Name of the Solution file, and a description.
2. The Solution file will hold the common projects files (DLLs) and customer specific project files (DLLs).
3. When we want to make a release we will open the build script and the build script will ask for the XML file specific for the customer.
4. Then the build script will read the XML file and make a build and a Setup.exe according the the information in the XML.
5. This strategy required a very less amount of work when we make a customization for a new client and also a change in the core script will automatically reflect in all other customization. (example upgrading the setup software to other one).
6. We have non technical members in our team (Non tech QA). If he wants to make a release to client or needs a version, we have created a simple web interface listing all customization and once he clicks that, it will run this script and give a final EXE to him.

Now I am trying to achieve this in Bamboo. Without repeating the work.

Can I create a common plan for all of my customization. Otherwise I have to change the plan to all other plans when there is a change or a bug. I don't wan't to create one plan and clone others from that as its not effective to our work plan.

***Some people have recommended me to use variables (I still don't know how to use), Can a non technical member without admin rights change the variable and make a release specific for a client. (If i have to go with this path)***


Answers:
author: Przemek Bruski
body: With Bamboo Specs (available in Bamboo 6.0) you can manage that all complexity programatically and create as many plans as you need without needing to clone them.

comments: author: m_vibeeshan
body: Thanks, I will check the "Bamboo Specs" feature


Tags: git
Has anyone developed a SQL query to move Bamboo Dedications from one agent to a new agent?
Asked by Darrell Sutherland:

We have a lot of agents running numerous jobs across multiple projects, when the team decide to spin up a new agent it has to be dedicated to the same projects, plans, and environments as the last one. This is a long painful process as the list is exceptionally long. Has anyone got an SQL script or offer some advice on how to develop one to copy the dedications from one to the other?

Thanks


Answers:
author: Alexey Chystoprudov
body: Agent's table name is **queue**.

Agent assignments' table name is **agent_assignment**.

Query below shows all assignments with corresponding agent

```
select * from agent_assignment ags inner join queue q on ags.executor_id=q.queue_id and ags.executor_type = 'AGENT';?
```

Hope this information is enough to build a query to reassign one agent's plans to another one


Tags: script

sql
After a git branch is deleted, does the Bamboo git cache get removed?
Asked by Jonathan DelRosario:

I'm using a Maven plugin (jgitflow) via Bamboo that creates a 'release' branch only if a 'release' branch doesn't already exist. After deleting the previous 'release' branch, I try to run the plugin again to create the 'release' branch but get the following error:

"Error starting release: Error starting release: a release branch \[refs/remotes/origin/release/1.0.0\] already exists. Finish that first!"

The 'release' branch mentioned above was deleted, but the Bamboo git cache makes Bamboo think it still exists. Is there a way to update the git cache automatically?


Answers:
author: somethingblue
body: Hi Jonathan,

The instructions to remove the git cache can be found in [Git cache removal in Bamboo](https://confluence.atlassian.com/bamkb/git-cache-removal-in-bamboo-329982070.html). In general this requires a restart so if you were to script this you would need to restart Bamboo.

In the latest Bamboo versions (5.x) there is a user interface feature (**Overview** \> **Repository Settings**) that allows you to clean the Git cache without requiring a shut down of the application.

I would definitely recommend adding a Suggestion to [JAC](https://jira.atlassian.com) for this feature. If you do so please add the link to the ticket here so the community can vote on it!

Cheers,

Branden

comments: author: Jeff Crawford
body: To vote for this feature: <https://jira.atlassian.com/browse/BAM-15012>


author: somethingblue
body: Hi Jeff,

Thanks for posting a link to the Suggestion request!

Cheers,

Branden


Tags: cache

git
Folders within build are not writeable
Asked by jonathonccns:

Hi,

Just started with Bamboo. We have it running on Windows 7, for a Yii2 (PHP) Application. Yii2 comes with Codeception, it's really nice and easy to use.

I have a script that runs as a task that just kicks off codeception:

```
${bamboo.php} ${bamboo.composer} exec codecept run unit models/HelperTest.php --verbose
```

This keeps failing the build and coming back with error code 1.

So I ran on the Windows 7 machine directly and it came back with:

```
[Codeception\Exception\ConfigurationException]Path for output is not writable. Please, set appropriate access mode for output path.
```

When I check in the build, I see that all the folders have this property set.

![bamboo.png](/t5/image/serverpage/image-id/1997iABCA569B242A7AD3/image-size/large?v=v2&px=999 "bamboo.png")

All the folders have this weird gray check mark, not a full black one. I've tried to manually remove read-only and it asks for administrato priveledges so I said yes. But nothing happens, the folder still has this mark.

I'm not really sure what the problem is here and how to fix it?


Answers:
author: Cristiano Mariano
body: Hi Jonathon! How are you doing?

What is your version control system? I have seen this behavior using ClearCase, because it downloads files and marks them as read only. In order to write to files, I had to use operating system commands (e.g. attrib or chmod).

Hope this helps!

Cristiano

comments: author: jonathonccns
body: Thanks Cristiano

In my case I got bamboo to create a new folder as a task in the build. It then stored the output of my clover coverage and I updated my scripts to write to that new folder. Works now though!
Bamboo Github API Rate
Asked by jonathonccns:

Hi

Just started with Bamboo, I've managed to get my plan to checkout the source code and then start to update Composer packages. So far, so good.

But, having a problem because it asks me for a token from github to bypass the rate limit. This normally is no problem, I've done it before on a few machines. Just visit the link provided in the console, create token and paste into console. But I don't know how to pass the github token to the console when it's running as part of a build.

How do I achieve this?


Answers:
author: jonathonccns
body: Solved:

Run this line substituting your own paths in to composer + php

```
${bamboo.php} ${bamboo.composer} config --global github-oauth.github.com <TOKENL>
```


Tags: github
why does bamboo local admin does not have admin privileges?
Asked by sachinmw:

I have reset bamboo admin password folloing the instructions in the link

<https://community.atlassian.com/t5/Bamboo-questions/How-to-reset-Bamboo-Admin-password-also-set-bamboo-internal/qaq-p/86925>

I am able to login to bamboo using admin but this user does not have admin previleges

when I go to

bamboo/admin/administer.action I get the below message

Access denied {#toc-hId-1935414109}
===================================

Sorry, you have insufficient permissions to view the page. Please [contact an administrator](https://bamboo/viewAdministrators.action) if you believe This is an error.


Answers:
author: Jeyanthan I
body: Hi Sachin,

I assume you are using an [external authentication for Bamboo User Management](https://confluence.atlassian.com/bamboo/integrating-bamboo-with-ldap-289277210.html#IntegratingBamboowithLDAP-ExternalUserManagement).

The default group in Bamboo that has admin permission is *bamboo-admin*.

* Check if the user belongs to the local *bamboo-admin* group.
* The username does not match any of the users coming from LDAP.

If not, check your bamboo logs to look for hints.

comments: author: sachinmw
body: thanx that helped,I fiured that out but forgot to add my comment to this thread


author: Jeyanthan I
body: Glad that worked for you. Do you mind marking the answer as accepted? It helps others while searching, as it adds \[solved\] tag to the question.
Getting Build Number Of A Project From Another Project
Asked by So So:

Suppose I have a project called Project_A and it was built and deployed to a repository using Bamboo. I have another project let's call it Project_B which I would like to deploy to a different environment than Project_A.

If I would like to use the build number from Project_A to be used for Project_B's build number so that their numbers are in sync, is this possible? If this is possible, what would the Powershell script for grabbing Project_A's build number from within Project_B look like?


Answers:
author: Steffen Opel _Utoolity_
body: Modifying (and thus aligning) build numbers is not currently possible, but an often requested feature indeed - please watch and vote for the following issue to guide Atlassian's roadmap in this regard:

* [Ability to modify the current build number, bambooBuildNumber (BAM-10282)](https://jira.atlassian.com/browse/BAM-10282)
How do I pass Istanbul code coverage reports from Bamboo Sonar Scanner task?
Asked by Jon Stalnaker:

Our Bamboo build plan runs several npm tasks, one of which runs tests and creates an Istanbul code coverage report. There is no Java, just an Angular application. We want our Sonar Scanner task to pass the results of this test to our Sonar instance. One of the artifacts of the npm Bamboo tasks is a folder called coverage that contains an html version of the report and some other files (lcov.info). This is the report that contains the statistics that we want to show in Sonar.

I've tried passing in the various paths but nothing seems to work in the Additional parameters section of the Sonar Scanner Bamboo Task

-Dsonar.javascript.lcov.reportPath=coverage/lcov.info

-Dsonar.javascript.lcov.reportPath=coverage

-Dsonar.javascript.lcov.reportPath=/coverage/lcov.info

We are running [Atlassian Bamboo](http://www.atlassian.com/software/bamboo/) version 5.14.5 build 51419 and Sonar Version 5.6.5


Answers:
author: Jon Stalnaker
body: We think the issue is that the application is built with Typescript, not Javascript so it is not triggering the Javascript plugin and ignoring the coverage/lcov.info


Tags: angular

sonarqube
Why do my plan branches disappear?
Asked by Mike Newton:

Hi, I have setup and starting toying with plan branches.

Currently I have automatic deletion disabled in my plan. And my match name is "release/.\*", which is working ok, plan branches are being created and they build and it's lovely.

My problem is that when I come into ork the next day the plan branches are gone... I can't figure out why? I would like them to remain around for the lifetime of the branch. Our version is 5.14.3.1 build 51216

Many Thanks!

Mike


Answers:
author: Jeyanthan I
body: From your input, it sounds like you stumbled onto this bug: <https://jira.atlassian.com/browse/BAM-16341>

<br />

The theory is that the plan branch you are referring to has probably been removed in the past as part of the plan branch cleanup process in Bamboo and you are now trying to re-create it, but there's a problem with doing this: when the plan branch is removed as part of the expiry process, Bamboo populates the DETECTED_DELETION_DATE column in the VCS_BRANCH table in the database with the date from the first time it got removed. That information is NOT erased when you re-create the plan branch, so next time the plan branch expiry process kicks in, it looks at that table and thinks that this plan branch should've been removed already, so it removes the branch (because it thinks it's doing the right thing).

<br />

The **Workaround**section from the bug report explains how to delete the DETECTED_DELETION_DATE data directly from the database for a particular plan branch, so that you can prevent it from being deleted again. I know this is not a feasible option to do every time.

<br />

Thus, to prevent this from happening, we recommend users to uncheck the "Clean up plan branch automatically" option when manually creating the plan branch in Bamboo (as mentioned by one of the users in this comment) until the bug is fixed. This way, the plan branch won't get removed as part of the expiry process anymore.

<br />

Hope it helps.


Tags: branch

plan
How do I enable Bamboo remote agent if the option isn't available in the administration settings?
Asked by Brandon Saunders:

In "Overview", and "Agents" I see nothing about remote agents; only local agents.

I'm running Bamboo server locally as an administrator. Is there any reason why the option to enable remote agents wouldn't be displayed in any of the administration settings, but local agents does show up?

### Bamboo version information {#toc-hId--1009796924}

Version5.12.3.1  
Build number51215  
Build date7/4/16


Answers:
author: Jeremy Owen
body: Hey Brandon,

What license type is your Bamboo instance using? The functionality is disabled for Starter licenses, which might explain it.

Cheers,

Jeremy


Tags: developer
Bamboo Elastic Agents and Docker - Starting dockerd on instance launch.
Asked by Dylan Sweetensen:

Hey there,

Our team has recently been stuck on an annoying issue with Bamboo Elastic Agents.

When the first *build plan* runs on a newly launched instances, once it reaches a Docker task, it stops. The *build* doesn't fail, or stop, or timeout but it halts at the Docker task and generates no more logs. Once you manually stop and restart that *build* it runs with no issues.

So it seemed to me the issue was something to do with **the first time a docker command is run on a new Elastic Instance.**

Now, I was able to replicate this via terminal on an *Elastic Instance.* Running \`docker run hello-world\` for instance would just do nothing, not even exit.

I tried this with another terminal window open to view the docker logs. Before running anything they are completely empty, but when you run a docker command such as hello-world it does the whole Starting Docker Application Container Engine and finishes up withe API listening on \[::\]:2375.

This is kinda good, but then it doesn't actually run the container we asked it to. It just does nothing.

I've tried a number of work arounds including:

* Running \`dockerd\` on the Elastic Image instance start up script. Except this just resulted in the Agent never spinning up on the instance (and also stopped my private key for authenticating.
* Running variations on the above (nohup, \&)
* Running \`dockerd\` with sudo - this resulted \`sudo: no tty present and no askpass program specified\`
* Adding a script to the start of my build plan to run \`dockerd\`. This gave a permission error when opening dockers \`config.json\`.
* Attempting to start docker with \`service docker start\`, which gave a permission error.
* Attempting to start docker with \`systemctl start docker.service\`, which also gave a permission error.

So, has any one encountered this and overcome it with even a hacky solution? Or will we be doomed to manually starting and stopping the first build for every new elastic instance?

If it helps we are using the Ubuntu stock image for our Elastic Image.

Thanks in advance!

Dylan


Answers:
author: Jeremy Owen
body: Hey folks,

It's a known issue with EBS-only instances and we're tracking it here:

* [BAM-18517: Docker does not start successfully on Elastic Agents using EBS-only instances](https://jira.atlassian.com/browse/BAM-18517)

The workaround is to add \`*service docker restart* \` to your instance start-up script at *Bamboo Administration \>\> Image Configurations \>\> Edit*

Hope this helps :)


author: Sander Brienen [Avisi]
body: We have exactly the same behaviour and also no solution yet.


Tags: docker

elastic-agent
How to enable 'Restricted Admin" permissions for on-premise Bamboo?
Asked by Mark H_ Williams:

We have a couple of development Bamboo servers upgraded to 6.0.1 and noticed that one of them doesn't have the ability to assign the "Restricted Admin" in Global Permissions. It only has "Create Plan", "Admin", etc. How do we enable the "Restricted Admin" selection capability?


Answers:
author: Steffen Opel _Utoolity_
body: Navigate to:

* Menu 'Administration -\> Overview'
  * Section 'Security'
    * Link 'Security settings'

Then check the 'Enable restricted administrator role' flag in section 'Global security and permission properties':

![bamboo-restricted-administrator-role-flag.png](https://community.atlassian.com/t5/image/serverpage/image-id/1768iDF5DFDD5A7E8B10A/image-dimensions/382x325?v=v2 "bamboo-restricted-administrator-role-flag.png")

comments: author: Shannon Phillips
body: Thank you [@Steffen Opel _Utoolity_](/t5/user/viewprofilepage/user-id/781567) This was exactly what I needed.

Thanks!

Shannon P


author: AGermaine Scott
body: how do I bypass a admin lock


Tags: bamboo-administration
How to solve ERR_CONNECTION_REFUSED?
Asked by Raquel Perez:

I was able to install and run Bamboo once but when I trying to access it again I keep getting this error: ERR_CONNECTION_REFUSED.


Answers:
author: Nic Brough -Adaptavist-
body: That suggests it's not running any more. Check the server and logs?

comments: author: Raquel Perez
body: Hi Nic, thanks for the quick response.

Which logs should I be checking? There are 5 different files on my log folder: access, catalina, host-manager, localhost, and manager.

Also, I don't know if this is relevant at all but I have installed and re-installed Bamboo 3 or 4 times already and I have noticed that after the tomcat window appears (after running the batch file) Bamboo runs fine, but it stops working as soon as I close the tomcat window. This might just be a coincidence?


author: Nic Brough -Adaptavist-
body: The Tomcat window represents the Bamboo process, so yes, if you close it, you're killing the Tomcat server. You should be able to run it in the background to avoid that (although I don't know Windows well enough to guide you, I'm sure it's in the docs, along with "run it as a service")

The log to check is probably catalina.out, as that's the log for Tomcat, although I suspect your killing of the window is probably the problem.


author: Raquel Perez
body: Thanks Nic! That was the issue, I still need to figure out a way to run Tomcat in the background but I'm working on that.
Custom error message in a summary for a Bamboo build
Asked by nmarquesantos:

I'm looking to have a descriptive error message shown in a build summary in Bamboo, in case a build fails.

At the moment the failure happens in a bash script task, where I use exit code 1.

I've tried using the **throw** statement but the message still won't appear in the summary.

Currently, this is what appears: No failed tests found, a possible compilation error occurred.

Which is a result of me doing **exit 1**


Answers:
author: Cristiano Mariano
body: Hi Nuno!

Writing to error output, the message appears in the "Error summary for Default Job" section.

Would you like to receive it in the email notification?

comments: author: nmarquesantos
body: Hi Cristiano,

Thanks for the help, that does indeed help a bit.

It does show up in the error summary if I scroll down :)

What I meant is if it was possible to show it here in the summary details?

Many thanks for the help

Nuno

![Screen Shot 2017-06-05 at 21.04.45.png](https://community.atlassian.com/t5/image/serverpage/image-id/1868iB566F2B4BEB6C229/image-size/large?v=v2&px=999 "Screen Shot 2017-06-05 at 21.04.45.png")


author: Cristiano Mariano
body: Hi Nuno! Glad to hear it helped!

Unfortunatly, I don't know how to show it in a higher position.

Thanks,

Cristiano


author: Cristiano Mariano
body: Hi Nuno! How are you doing?

You can write your message to the operating system error out.

In bash, you would do so:

```
>&2 echo "My error message"
```

Hope this helps!

Thanks,

Cristiano

comments: author: nmarquesantos
body: Hi Cristiano,

Unfortunately that will only output the message in the log but not in the summary :(

Is there no way to achieve what I need?
DevOps on Mainframe MicroFocus
Asked by elac16:

Hello,

We are migrating IBM mainframe projects into Microfocus. Microfocus is a high scalable and modern deployment environment for Mainframe. It supports DevOps automation and new features like Java, .net platform.

Mircofocus has it own set of tools that they recommend for DevOps implementation. The tools are **Changeman ZMF** for Version control and **Serena** for Continuous Integration and deployment automation. We are analyzing whether Bitbucket, Bamboo and uDeploy can replace the above tools. I didn't get any information on the internet. Do Bitbucket and Bamboo support Microfocus (Mainframe)? Do they have the capability to handle Mainframe specific stuffs?


Answers:
author: Vinesh
body: Is this not possible yet ?

comments: author: devpartisan
body: [@Vinesh](/t5/user/viewprofilepage/user-id/1193468), if you're asking, "Do Bitbucket and Bamboo handle Mainframe-specific stuff?" The answer is still no.


author: devpartisan
body: Bitbucket and Bamboo do not have any mainframe-specific features.


Tags: bitbucket

bitbucket-server