We are running Bamboo and Confluence with the Confluence Avatar Server (https://plugins.atlassian.com/plugins/com.cutlass.confluence.plugin.rest.cas). Bamboo can access a Gravatar server, but is nailed down to gravatar.com. Is is possible to redirect Bamboo to use the Confluence Avatar Server?
Hi Sebastien, redirecting Bamboo to use the Confluence Avatar Server isn't possible as we have hard coded gravatar.com in the code and we are unlikely to make this configurable anytime soon.
There is a ticket about this one: https://jira.atlassian.com/browse/BAM-8451
Vote for that issue! https://jira.atlassian.com/browse/BAM-8451
The workaround is to implement GravatarService yourself. Change GRAVATAR_URL to your server:
private static String GRAVATAR_URL = "https://yourserver/confluence/rest/cas/1.0/avatar/server/";
Compile and install into:
<bambooinstall>webapp/WEB-INF/classes/com/atlassian/bamboo/user/gravatar
problem with this approach is that you need to do it each time you upgrade.
Can you expand that a bit Justin?
I created a GravatarServiceImpl that implements the interface, using my own server, but after placing the compiled class in the directory yuo mention (which i had to create) it blows up!
I used the source downloaded from my.atlassian and changed the variable for server_URL only... not sure why it doesnt have the requred method.
2012-08-21 14:07:05,520 ERROR [http-8085-16] [FiveOhOh] 500 Exception was thrown. com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NoSuchMethodError: com.atlassian.bamboo.user.gravatar.GravatarServiceImpl.access$000(Lcom/atlassian/bamboo/user/gravatar/GravatarServiceImpl;)Lcom/atlassian/bamboo/configuration/AdministrationConfigurationManager; .... Caused by: java.lang.NoSuchMethodError: com.atlassian.bamboo.user.gravatar.GravatarServiceImpl.access$000(Lcom/atlassian/bamboo/user/gravatar/GravatarServiceImpl;)Lcom/atlassian/bamboo/configuration/AdministrationConfigurationManager; ... 201 more
I pretty much did the same thing. You would do this in the unpacked war under your java container (?tomcat?). The classes in the classes direcectory are loaded before those in the lib directory which is why yours should get picked up first. I didn't have the code in front of me when I posted that but it would seem I also added:
public void setGravatarUrl(String gravatarUrl) { this.GRAVATAR_URL = gravatarUrl; }
Also I have done this in 3.1.1 and 3.4.4 YMMV
Hmm, maybe it is a change in the AdministrationConfigurationManager.
It uses a lazyreference that seems to be bombing out. I am trying a hard coded boolean for the enabled variable.
It looks like you're new here. Sign in or register to get started.