youngmon/atlassian-qna huggingface dataset:
How do I upload a zip file from bamboo ondemand to confluence ondeman
Asked by Bill Adelman:

I attempted to do this with a python script that I run as the final step of plan but the script just hangs. Does anyone have an ideas on what I have done wrong in my script? I do see the artifcate and able to download it manually.

This is what my code looks like

```
#!/usr/bin/pythonfrom __future__ import with_statementimport sys, string, xmlrpclib, re, os, logginglogging.warning('running upload-attachment')     #Space key of the page where you want to attach the file. For example, "KEY".spacekey = 'SIM';    #Page title of the page where you want to attach the file. The page must already exist. You may need to escape or quote special characters in the file name. For example, "Page title".pagetitle = "Simpoint Downloads";    #Content type of the attachment. See below for more information about content types. For example, "text/plain".contentType = 'application/zip';    #File name of the file to attach. This will also be used as the name of the attachment within Confluence. For example, "somefile.txt".filename = 'simpoint/package/target/SimPoint_trunk.zip';logging.warning('opening file') with open(filename, 'rb') as f:    data = f.read(); # slurp all the datalogging.warning('after openning file') server = xmlrpclib.ServerProxy('https://myurl.atlassian.net/wiki');logging.warning('after server connect') token = server.confluence1.login('MyUser', 'MyPassword');logging.warning('after login') page = server.confluence1.getPage(token, spacekey, pagetitle);logging.warning('getPage') if page is None:    exit("Could not find page " + spacekey + ":" + pagetitle);attachment = {};attachment['fileName'] = os.path.basename(filename);attachment['contentType'] = contentType;logging.warning('before addAttachment') server.confluence1.addAttachment(token, page['id'], attachment, xmlrpclib.Binary(data));logging.warning('after addAttachment')
```


Answers:
author: Bill Adelman
body: does anyone have a suggestion for me?


author: Bill Adelman
body: thanks, but I am using ondemand confluence and ondemand bamboo. Any suggestions on how I can solve this problem with that setup?


author: Bob Swift (personal)
body: [Bamboo for automatic uploads to Confluence](https://bobswift.atlassian.net/wiki/display/info/Bamboo+for+automatic+uploads+to+Confluence) is another way to solve this problem :), but only if you are host your own Bamboo :(.


Tags: cloud

confluence

confluence-cloud
Tracking user for manual builds
Asked by Jason Gearheart:

I am trying to log who is triggering manual builds from Bamboo. Sometimes Bamboo is good about tracking who did the build in the Activity Stream, but even this fails sometimes where Bamboo reports Anonymous (we do not allow Anonymous logins).

I have tried to use the ${bamboo.ManualBuildTriggerReason.username} variable from the metadata, but this is also unreliable.

I don't want to have to go the route of writing my own custom plugin to solve this.

Any suggestions or ideas about a plugin that I could use for this purpose?


Answers:
author: ssetayeshfar
body: Hi Jason,

The "bamboo.ManualBuildTriggerReason.userName" variable is a default build specific variable that is working correctly, at least in the latest version of Bamboo 4.4.5, and should provides the correct user. (<https://confluence.atlassian.com/display/BAMBOO/Using+global,+plan+or+build-specific+variables>)

The only problematic scenario is if there is a scheduled build or a build triggered by the repository, it seems like it doesn't record the user who manually runs the following paused manual Stage. There is an open improvement request for this issue to which you can add yourself as a watcher to receive updates or add comments: \[Logging Who Triggered a Manual Stage\|https://jira.atlassian.com/browse/BAM-12858\]. I sthis the problem you have with this variable? Or even for a full manual plan the user is showing up as anonymous? What is your version of Bamboo?

Can this help: [https://answers.atlassian.com/questions/35653/is-it-possible-to-set-bamboo-variables-in-one-stage-via-custom-task-and-retrieve-it-in-a-different-stage](/questions/35653/is-it-possible-to-set-bamboo-variables-in-one-stage-via-custom-task-and-retrieve-it-in-a-different-stage)

Best,

Sepideh


Tags: bamboo-administration
Why does it take 10 minutes for elastic bamboo to start remote agent?
Asked by adambrengesjo:

We use elastic bamboo, with windows images.

When bamboo starts instances, the instances' up time is roughly 10 minutes before the agent is available.


Answers:
author: Marlon Aguiar
body: Actually this is a recurrent complaint, Atlassian is working to speed up the process from their side but on Amazon's end is still takes about 8 minutes to start up the instance. There's a improvement request open regarding this here: <https://jira.atlassian.com/browse/BAM-13111>

I recommend you to vote for it and a add a comment explaining how this is affecting you, most people don't realize but the more activity you have on a improvement request the more likely it is to be implemented.

Hope this information helps!


author: Przemek Bruski
body: Did you compare it against a plain Windows 2008 R2 on the same instance type?


Tags: cloud
How-to add current/latest plan status to notification emails?
Asked by Maximilian Friedmann:

Hi there,

the emails bamboo sends out (e.g. over night) are sometimes already invalid since somebody fixed the plan, it ran several times and is green now again.

Is it possible to reference a build status image in these notification mails? I mean, even if you receive a "was successful" email it could be useful to see that the plan is already failing currently.

Cheers,

Max


Answers:
author: EddieW
body: I am not sure i follow your comment. At the time bamboo sends the "was successful" email, that build _is_ the latest (current) build. It sounds like you are trying to read into the future?

INcluding the status from previous builds is easy, and just a simple edit to the velocity templates.


Tags: bamboo-administration
No agent can build this Job in bamboo
Asked by Raju KC:

How to configure on the plan which show message like "No agent can build this job"?


Answers:
author: Jan Swaelens
body: You should take a look at the requirements of all the jobs in your plan an make sure that they are available on the build agents. An easy way to see which ones are missing is the agent matrix in the administrative section of the bamboo console. When you hover over the crosses you will get a tooltip with what is missing.
Is there a way to add more custom Walls in Bamboo?
Asked by Andrei Markov:

* Can group my Favorite plans somehow?
* Can I pre-define a group of plans to watch and anyone view same list?
* Can Radiator hide "green" plans and only show "reds"?


Answers:
author: EddieW
body: * Can group my Favorite plans somehow?
* - YOu can set your filter to show only favorites.
* Can I pre-define a group of plans to watch and anyone view same list?
* - You can add the same label to the group of plans, and other users can add that label to their filter. I beleive you can also link to a label-based filter to share the URL with others. You can also use this grouping on the wallboards.
* Can Radiator hide "green" plans and only show "reds"?
* - Not sure about that one.

comments: author: Andrei Markov
body: I see, this should work as a "workaround". We will label favorite groups, this is a good idea. But switching between them will require changing a filter. I was hoping there is a way to save predefined filters and then simply swich between them. Does it sound like a Feature Request? :)


author: Andrei Markov
body: As I needed a couple "predefined" Walls I once again I resorted to manipulating data I could find in DB. A couple SQL querries and some manupulation in Excel. Not sure if anyone needs details on this one, for now just stating it's doable :)
queue build job with a customRevision, although concurrent_builds=1
Asked by le wurm:

hi,

<br />

i want to issue a build for a specific plan and revision externally. I use this:

```
curl -X POST -u user:pwd "http://localhost:8085/ajax/runParametrisedManualBuild.action?os_authType=basic&amp;planKey=BUILD_JOB1&amp;customRevision=1234"
```

which works fine. Now, I want to issue a second build, but there's already a build running. The system refuses to do so, but I can work around this, by setting the conurrent builds setting something higher than 1 for this plan, although I've no agents configured. By doing that, the second build gets queued.

But this feels like a hack. For example, I want a second plan in my system, that should be "serialized", that is, builds depend on each other's results. For such jobs, I want to explicitly set concurrent_build=1, but still be able to queue builds.

Maybe there's a different command I can use?

Thanks.


Answers:
author: Przemek Bruski
body: Unfortunately not. You can't queue builds if you're above concurrency limit.


Tags: bamboo-administration
how to config them in Windows OS when I want 'repository triggers the build when changes are committed'
Asked by Becky Huang:

Hi,

I have installed bamboo and svn in my computer which OS is windows. I want to trigger a build when code is updated in SVN. I use the way ' polling the repository for changes', everything runs well. But when I use the way 'repository triggers the build when changes are commited', nothing happen. Please tell me how to config them in Windows OS when I want 'repository triggers the build when changes are committed' ? Your bamboo doc just has Linux example. Thank you very much.


Answers:
author: Jan Swaelens
body: You should be good with what is described here: <https://confluence.atlassian.com/display/BAMBOO/Configuring+source+code+management+triggers+for+Subversion>

The only linux specific step is the 'chmod' which you don't need on windows.
Default branch variables for a plan
Asked by Rick Gomes:

Is it possible to have say a plan variable called host and have it so that this host variable is overriden for every branch? I know you can do it manually for each branch plan created, but I would like to know if it's possible to say have host = blah for every branch plan automatically created?

Rick


Answers:
author: Przemek Bruski
body: No, it's not possible. You can't hook into branch creation process.
how to add custom report in Bamboo?
Asked by Andrei Markov:

I would like to write a custom report for Bamboo (4.4.4 if it matters). Where do I start? Does it have to be in Java? Where can I find all interfaces I can query to get data? This link doesn't give me much to work on and this is all I could find so far:

<https://developer.atlassian.com/display/BAMBOODEV/Report+Module>

I would like to write some like:

- agent daily usage for a specified period

- average queue length per platform (it's a requirent defined in our jobs)

- average wait time per job type (again, based on req)

Any ideas?


Answers:
author: Andrei Markov
body: Until such time when I find bandwidth to learn how to write proper plugins I resorted to writing these reports by reading data directly from DB. The catch of course is that DB schema may change in the future but it was the fastest way for me to get necessary reports. I can now report how much time each agent was used each day and paint red underused ones in excel cells.


author: Felipe Kraemer
body: Hi Andrei,

The custom report must be written in Java, and you can use the REST API in order to retrieve data from the Bamboo instance and use it in your report:

<http://docs.atlassian.com/atlassian-bamboo/REST/3.3-SNAPSHOT/>

You may find these links useful:

<https://developer.atlassian.com/display/BAMBOODEV/Bamboo+REST+APIs>

<https://developer.atlassian.com/display/BAMBOODEV/Using+the+Bamboo+REST+APIs>

comments: author: Andrei Markov
body: Actually I meant a plugin style of report. Then I guess I would use a different set of APIs?
Best practices for Bamboo plans and release tags
Asked by vegarwe:

Our release process looks like this:

* We have a Bamboo plan running on SVN trunk doing all steps necessary for release
  * Build, run tests, create report, store artificats
* When we are ready for release we create a release branch and do release specific changes there
* Clone the original Bamboo plan and run the release branch with the specific changes
* If green, create release tag, point the cloned plan to the tag and run the plan again (and now we have a release)

This approach works fine, but we get a lot of cloned Bamboo plans (one for each release). So I'm wondering what other people are doing and what the best practice is for handling release branches and release tags in Bamboo.

Our release process is a bit rigorous, so running the plan on trunk and calling that a release is not acceptable.


Answers:
author: Przemek Bruski
body: Assuming that your Bamboo is recent enough, you can use the Plan Branches feature. In this way, you can use the same plan definition for multiple branches and tags.

comments: author: vegarwe
body: How 'pleasant' is the Plan Branches to work with? I feel some of the features in Bamboo are clunky to work with, but if this feature is well integrated it might just solve this problem.  

We don't have a recent Bamboo, but I will tell IT to upgrade.


author: Przemek Bruski
body: > How 'pleasant' is the Plan Branches to work with?

Don't ask me :-) I am one of the guys who developed that feature - of course I'll always tell you it's easy to use and pleasant ;-)


author: vegarwe
body: Nice, I'll let you know once we've upgraded then.
how to test the packaged project in my own testing website?
Asked by Xie Qikui:

firstly, i'm a jackeroo in using bamboo and other tools, such as bitbucket, git and so on.

secondly, i have completed the following works:

1. I have created a repository and have an example project added into the repository through git.

2. I have packaged the example project from bitbucket into a war in bamboo.

thirdly, i need to test the war in my own testing website, but i don't to how to do in bamboo? I probably need to create a job and even a task. Or I probably need to write a script to reach my goal. But i don't know how to write it, especially, it relates to bitbucket and git and a website for testting.

If you know how to do, please help me in detail. Eager to receive your heartful help.


Answers:
author: Sultan Maiyaki
body: Hi,

I guess you want to deploy your new war file to an application server. If that is the case, you can use the bundled deployemnt tasks like the tomcat, heroku, jboss or even a combination of the SCP/SSH tasks that enables you copy the war file using scp and use SSH to run command to stop and restart your server


Tags: bitbucket-cloud

cloud

git
Elastic Agent - EC2 user data vs Instance Startup Script
Asked by Sam Chang:

Hi,

With the stock image with custom EBS / custom Image:

# Do either/both have the option to set the ec2 user data?  
# What is the Instance startup script (under managing elastic images in Bamboo), when and how is it used by bamboo/agent?

Cheers,  
Sam  

\[Edit - 15/04/2013\]  
I have googled / checked Atlassian documentation. I did not see the "Instance startup script" referenced anywhere on <https://confluence.atlassian.com/display/BAMBOO/Managing+your+elastic+image+configurations>, even the screenshot on the same doc (<https://confluence.atlassian.com/download/attachments/289277147/manage-elastic.png>).

I only found the "Instance startup script" field in Bamboo 4.2 on the Edit image configurations page.


Answers:
author: Przemek Bruski
body: # Do either/both have the option to set the ec2 user data?

I don't understand that question. Bamboo Server always sets EC2 user data. Do you mean you'd like to set it to some specific value?

# What is the Instance startup script (under managing elastic images in Bamboo), when and how is it used by bamboo/agent?

It's run during instance startup as the root user. This happens before the agent is started.

comments: author: Sam Chang
body: Yes, can we set the ec2-user data ourselves as our AMI image takes cloud init script to set up a few things to establish itself in our VPC. I wanted to just confirm whether it was possible to see what options we have. Using the instance startup script should suffice but just wanted to avoid maintaining another version of the same function.

Thanks


author: Steve Muskiewicz
body: It would be nice if the Bamboo documentation could be updated to reflect this info.


author: Swatantra Yadav
body: On my custom Windows ami, can I specify a PowerShell script as the instance startup script?


author: Przemek Bruski
body: No, Windows does not support startup scripts atm.


author: Swatantra Yadav
body: On windows, how can I connect to a running Bamboo instance? In AWS instance when I do Get Password I get a message: "This instance was launched from a custom AMI, or the default password has changed. A password cannot be retrieved for this instance."


author: Swatantra Yadav
body: I was hoping to use the "Instance Startup Script" to set the administrator password. Is this not possible on Windows?
What is the sa password for the SQL Server on the stock Windows Bamboo elastic agent image?
Asked by Ben LeBlanc:

It looks like the administrator credentials have access to the server, but its not associated with any privileged roles. The server is setup for mixed mode security, but I cant find any reference to the password in the docs. Does anybody know what the sa password is?


Answers:
author: Gary
body: Hi Ben,

I dont beleive the stock bamboo image includes any stock databases:

<https://confluence.atlassian.com/display/BAMBOO/stock+images>

It sounds like that may be a custom image you are using.

Cheers,

Gary

comments: author: Ben LeBlanc
body: Thanks Gary, your were correct. I was look at a slightly customized version of the stock image.


Tags: cloud
bamboo.repository.git.branch variable not pointing to branch
Asked by geforz:

Hi,

I'm automating the build of an android application with bamboo and I have trouble archiving the resulting .apk-files in a webserver directory.

The code is hosted in a bitbucket git repository with multiple branches which bamboo recognizes and builds different apks for each branch.

Once the build is complete the apk file should be copied to a webserver directory, so I added a script task with the following content:

```
dir="/var/www/android/${bamboo.repository.git.branch}/"mkdir -p $dircp bin/appname.apk $dir/appname_b${bamboo.buildNumber}.apk
```

The result for build 45 in the branch "foo" should be a file in

/var/www/android/foo/appname_b45.apk

The problem is, that the file is copied to the same folder for all branches:

/var/www/android/master/appname_b45.apk

i.e. the variable pointing to the branch is always master and I would assume it should be foo in this case?

I stripped my configuration to the minimum:

* One Stage
* One Job
* One Task: Source Code Checkout from the default repository
* One Task: Script which just prints the variable to the logfile (with the same result)

Thanks,

Kai


Answers:
author: geforz
body: The answer is:

a) Don't use bamboo.repository.git if you are using bitbucket

b) use bamboo.repository.branch.name if you are using version 4.4.5


author: PiotrA
body: No problem. Glad to hear that you've resolved the issue. :)


author: geforz
body: Hi,

thanks for the reply.

I checked all the information and realized it was due to me not using git directly, but via bitbuchet which apparently does not set the git-variables although it's using git ;-)

However I found bamboo.repository.branch.name which is working in my 4.4.5 version so sorry for your time ;-)

Regards,

Kai


author: PiotrA
body: Hi Kai,

Can you tell something more about your setup? I'm particularly interested in:  
\* your plan-\>configuration-\>repository configuration (how is your 'default' repository configured - can you for example attach screenshot here of that configuration?)  
\* how is your plan-branch configured - can you tell me if you're using some Bamboo built-in 'merging' strategy like Gatekeeper or Updater?  
\* how is repository override configured in your plan-branch (foo)? (branch-\>configuration-\>repository settings) - can you attach a screenshot here?

I think that {bamboo.repository.git.branch} should work for your case, but I'm worried that some corner-case kicks in and overrides the branch name with the plan's default repository settings. Above informations could shed some light on that hyphothesis. Oh, and BTW: which Bamboo version are you running?

regards,
Our Bamboo database is growing very fast because of test data. Does Bamboo offer a solution to expire and delete old TEST_ERROR records?
Asked by vdastpak:

Our Bamboo database is growing at an increasing rate, mainly because of three test related tables: TEST_ERROR, TEST_CASE_RESULT and TEST_CASE. We can arrange to periodically trim those table in SQL Server. Is there a more elegant alternative solution in Bamboo?


Answers:
author: Przemek Bruski
body: If you want to expire the whole result, you can do it from Bamboo. You can't expire only the test_error, you need to do that manually in your DBMS.

comments: author: vdastpak
body: Thanks Przemek.


Tags: database

delete

table
Artifact limits?
Asked by Patrik Persson:

Hi,

We have a certain artifact that have started to fail the publish part recently and doing so 100% of the time. The only thing that has change is the size of the artifact which reached just above 699Mb.

Is there a size limit to artifacts?

Brgds  
Patrik


Answers:
author: Michael Knight
body: At this time there are no artifact limits in Bamboo unless you are using Bamboo OnDemand, which has a 1GB artifact limit. See [](https://jira.atlassian.com/browse/BAM-13192)<https://jira.atlassian.com/browse/BAM-13192>for details.


author: Patrik Persson
body: Sorry, I am talking about Bamboo.


author: Nic Brough -Adaptavist-
body: What system are you talking about?


Tags: artefact

limit
Bamboo SCP & Git
Asked by Jacob Schriek:

Hello,

Is it possible to only copy changed files using Git + SCP in Bamboo, rather that re-upload all the files every time a new change is made?


Answers:
author: Gary
body: Hi Jacob,

Dont think there is a good solution to do this, as Bamboo doesnt know what specific files are changed after a build is run - it doesnt have built in checking for this. You may be able to add some custom scripting to your builds to do this, using the scp tasks:

<https://confluence.atlassian.com/display/BAMBOO/Using+the+SCP+task+in+Bamboo>

But again, there isnt anything specifically it looks like to look for changes.

I added a feature request to possibly have this added in the future:

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

Cheers,

Gary


Tags: cloud
I stopped receiving bitbucket notifications
Asked by Rony Marshall:

I've been using Bitbucket for almost a month and received notification emails for all of the repos I'm watching. I stopped receiving updates roughly from 15 December, 2021. I didn't change any settings with my notifications or my email address.  

To my surprise, all of my team members are still receiving them. I'm the only one with the problem.

As a side note, my Jira \& confluence email notifications work fine. It's only Bitbucket emails that are not coming through.

My email is rony.marshall@fairtility.com


Answers:
author: Vishwas
body: Hi [@Rony Marshall](/t5/user/viewprofilepage/user-id/4679258)

Since you are using bitbucket cloud please check with Atlassian Support Team on this, they would suggest on the exact issue by checking logs.

Link to contact them <https://support.atlassian.com/contact/>

Regards,

Vishwas

comments: author: Rony Marshall
body: Thanks!


Tags: bitbucket-cloud

cloud