I have Bitbucket Server and own instance of Bamboo. Users are stored in Jira.
I am writing plugin for Bitbucket (change build status against set of Bamboo plans [not all plans must pass, ...]).
Now, I can modify commit build status by plugin API. I Wrote simple plugin (by hint in my previous question)
Now I need get build plan results from linked Bamboo instance (eq - Bamboo is linked with my Bitbucket instance).
How can I obtain informations fom linked Bamboo from Bitbucket plugin I create?
Can I use standard Bamboo API in Bitbucket plugin? (So I can use SecurityService for access to Bamboo data, because Bamboo and Bitbucket are linked and users are maintained by Jira?)
Thanks for any advice :).
You can use the BuildStatus API to get build status' and build summaries for commits that have already been sent to Bitbucket. But, if that doesn't have the data you need, then you can use the ApplicationLinkService to get the Bamboo link and from there you can use the ApplicationLink to get the details you need (e.g. create a request from the request factory and use that to get data from the Bamboo endpoint you need)
Hope this helps!
Kristy
@Kristy Thanks for reply. It works without problems :).
I have question about ApplicationLinkService class. Specially getPrimaryApplicationLink(...).
I cannot find ApplicationType implementation for Bamboo. How I can use ApplicationLinkService.getPrimaryApplicationLink(...) function? Where I can obtain ApplicationType I need?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found not optimal solution
ApplicationLink app_link = null;
for(ApplicationLink link: applink_service.getApplicationLinks()) {
ApplicationType type = link.getType();
if(type instanceof BambooApplicationType) {
app_link = applink_service.getPrimaryApplicationLink(type);
break;
}
}
if(app_link == null)
return;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you tried:
applink_service.getApplicationLinks(BambooApplicationType.class)
or
applink_service.getPrimaryApplicationLink(BambooApplicationType.class)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The application types are listed here: https://docs.atlassian.com/applinks-api/3.2/com/atlassian/applinks/api/ApplicationType.html
All Known Subinterfaces:
BambooApplicationType, ConfluenceApplicationType, FishEyeCrucibleApplicationType, JiraApplicationType, RefAppApplicationType
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank You. I guess it works. (I use Java only for Atlassian plugins and Atlassian configurations).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.