youngmon/atlassian-qna huggingface dataset:
How to login as Bamboo user on EC2 VM?
Asked by Matthew Thomas:

I'm using a Bamboo Amazon EC2 Windows 2008 Server VM for my CI server and I see there is a "Bamboo" user created on the VM and that when Bamboo starts a build, it runs under this user. I would like to be able to RDP to the VM as the Bamboo user so I can perform some set up operations.

I am aware that I can find the Administrator password on the Bamboo website and login as the Administrator, but I want to actually login as the Bamboo user that the builds run under, how can I do that?

Thanks!


Answers:
author: Przemek Bruski
body: Remote login for user Bamboo is disabled for security reasons (we cannot randomise passwords for that user). You can reenable it (but remember to change the password first).

To make that change permanent, you need to create a new image.

comments: author: Matthew Thomas
body: Ok can do, once I change the password on the Bamboo user and create a new AMI, do I need to update the password on the Bamboo website somewhere, in addition to the AMI ID?

I see I can update the AMI ID on the Edit Elastic Image Configuration page, but it makes no mention of the Bamboo VM user or password and I'm not seeing it anywhere else.

Thanks for the help!


author: Przemek Bruski
body: No, you don't need to update the password in Bamboo server, it does not use it.

Just make sure you run prepareInstanceForSaving.bat (available on your Bamboo stock image) before saving the image.

comments: author: Matthew Thomas
body: Thanks for following up! I was able to reset the password, run prepareInstanceForSaving.bat and create a new AMI. However, the Elastic Agent on the new AMI never leaves the "Pending" state and is therefore unable to start any builds.

I tried this many times to get it to work with no luck, here's my steps to reproduce:

1. Start Default Image EBS x86_64 (windows) (stock image) VM (ami-976edafe) via Bamboo

2. Login as Administrator

3. Change Bamboo user password

4. Set Ec2SetPassword to Enabled in C:\\Program Files\\Amazon\\Ec2ConfigService\\Settings\\config.xml

5. Run C:\\opt\\bamboo-elastic-agent\\bin\\prepareInstanceForSaving.bat

6. Shutdown VM

7. Create new AMI from VM

8. Update Elastic Image Configuration with new AMI ID

9. Start VM with new AMI.

10. Wait for Elastic Agent status to go Idle

I also tried running prepareInstanceForSaving.bat as the Bamboo user as well.

The agent on the original AMI (ami-976edafe) typically starts after about 10 minutes or so. However, after the steps above, the agent on the new AMI wouldn't start (waited 30 minutes).

Am I missing any steps?

Thanks again!


author: Przemek Bruski
body: Please go through Task Scheduler config steps from here: <https://confluence.atlassian.com/display/BAMBOO/Creating+a+custom+elastic+image+-+Windows>

Maybe you need to set the new password somewhere.


author: Matthew Thomas
body: Updating the Bamboo users password on the scheduled task did the trick, thanks!!


Tags: cloud
Running two Bamboo remote agents on same server as windows service?
Asked by Andrew Morin:

I want to have two agents running as a windows service on the same server. Can I rename the existing service of the first agent and change its name in the "Edit Details" section of administration and the install second agent as windows service so it picks up the default names? Is there a better way to do this or am I on the right path. Wasn't sure about the service name change but I know the second agent install would probably fail if a service of the same name already existed.


Answers:
author: Adam Myatt
body: You can have multiple agents running as Windows Services on the same Windows PC. I have 5 or 6 running on one just fine. In general the best practices I've found for installing multiple agents include the following from my own personal notes :

When installing the agents, ensure you use the command line switch -Dbamboo.home=DIR where DIR is the unique directory where you are installing the individual agents.

Additionally, if you are installing multiple agents as Windows Services you need to edit the names or the services after installing each service.

**The agent configuration is mostly contained in the file \<bamboo.home\>/conf/wrapper.conf**

In the wrapper.conf file the very bottom defines the names of the NT services that were installed.

If you have 1 windows agent installed, use the BAT files that are part of the agent to **UNINSTALL** the agent service, then edit the fields "wrapper.ntservice.name" and "wrapper.ntservice.displayname" to use numbers for example :

**Change :**

# Name of the service  
wrapper.ntservice.name=bamboo

# Display name of the service  
wrapper.ntservice.displayname=Bamboo

**To Something like this :**

# Name of the service  
wrapper.ntservice.name=bambooagent01

# Display name of the service  
wrapper.ntservice.displayname=Bamboo Agent 01

Then save and use the BAT file to reinstall as a service. Then follow the standard installation steps for installing a second windows agent and repeat the steps above to then uninstall the agent, rename the NT service parameters, and REINSTALL the second service (and 3rd and 4th, etc.)
Bamboo using lint
Asked by Liam Donaldson:

Has anyone integrated PC-Lint into Bamboo?

It would be great if my code could be linted and the output available for review, showing warning and errors within Bamboo. Also possible configure to to cause the build to fail if there are lint errors.

Is it possible?


Answers:
author: Przemek Bruski
body: You can run PC-Lint from a script task and configure the warnings it emits appropriately. If it returns a non-zero code, the build will fail.


author: francis
body: We are using sonar to do this type of static code analysis.  
There are great plugins to integrate sonar with the atlassian tools.

Check here  
<https://marketplace.atlassian.com/plugins/com.avainit.bamboo.bamboo_sonar>
builds and branched in a git repository
Asked by Doug Garner:

I have set up a group of plans that build various applications off a git develop branch. Now I would like to create a plan the builds everything off the master branch (a release candidate build). It doesn't look like I can use the same shared repository for this since in the repository setup the admin must pick a branch. Do I need to create a completely new repository or can I use plan branching or something else? Did I create my plans in the wrong order?


Answers:
author: Marcin Gardias
body: Do your 'release candidate build' require extra steps to be performed? If so, then the answer is quite simple: you should set up a new repository for 'master' and a separate release Plan(s).

If there are no extra steps, then teoretically you could create Plan Branch that builds 'master', however I wouldn't recommend that approach, as having 'master' as a Plan Branch sounds awkward to me.


Tags: cloud
Users unable to login
Asked by Alexander Afonyashin:

Hi,

Today a few of our users encountered problems with logging in. The errors are the same both for Internal Database users and AD users:

login login : '\<username\>' tried to login but they do not have USE permission or weren't found. Deleting remember me cookie.

Other users logs as expected. Passwords are OK, accounts in AD are not locked. Different browsers tried. No upgrades (Confluence/Plagins) were performed.

What could be done to solve problem?

Best regards,

Alex


Answers:
author: Bruna Griebeler
body: Here are some possible reasons:  

For Bamboo: [https://confluence.atlassian.com/display/BAMKB/External+user+authentication+is+not+working+correctly+for+new+users\<br\< a=""\>\>
For Jira:](https://confluence.atlassian.com/display/BAMKB/External+user+authentication+is+not+working+correctly+for+new+users%3Cbr)<https://confluence.atlassian.com/display/JIRAKB/LDAP+users+unable+to+login+due+to+incorrect+User+Name+Attribute>

Usually recreating the directory on the application when the problem is cache related.

Cheers!


author: Christian Czaia _Decadis AG_
body: Maybe they have exceeded the limit of failed logins? Could you check that?


Tags: error

login
Log shows build failed but Bamboo said Build Sucessful
Asked by Mary Hsieh:

I'm new to Bamboo and I'm using a windows command line script to do my build. I can clearly see the in the log that the build failed.

error 05-Dec-2012 15:08:08 ecomarm: fatal: No license available for "source_analysis"  
error 05-Dec-2012 15:08:08   
error 05-Dec-2012 15:08:10 Error: build failed

However, the Bamboo notification tells me the build is successful. Why is that and how can I fix it?

I'm using Bamboo 4.2.1


Answers:
author: Nick Hilton
body: For others arriving from search engines, one can use

{code}

set -e

{code}

At the top of their script so it errors out on any error.

comments: author: Atul Yadav
body: What is the actual content on the code,

{code} -- ?

set -e

{code} -- ?


author: Mary Hsieh
body: The script always exits with 0 since the script itself executed normally. What was done originally was all the project builds are combined into one script file. It looks like Bamboo only looks at the last few lines of the script results. So if the script failed in the middle, then it will not catch it. So what had to be done was to split up each project build into its own Bamboo task so Bamboo can detect the failure. A little cumbersome but at least it worked. Maybe the task section in the documentation explained this. Sorry if I missed it.


author: Przemek Bruski
body: The script has to exit with a non zero status for the build to fail.

comments: author: Brian Mackey
body: How do you see what the script reports or modify it?


Tags: cloud
Will a remote agent automatically update itself when the Bamboo service is upgraded?
Asked by Brent Villalobos:

We are upgrading our Bamboo service from v3.2 to version 4.3. When the service comes up for the first time, will the agents that were installed using the v3.2 jar file still be able to communicate and work with the new version? Will the agents see that the version on the Bamboo server changed and update themselves accordingly or are there manually steps we need to take to update the agents? If we do need to update the agents manually, what are the steps for doing that? Keep in mind that we are running the bamboo agent code as a service on each remote host.


Answers:
author: Przemek Bruski
body: Yes, the agent will automatically update itself to match the server version and the plugins installed on the server, provided that it has write access to agent home directory.
cannot see user installed plugin
Asked by Pradnya Mene:

Hi,

Was trying my first plugin with Bamboo..

I was following the tutorial at :

<https://developer.atlassian.com/display/BAMBOODEV/Introduction+to+writing+Tasks#IntroductiontowritingTasks-RegisteringyourTaskwiththepluginsystem>

Everything was fine till the step:

Running the 'MyFirstTask' Plugin {#toc-hId-1653134143}
------------------------------------------------------

After doing atlas-run

I could get bamboo started successfully message as follows..  
`[WARNING] [talledLocalContainer] May ``17``, ``2011` `1``:``40``:``54` `PM org.apache.catalina.startup.Catalina start`  
`[WARNING] [talledLocalContainer] INFO: Server startup in ``40924` `ms`  
`[INFO] [talledLocalContainer] Tomcat ``6``.x started on port [``6990``]`  
`[INFO] bamboo started successfully and available at http:``//localhost:6990/bamboo`  
`[INFO] Type CTRL-C to exit`  
However when navigating to  
`http:``//localhost:6990/bamboo `  
got : HTTP 404 error  
Description :requested resourse not found..  
Please help,  
\~Regards  
Pradnya


Answers:
author: Pradnya Mene
body: tried, restarting CTRC+C and running atlas-run

same problem occured..


author: Mizan
body: try restarting the server ... i.e. press CTRL+C then again run the command atlas-run


Tags: cloud
Can Bamboo create a Git tag for every build?
Asked by John Calagaz:

I would like for bamboo to tag every build before it starts. It looks like you can create a tag for SVN, but not for Git? I found this answer [https://answers.atlassian.com/questions/28228/bamboo-vcs-tagging-for-git](../28228/bamboo-vcs-tagging-for-git "here"), which is almost a year old now.

Are there any updates on this feature?


Answers:
author: Alan Cabrera
body: I'm really surprised that this feature is not available in an on-demand plugin. This stuff works out of the box for Jenkins/Hudson.


author: Kevin Ross
body: So within the build-dir, I try the following (to simulate a script task):

```
git tag -a test -m 'Build test'
```

```
git push --tags
```

```
fatal: No configured push destination.Either specify the URL from the command-line or configure a remote repository using    git remote add &lt;name&gt; &lt;url&gt;and then push using the remote name    git push &lt;name&gt;
```

So:

```
git push origin test
```

```
fatal: 'origin' does not appear to be a git repositoryfatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.
```

I don't want to muck with what bamboo is doing with git, so am I safe to get this working via command line and it will continue to work on future builds?

i.e.

```
git remote add origin url
```

comments: author: Richard Cross
body: I wouldn't recommend messing around with "origin". Why not simply create a new remote ("origin2" ?) especially for your Bamboo builds? E.g.:

```
TAG_NAME=${BRANCH_NAME}-${bamboo_buildNumber}git tag -f -a ${TAG_NAME} -m 'Tagged by Bamboo'git remote add origin2 ${bamboo_planRepository_1_repositoryUrl}git push origin2 ${TAG_NAME}git ls-remote --exit-code --tags origin2 ${TAG_NAME}
```

I added in that last command to verify that the tag was actually created.


author: Bill Wang
body: Got this error with above solution.

```
error 20-Aug-2018 01:20:06 Repository not founderror 20-Aug-2018 01:20:06 The requested repository does not exist, or you do not have permission to access it.error 20-Aug-2018 01:20:06 fatal: Could not read from remote repository.error 20-Aug-2018 01:20:06 error 20-Aug-2018 01:20:06 Please make sure you have the correct access rightserror 20-Aug-2018 01:20:06 and the repository exists.
```


author: Xabier Davila
body: I'm using Stash, so my approach is to use Stash's REST API to create tags:

<https://developer.atlassian.com/static/rest/stash/3.8.0/stash-scm-git-rest.html>

comments: author: Jesse Xi
body: ```
using stash api is a good idea
```


author: Kirill Malyshev
body: i'm interested in doing same from deployment tasks.

and i'm also disappointed with the absebce of remotes in bamboos git repos.

how to workaround that? we have a dozen of repos and i'm not quite happy adding remotes to each of them


author: James Dumay
body: Hi John,

No updates on that feature however it is possible to work around this by adding a Script task that creates a git tag and pushes it remotely using the native git executable.

Thanks  
James


Tags: git

tag
Available 'variables/properties/references' for injection into atlassian-plugin.xml
Asked by Christopher Dancy:

Trying to find a list of what is available to use for injection purposes in atlassian-plugin.xml. I'm coding a web-item and trying to define the link element something like the below:

\<link linkId="rules_diff_link"\>/plugins/servlet/rulesdiff?planKey=${plan.key}\&amp;planBuildNumber=${plan.buildNumber}\</link\>

Obviously those variables are not present but I want to be able to do something like that at runtime so that each time the link is displayed (our case it's being displayed on the BuildResult page) it's populated w/ plan specific info. Is there a list of what variables/refernences can be used for injection and/or how to do something like what I'm asking? A way to reference the current plan or resultssummary would be great assuming I can do so. Thanks AOT.


Answers:
author: Christopher Dancy
body: through trial/error and some digging through the internets I found a few examples where people used the following variables:

${buildNumber}

${planKey}

This was enough to pass to my servlet to get the necessary plan-build to get what I need. I only wish there was more documentation on what variables are available for use w/in atlassian-plugin.xml.


author: Carsten A.
body: Just for clearance: You want a link which changes with every build of your plugin, right?

You can use *${project.artifactId}* and *${project.version}* in your link.

For a more advanced manipulation I suggest, defining a *atlassian-plugin.xml.template* file, using variables or other placeholders and using *maven-antrun-plugin* in your pom. You can do pretty much everything. I do it to populate timestamps and svn commit numbers in a properties file.


Tags: injection

web-item
What build artifact transfer alternatives are there
Asked by Richard Neale:

The bamboo agent to server transfer appears slow for our Installer build artifacts of 16Gig and I was curious if there were any other methods to transfer this data other than through the agent to server mechanism ? Alternativly, does the Bamboo plugin model provide a means to solve this ?


Answers:
author: Richard Neale
body: With regards to performance, 'Slow' is 40 min for 16 Gig.  

We have resolved this issue by creating a task on the bamboo job, a script 'Transfer Artifacts', which copies the installers to a NFS mount of the servers build results storage. The result of the new task's copy is now a 4 min transfer. On the bamboo job we created an artifact definition, installers, that had a mask that could not be resolved during bamboo's artifact transfer. Post execution of the build, the artifaction definition would be populated in the build results with the correct structure and sizes due to the task.   

Thanks for the note on 4.3 ArtifactHandler is interesting but for the moment we are on 3.4 and it will be 6mo+ before migration.  

Kudos to the team for the Project/Plan/Stage/Job/Task model.


author: Przemek Bruski
body: With Bamboo 4.3, there's an unofficial plugin point that lets you define your own artifact handlers. A custom artifact handler can replace the default ones for publishing and retrieval.

Take a look at the interface called ArtifactHandler. The feature will be much more usable in 4.4 (but there's no decision to make it official for now).

BTW. what does slow mean in this context?


author: Adam Lins
body: I have a similar issue: the artifacts I'm generating per branch are much smaller that the OP (\~320MB for four artifacts), but the transfer rate the agent gets is about 10% of link speed. A transfer that should take a minute takes 10. And I have \~8 branches to build.

Being able to either specify another transport mechanism to upload an artifact *or* an external location for artifacts (e.g., pick up output that has been SCP'd to somewhere) would be very useful. Either way should preserve other artifact functionality, e.g., links posted to Jira.
How do I ssh into a default bamboo elastic instance
Asked by Steven Stones-Havas:

I have followed the instructions to run

ssh -i /path/elasticbamboo.pk ec2-user@XXXX.compute-1.amazonaws.com

but it seems that the key requires a password that I don't have. Where is this password stored, or do I need to create my own elastic instance and set up the bamboo agent manually?


Answers:
author: Steven Stones-Havas
body: Thanks for the help guys. I found that by terminating the amazon instance, and creating a new one I was able to log in using the supplied keyfile.

I have no idea why the first one didn't work - I created it in exactly the same way, and never requested a password put on it.


author: Przemek Bruski
body: Bamboo does not set up passphrases on private keys it generates. My guess is that someone from your organisation asked Atlassian support to put a private key supplied by you on the OnDemand instance.

Bamboo does not really need that key. You can go into the AWS Console on your account and regenerate it if you don't have access to the passphrase anymore. Optionally, ask the support to put the new key on your OD instance afterwards.


author: Fahd
body: Hi Stevesh,

You will need to download the key from Bamboo - it should be available within the same page as the provided SSH command.

Once you have it in your machine, you can alter the SSH command to include the path of the downloaded key e.g.:

* ssh -i /home/user/Download/elasticbamboo.pk ec2-user@XXXX.compute-1.amazonaws.com

Hope this helps.

Regards,  
Fahd

comments: author: Steven Stones-Havas
body: Thanks for the answers, Paulo and Fahd. I have followed the instructions, and I have the key. My problem is that ssh then asks for the password for that key:

steve@hydra:\~$ ssh -i ./elasticbamboo.pk [ec2-user@XXXX.compute-1.amazonaws.com](mailto:ec2-user@XXXX.compute-1.amazonaws.com)

Enter passphrase for key './elasticbamboo.pk':

Permission denied (publickey).

steve@hydra:\~$  
I can't see anywhere in the bamboo ui where I can get the passphrase.


author: PauloP
body: Hi Stevesh

Did you try to follow the steps outlined in the following note (<https://confluence.atlassian.com/display/AOD/Accessing+an+elastic+instance>)?

Also, the password for instance that started up using stock images provided by Atlassian should be generated within few minutes. The password will then be shown in Bamboo itself. In case of any problem, perhaps you may try to retrieve this password from AWS console.

Anyway, you can raise a new support ticket for an advanced assistance.

Cheers,

Paulo Renato


Tags: cloud
Your account now has more than 300 repositories.
Asked by msslive:

Hi, I am getting this error while creating repo  

**Your account now has more than 300 repositories. Don't worry! You can still create more for free, but in order to****we need to**

Please help


Answers:
author: Caroline R
body: Hi, [@msslive](/t5/user/viewprofilepage/user-id/2112806)! Thank you for reaching out to Atlassian Community!

This limit is set to prevent abuse, requiring us to validate if it's an actual person with a real need for that. I went ahead and exempted your workspace, so you should be able to create more than 300 repositories now.

Please let me know how it goes and feel free to share any additional questions or concerns regarding this case.

Kind regards,  
Caroline

comments: author: msslive
body: Thanks, it works


author: Caroline R
body: Thanks for your confirmation, [@msslive](/t5/user/viewprofilepage/user-id/2112806)! I'm glad to help :)

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud
How to make a subgroup of tests to be a merge pull request condition instead of the whole set?
Asked by saavedraibarra:

The tests at one same repository are split a per below in TeamCity.

Test set (showstopper)

Test set (critical)

Test set (major)

Test set (minor)

For the merge condition, **Minimum successful builds** - requires at least the specified number of successful builds before merging:

* How to make the minimum successful builds to only take into account the test sets (showstopper, critical and major) from teamcity, but not take the test set(minor) into account?


Answers:
author: Ulrich Kuhnhardt _IzymesCo_
body: I don't think prioritizing build results is possible out of the box with Bitbucket.

Could you create a scenario where the main src changes and each test set create a separate pull request? If so - then you can use [Organizr for Bitbucket](https://marketplace.atlassian.com/apps/1215843/global-pull-request-organizr?hosting=datacenter&tab=overview) to [create dependencies](https://community.atlassian.com/t5/Bitbucket-articles/Pull-request-merge-dependencies-merge-by-priority/ba-p/1773551) between the test set pull requests and the main pull requests in a way that each test set pull request must be merged (with build result condition) before the main pull request can be merged.

.. or [write a custom app](https://developer.atlassian.com/server/bitbucket/how-tos/beginner-guide-to-bitbucket-server-plugin-development/) that prioritises build results for your team workflow.

Hope that helps,

Kind regards, Ulrich

Izymes

++ we remove boring from work ++


Tags: bitbucket-server

server

teamcity