youngmon/atlassian-qna huggingface dataset:
How to set the bamboo agent id via the install process to an existing (last) value.
Asked by Richard Neale:

In a cloud model where you destroy and deploy vms, I would like to tear down a group of agents and and re-install after they have been re-created using the same id. I maintain a db of name/id values that allows this but the process of setting the value is not eligant. I was wondering if there was a cmdline -Dprop=value available.


Answers:
author: Jan Swaelens
body: I don't think that there is a property for that (would like to have it also) but I think you can achieve your goal by running the agent installer with the 'install' directive, then going to the agent home and adapting the 'bamboo-agent.cfg.xml' file to change the agent name/id in the corresponding XML element. After this you can start the agent normally and I assume it wil use the configured values.

Haven't tried yet this but it is on my todo list.

comments: author: Richard Neale
body: Our currrent process is to edit the file and insert the value via a process (script) where we basicly kick the install into background, monitor the log file for the occurance of 'ready to receive builds' and then kill the agent where the process then does the id insertion via sed and finaly does a relaunch. When done, we go into Bamboo Agent screen and delete the new definition. Very hacky and where a -DAgentId=1234567 would be very nice.

Thanks for your response.
Bamboo weekly performance troubles 4.3.3
Asked by Mike Rocheleau:

We have a large Bamboo instance that since upgrading to 4.3.3 sees massive user-experienced lag on the web interface after a week or so of being up. To the point that I can't get in and check system info or agents.

Looking at the bamboo.log while the slowness occurs we see any task in there that normally finishes in under 100ms is taking 40,000+ms to complete. I see nothing before this occurs in the logs that might cause this though, normal usage.

Host resources are totally fine across the board, Apache front-end restarted and behaving normally.

Of interesting note I looked at the last week's worth of CPU performance on this host and saw a steady ramp up in the Mhz used. It was a definite ramp over the entire week. Presuming the plan/build load hasn't changed in this time, and nothing else was added to the box, curious that the cpu metric would be constantly increasing until critical failures hit.

Any ideas would be great to check! Post restart we're again back to sub 100ms responses to all tasks in the logs, and this is the third time it's occured (each one week apart) since we upgraded to 4.3.3.

Cheers!


Answers:
author: Mike Rocheleau
body: We made the following changes to our environment and have seen no issues since:

- Took out application link between Confluence and Bamboo

- Cleaned up failed builds, we had a number of nightly recurring builds hitting the build queue that were specced to only run on a single agent which hadn't been online in weeks. So 3 builds per night were queuing up with "no agent can perform this build".

- Removed consistently failing builds

- Lowered logging on access logging to "warn" from "debug" or "info" or whatever it was.

Since this we've had no issues and Bamboo has been much faster. It's had no performance troubles in 2+ weeks now and no crashes. Good deal!


author: Przemek Bruski
body: One option is to upgrade to 4.4.x. There are performance/stability fixes inside that would help. If you can't do it or it does not help, please contact support and provide them with thread dumps taken when the slowdown occurrs. Also, what's the load on that machine? Is the CPU taken up by Bamboo's java process or is there something else?

comments: author: Mike Rocheleau
body: Thanks, our upgrade path will have us move up to 4.4 (or 4.5 if it's out) at the end of the summer, we only just moved to 4.3.3 from 4.2.1 (4.1.2?). The load on the machine is very low, it's heavily over provisioned on memory, cpu and fast disk. It's isolated to Bamboo only so the cpu is only being used by base system processes and Java.

I have a support ticket open but wanted to see if others in the community had similar experiences at all on this release. We weren't seeing this sort of trouble on the old release, but we are getting more Agents online now so perhaps that contributed.


Tags: performance

response

time
add build information to the successful build email
Asked by Paul B:

in bamboo 2.6.3, we would send information about a build in the build email by outputting to stderr from the build script, and the successful build email would contain and display all the stderr output. Now that I have bamboo 4.4, it seems I can not add any informational text to the successful build email. Do you know a way for me to add build information to successful build email?


Answers:
author: Brent Villalobos
body: Wow! Big jump in versions. You have probably noticed that there are no longer just projects and plans, but now projects, plans, stages, jobs, and tasks. Because a single plan can have multiple jobs, the plan emails no longer contain a log snippets because there may be multiple log snippets.

In your plan's notification settings, there are now two sets of notifications -- plan and job. If you want log snippets in your email, you will need to create job-level notifications.

comments: author: Paul B
body: thank you. that was just what I was looking for. I would have never guessed that solution. (and I did not find this explaination anywhere in the docs.)


Tags: email
bamboo git submodules Permission Denied - ssh key
Asked by David:

Hey,

I am using bamboo 4.1 and want to use git submodules.

Checking out the main repo works fine. However the submodules return a Permission denied (publickey)

However, using the command line works fine. This means the keys are setup correctly.

I read in some other answers to a similar problem, that bamboo does not use the same ssh key for submodules as for the main repo. Is this true?

How can I fix this on my Mac Build Server?

Any help is appreciated.

Thanks,

David


Answers:
author: PiotrA
body: Hello David,

May I ask what happens if you try to use command line under the Bamboo? Like if you would use Bamboo Script Task with the exactly same content as the command you're executing manually (I do expect that by "using the command line works fine" you mean that you logged to the Bamboo host machine and executed git commands manually - what would happen if the same commands were executed as a part of Bamboo build plan?). Would you get "Permission denied" too? Maybe it's the difference of system environments that Bamboo sees and a logged user see. But that's a speculation only...


Tags: git

ssh

submodule
What's the difference between Default Image S3 and Default Image EBS?
Asked by Joe McCall:

The title is the question. I noticed both can automatically mount an EBS snapshot upon boot, but I couldn't find any more details than that.

Thanks in advance!


Answers:
author: Przemek Bruski
body: <http://www.newvem.com/choosing-between-ebs-backed-and-instance-store-backed-ami/>

When in doubt, choose EBS.

EBS snapshot is something yet different. I can be used both with S3 and EBS instances.

comments: author: Joe McCall
body: Cool. Our build tool is bootstrapped so persistence is not an issue. Neither is high-availability. We're using an EBS snapshot to store our third-party SDK files, which is why I mentioned it. We started out with an EBS instance, but now we're running S3 backed instances to save some money. Thanks for the link!


Tags: cloud
Override Concurrent Build Setting At Stage or Job Level
Asked by Peter Kahn:

Hi all,

Is it possible to set a plan to allow concurrent exexecution of stages or jobs?

I have a changeset build process (like a gated checkin build but we build after the checkin). At present, we use a bunch of scripts and three plans:

- Process queue for next changeset

- Run Build

- Finalize Results

I'd like to setup one plan and manage the rest inside it. I believe I can only set concurrent build limits at the plan level so I'll need to set this up as follows:

- Process-queue-plan manages incoming queue of changeset to run and starts Run-Build-Plan (concurrent limit = 1)

- Run-Build-Plan builds specific revision in JOB1 and then finalizes in JOB2 (concurrent limit = many)

Please let me know if I'm right in my understanding that concurrency is per plan and not per start or job.

Thanks

Peter


Answers:
author: Marcin Gardias
body: It's true that concurrency limit is per plan, but it doesn't mean you can't achieve what you want ;-)

If I understand correctly "Process queue for next changeset" does sth like the following:

- check if there are new commits in source repo(s) (and this needs to be one-at-a-time thing)

- spawn a process that will run 2 build steps. (there can be many of those processes)

Here's the thing: this is exactly what Bamboo can do for you.

Set up a plan, configure "Repository polling"\* automatic trigger and add your 2 stages to the plan\*\*. Set up concurrency limit to whatever you want. Done.

Internally, the triggering build logic uses an exclusive lock, so even though *Jobs* will run in paraller, only one 'triggering process' will run at a time, regardless of concurrency setting.

\*) there are other options too ;-)

\*\*) Actually your 2 build scripts might be better mapped to single Bamboo Job with many Tasks rather to 2 Stages, depending on how your scripts interact. For example: are they supposed to run in the same dir? If so, Tasks are better choice. More on this: <https://confluence.atlassian.com/display/BAMBOO/Using+stages+in+a+plan>


Tags: concurrent
Is there a Bamboo variable which indicates the trigger type?
Asked by Gail Stewart:

Now that a build can be triggered for multiple reasons, I'd like to use that information. For instance, I would like to only run the sonar analysis on the nightly/scheduled build, not on the builds triggered by other builds or by checkins.


Answers:
author: Gail Stewart
body: I believe the answer is that there is no Bamboo variable to indicate the reason the build was triggered. I have filed [BAM-13030](https://jira.atlassian.com/browse/BAM-13030) requesting this feature.

comments: author: Sultan Maiyaki
body: Yeap great that you already raised a request for that :)


author: Hubert Cross
body: How is this solved? I still cannot easily tell whether a build was run due to a commit or a scheduled run. I don't where else to vent my frustrations at yet another key feature that should be trivial to implement and years later does not exist.  

Now I'm faced with using the REST Api to trigger nightly builds with a specific 'nightly' user to distinguish these from daytime manual builds (where a user other than 'nightly' is the value of that half-baked ManualBuildTriggerReason variable) and scm trigger builds where that variable will not be set at all.

This means the configuration for nightly builds will have to live \*outside\* of bamboo altogether.


author: Culme
body: \[I need to scrap this answer altogether, turns out my tests were flawed and my workaround did not work...\]


author: Sultan Maiyaki
body: Hmm I can\`t seem to find a variable to retrive that. The only vailable variable is to retrieve the person who triggered a manual build using the variable bamboo.ManualBuildTriggerReason.userName

I am kind of believeing you can retireve this info using rest API call as explained in http://docs.atlassian.com/bamboo/REST/4.0/#idp108720


Tags: build
Clone a Build plan
Asked by Alexandr_Sirotkin:

I have a set of similair build plans, to avoid tuning every of them I want to create a standard plan and then clone it and change a cloned copy according my needs. Is it possible?


Answers:
author: PiotrA
body: Hm, how about <https://confluence.atlassian.com/display/BAMBOO/Cloning+an+existing+plan> - isn't that what you need? Or is your use-case a little bit different?

regards


author: PiotrA
body: @eddie - done


author: EddieW
body: @piotr - why not promote your comment to an answer?


author: Alexandr_Sirotkin
body: Oh, I overlooked it, thank you, exactly what Im need.


author: Alexandr_Sirotkin
body: not exactly, template project is an actual project also. I just want to create a few plans which are very similiar to it. I.e I have \~50 projects which all are the same (the same build steps but different string constants). I dont want to create all 50, I want create one and then clone it 49 times.


author: Tanner Wortham
body: are you asking if you can build a 'template' project and then clone that project into actual projects later?
What does "Unable to find job configured as a dependency provider" mean?
Asked by John Chaney:

On many of my builds I see this error on the plan summary page. There isnt any more description to this so I am confused. Is this referring to a maven dependency or the nexus respository or something internal to bamboo? Anyone seen this before and know how to resolve it?

Also, this error is recurring for each build that I do so eventually I end up with a whole stack of them and they don't inhibit me from having a sucessful build.

Thanks.


Answers:
author: Sultan Maiyaki
body: It means you have "Automatic Dependency Management" enabled for one of your plans (Plan configuration page -\> Dependencies) without having "Dependency Provider Task". It could also mean that there are children plans that don't have any enabled jobs. Basically try check your plan dependicies as I suspect the firs case

comments: author: John Chaney
body: thanks, this cleaned up a lot of the errors I've been seeing.


author: Victor Campbell
body: I think the confusing part of this is that the "Automatic Dependency Management" option hides behind the "Advanced Options", and is turned on by default.


Tags: dependency

error
Cannot access Bitbucket after logging into Atlassian Start Page
Asked by Alex Kenny:

Hello all,

I am trying to access Bitbucket from a fresh install of Chrome on a new mac. When I log in with my Atlassian account, I can get to the start page and access all of that content. Yet when I click on Bitbucket and try to open it up in a new page, I get another log in prompt at the top of the screen and when I use my credentials for Atlassian, it either won't work or it redirects me to a page with the following text: "You may run into this issue when you use specific browsers or add-ons that hide the referer header for id.atlassian.com and other Atlassian sites. Check for these and then try logging in again."   

I have cleared both the cookies and cache several times to no avail. I have also changed my password multiple times thinking that was the problem but it wasn't.  

Has anyone else gotten this before and found a solution? Thank you for reading this and trying to help me out!


Answers:
author: Norbert C
body: Hi Alex,

Thank you for contacting Atlassian Community! I'm Norbert from Bitbucket Cloud Support, it's nice to meet you! Also, welcome to the Atlassian Community :)

When I reviewed your account, I could see is that it was in a "dormant" state as you haven't logged in to this account for a while. I'd like to inform you that I've reactivated your accont.

Can you let me know whether if you can access your account?

I'm looking forward to hear from you, Alex.

Have a great day ahead!

Best Regards,  
Norbert  
Atlassian Bitbucket Cloud Support

comments: author: Alex Kenny
body: Hi Norbert,  

Yes that worked, thank you so much!  

-Alex


Tags: bitbucket-cloud

cloud
diy backup for Bitbucket
Asked by Jason Walker:

There is probably a very easy solution to this problem, but I can't find it.

When running the **bitbucket.diy-restore.sh** script, I get the following error:

rsync: change_dir "/tmp/bitbucket.diy-restore.Ms39UM/bitbucket-home" failed: No such file or directory (2)

When I navigate to the rsync: change_dir **"/tmp/bitbucket.diy-restore.Ms39UM/bitbucket-home"**directory, there is no /bitbucket-home directory as suggested by the error message.

However, the /bitbucket-home directory is here:

/tmp/bitbucket.diy-restore.Ms39UM**/backup/**bitbucket-home

As you can see, an additional directory called /backup has been inserted.

My question is: What script in the /backup/diy-backup set of scripts needs to be amended so that the restore looks for the /bitbucket-home directory in /tmp/bitbucket.diy-restore.Ms39UM**/backup/**bitbucket-home

and not

/tmp/bitbucket.diy-restore.Ms39UM/bitbucket-home

Thank is advance for your assistance.


Answers:
author: Jason Walker
body: I found out which file need to be changed. It is the **archive-tar.sh** file in /backup/diy-backup.

The following needs to be changed from:

BITBUCKET_RESTORE_DB="${BITBUCKET_RESTORE_ROOT}/bitbucket-db"

BITBUCKET_RESTORE_HOME="${BITBUCKET_RESTORE_ROOT}/bitbucket-home"

to:

BITBUCKET_RESTORE_DB="${BITBUCKET_RESTORE_ROOT}/backup/bitbucket-db"

BITBUCKET_RESTORE_HOME="${BITBUCKET_RESTORE_ROOT}/backup/bitbucket-home"


Tags: bitbucket-server

restore

server
Feature Request: Merge check approval from specific user(s)/group(s)
Asked by Bert Oost:

Hi there,

I would like to have the ability to add a merge check where I can define (select) users and/or groups which should approve pull requests. Additionally the number of approvals should be configurable.

For example;

* I want to have 2 approvals in general
* And at least 1 approval from a technical-lead (group)

Regards, Bert


Answers:
author: Ulrich Kuhnhardt _IzymesCo_
body: Hi [@Bert Oost](/t5/user/viewprofilepage/user-id/3596711) ,

we've will have a cloud version of [Workzone for Bitbucket](https://marketplace.atlassian.com/apps/1211303/workzone-pullrequest-workflow?hosting=datacenter&tab=overview) available as beta in the next couple weeks. Please send me an email (info at izymes dot com) to discuss details and get access to the beta version. Best, Ulrich

comments: author: Bert Oost
body: Hi Ulrich,

That literally sounds good! I just saw your reply.

I have send you an email. Thanks in advance.

Regards, Bert


author: Roman Stoffel
body: [Code Owners for Bitbucket Cloud](https://marketplace.atlassian.com/apps/1218598/code-owners-for-bitbucket?tab=overview&hosting=cloud) also should cover your scenario.  
You can define two groups, like:  

\`\`\`  
# Define groups  
@@@Developers @"Joe Dev" @"Jill Dev" @"Jordan Dev"  
@@@@LeadDevs @"Domi Dev" @"Jun Dev"  

# For all source code, add reviewers from the Delelopers and LeadDevs group  
\* @@Developers @@LeadDevs  

# Then check, the approvals. At least 2 from Developres, and 1 from a lead dev.  
(Check(@@Developers \>= 2) \& Check(@@LeadDevs \>= 1))  
\`\`\`  

More docs here: <https://docs.mibexsoftware.com/codeowners/cloud>


Tags: bitbucket-cloud

cloud

merge

pull-request
Request garbage collection
Asked by Dominykas Vilipas:

Hey,

I think one of our repositories needs a garbage collection, after following the recommended reduction steps. Online is at 2.43 GB

Given that there is no way to open a ticket for that - Can someone from the Team run it for us on the oversized repo?

Thank you so much!


Answers:
author: Caroline R
body: Hi, [@Dominykas Vilipas](/t5/user/viewprofilepage/user-id/4671499)! Welcome to the community!

I run the GC against the repository that was showing 2.43 GB, however, the size hasn't changed. Could you please confirm the steps you have followed to decrease the repo size?

Looking forward to hearing from you.

Kind regards,  
Caroline

comments: author: Dominykas Vilipas
body: my steps were

    git reflog expire --expire-unreachable="now" --allgit prune --expire="now" -vgit gc --aggressive --prune="now"

repository now is from scratch so need to delete old history , now if I am not mistaken is only 5 commits


author: Caroline R
body: Hi, Dominykas.

Thanks for the additional information. The commands you have run have performed a local GC on your repository. However, the GC will just remove dangling commits and repack your repo, but it won't affect the repository size that much.

So, in case you want to decrease the repo size, you could for example remove large files and use BFG to remove them from the history, and then we can run the GC on our side to also remove them from the remote repository as well. You can also move these large files to LFS if you want.

In order to perform these changes on your repo, the following documentation has a very good explanation of how to achieve this:

<https://support.atlassian.com/bitbucket-cloud/docs/use-bfg-to-migrate-a-repo-to-git-lfs/>

I hope this helps, but do let me know if you have any questions.

Kind regards,  
Caroline


author: Dominykas Vilipas
body: It doesnt help because repo size is only 1GB when i clone It so something calculated wrongly in bitbucket


author: Caroline R
body: Hi, [@Dominykas Vilipas](/t5/user/viewprofilepage/user-id/4671499).

You mentioned that your "repository now is from scratch so need to delete old history". Could you please clarify what exactly you mean by that? Did you delete the .git folder of the repo and initialize a new repository? Or have you performed anything in your local repo to delete older commits besides the commands you reported above?

Also, could you please take a mirror clone of the repo (with the --mirror flag) and then run the following command inside the mirror clone directory, and share the output with us?

    git count-objects -vH

This will show us the exact size of this repository. Please note that if you take a clone without the mirror flag, only the main branch will be pulled locally, so we need the output of this command on a **mirror clone**.

Looking forward to hearing from you.

Kind regards,   
Caroline


Tags: bitbucket-cloud

cloud

garbage-collection
Possible phishing email
Asked by Calin Durnea:

Hello,

I have recieved a suspicious email from "BitBucket Atlassian \<noreply-atlassian@bitbuckets.eu\>" regarding a password change that I have not triggered.

Is this a valid email? and is "@bitbucket**s**.eu" an Attlassian domain?

Thank you and have a good day!

![Atlassian email.png](https://community.atlassian.com/t5/image/serverpage/image-id/173603i02318FA83156CBDF/image-size/large?v=v2&px=999 "Atlassian email.png")


Answers:
author: Theodora Boudale
body: Hi [@Calin Durnea](/t5/user/viewprofilepage/user-id/4670685),

This is most likely a phishing email.

bitbuckets.eu is **not** an Atlassian domain.

Bitbucket Cloud uses Atlassian accounts for authentication, and Atlassian account password reset emails come from an email noreply+XXXXXXXXX@am.atlassian.com

You can request a password reset email via the following link to see what a legitimate Atlassian account password reset email looks like (you don't need to actually reset your password)

* <https://id.atlassian.com/login/resetpassword>

Kind regards,  
Theodora

comments: author: Calin Durnea
body: Thank you!


author: Theodora Boudale
body: Hi [@Calin Durnea](/t5/user/viewprofilepage/user-id/4670685),

You are very welcome!

I've talked with my team and we can help get the domain delisted, but we would need to provide some evidence.

Do you perhaps still have the email in your inbox and would it be possible to provide us with the raw .eml file of the phishing email?

If so, I can create a support ticket that will be visible only to you and Atlassian staff, so that you provide the .eml file there instead of here publicly.

Kind regards,  
Theodora


author: Calin Durnea
body: I still have the email and I can share the eml file :)


author: Theodora Boudale
body: Thank you [@Calin Durnea](/t5/user/viewprofilepage/user-id/4670685)!

I have created a support ticket using the email of your community account. You should have received an email in your inbox with a link to the support ticket. Just in case you haven't received it, please feel free to let me know and I can post the ticket URL here (the contents of the ticket won't be visible to anyone else even if they have the URL).

You can leave a reply in the support ticket and add the .eml file as an attachment.

If you have any questions, please feel free to let me know!

Kind regards,  
Theodora