Trying to create a "source repository" plugin for Bamboo

We have an old custom plugin that acts as a source repository and triggers builds with commit information. Unfortunately, this plugin does not work in Bamboo 7, so I’m trying to either update it or recreate it with whatever the new correct APIs are. According to Build Lifecycle plugin modules the way to do this seems to be to create a plugin with a source repository module, but I’m having trouble figuring out how to use the SDK tools to do that. I can use atlas-create-bamboo-plugin to create a plugin framework to work with, but atlas-create-bamboo-plugin-module doesn’t list “source repository” as an option.

[INFO] --- bamboo-maven-plugin:8.0.2:create-plugin-module (default-cli) @ plugintest ---
Choose Plugin Module:
1:  Component Import
2:  Component
3:  Downloadable Plugin Resource
4:  Licensing API Support
5:  Module Type
6:  REST Plugin Module
7:  Servlet Context Listener
8:  Servlet Context Parameter
9:  Servlet Filter
10: Servlet
11: Template Context Item
12: Web Item
13: Web Panel
14: Web Panel Renderer
15: Web Resource
16: Web Resource Transformer
17: Web Section
Choose a number (1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17):

Where am I going wrong here? Thanks for any help you can provide.

Repository module is not added as it’s not that often when you need new repository plugin.
If you have access to Bamboo source code (you can find it at my.atlassian.com when have valid Bamboo license) then see implementation of Bitbucket Cloud repository or Git repository plugins.
Starting point is snippet from atlassian-plugin.xml of Bitbucket Cloud

<vcsType key="bbCloud" name="Bitbucket Cloud" class="com.atlassian.bamboo.plugins.bitbucket.v2.BitbucketCloudWorkingCopyManager" weight="10">
    <tooltipKey>repository.bitbucket.tooltip</tooltipKey>
    <description>A Bitbucket Cloud repository</description>
    <uniqueRevisionIds>true</uniqueRevisionIds>
    <defaultViewerKey>com.atlassian.bamboo.plugins.atlassian-bamboo-plugin-bitbucket:bbCloudViewer</defaultViewerKey>
    <exporter class="com.atlassian.bamboo.plugins.bitbucket.v2.export.BitbucketCloudImporterExporter"/>
    <serverConfigurator class="com.atlassian.bamboo.plugins.bitbucket.v2.configurator.BitbucketCloudServerConfigurator"/>
    <branchConfigurator class="com.atlassian.bamboo.plugins.bitbucket.v2.configurator.BitbucketCloudBranchConfigurator"/>
    <changeDetectionConfigurator class="com.atlassian.bamboo.vcs.configuration.configurator.DefaultChangeDetectionOptionsConfigurator"/>
    <changeDetector class="com.atlassian.bamboo.plugins.bitbucket.v2.BitbucketCloudChangeDetector"/>
    <branchDetector class="com.atlassian.bamboo.plugins.bitbucket.v2.BitbucketCloudBranchDetector"/>
    <branchCreator class="com.atlassian.bamboo.plugins.bitbucket.v2.BitbucketCloudBranchCreator"/>
    <tagCreator class="com.atlassian.bamboo.plugins.bitbucket.v2.BitbucketCloudTagCreator"/>
    <connectionTester class="com.atlassian.bamboo.plugins.bitbucket.v2.BitbucketCloudConnectionTester"/>
    <variableGenerator class="com.atlassian.bamboo.plugins.bitbucket.v2.BitbucketCloudVariableGenerator"/>
    <pullRequestDetector class="com.atlassian.bamboo.plugins.bitbucket.v2.BitbucketCloudPullRequestDetector" />
    <commitCommenter class="com.atlassian.bamboo.plugins.bitbucket.v2.BitbucketCloudCommitCommenter" />
    <bambooSpecsHandler class="com.atlassian.bamboo.plugins.bitbucket.v2.BitbucketCloudBambooSpecsHandler"/>

    <resource type="download" name="icon" location="images/bitbucket-icon.svg">
        <param name="content-type" value="image/svg+xml"/>
    </resource>
    <resource type="freemarker" name="editServer" location="/com/atlassian/bamboo/plugins/bitbucket/v2/bitbucketCloudServerEdit.ftl"/>
    <resource type="freemarker" name="viewServer" location="/com/atlassian/bamboo/plugins/bitbucket/v2/bitbucketCloudServerView.ftl"/>
    <resource type="freemarker" name="editBranch" location="/com/atlassian/bamboo/plugins/bitbucket/v2/bitbucketCloudBranchEdit.ftl"/>
    <resource type="freemarker" name="viewBranch" location="/com/atlassian/bamboo/plugins/bitbucket/v2/bitbucketCloudBranchView.ftl"/>
    <resource type="freemarker" name="editAdvancedServerOptions" location="/com/atlassian/bamboo/plugins/bitbucket/v2/bitbucketCloudEditAdvancedServerOptions.ftl"/>
    <resource type="freemarker" name="viewAdvancedServerOptions" location="/com/atlassian/bamboo/plugins/bitbucket/v2/bitbucketCloudViewAdvancedServerOptions.ftl"/>
  </vcsType>
1 Like