This is the second part of the article related to the question of the TeamCity plugin implementation and hosting. If you haven’t seen the first article yet, feel free to check it out here. It uncovers the process of implementing a Jenkins plugin from scratch.
To upload your plugin to the official TeamCity plugin marketplace (JetBrains), you should perform the following steps:
- Fill the teamcity-plugin.xml file with the plugin information;
- Choose the license type under which you want to distribute your plugin;
- Upload the plugin to the company’s website;
- Prepare additional resources for publishing (plugin description, screenshots, etc.)
- Create an account on JetBrains Plugin Repository;
- Publish the plugin with the help of jetbrains;
Filling the teamcity-plugin.xml file with the plugin information
This .xml file contains basic information about the plugin, specifically the following:
- Plugin name;
- Plugin version;
- Short plugin description;
- Link to download the plugin from the developer’s website; (optional)
- Customer support email; (optional)
- Vendor information (vendor’s name, website link, logo); (optional)
As you could see, not all of these points are mandatory, but filling them is a good practice when developing TeamCity plugins. For example:
<info> <name>devops-automation-sample</name> <display-name>DevOps Automation Sample</display-name> <version>@Version@</version> <description> <![CDATA[Short description text.]]> </description> <download-url>https://www.somesite.com/download-page</download-url> <email>firstname.lastname@example.org</email> <vendor> <name>MyOrganizationName</name> <url>https://www.somesite.com</url> <logo>https://www.somesite.com/images/logo.png</logo> </vendor> </info>
Keep in mind that TeamCity doesn’t allow using the ‘teamcity’ and ‘plugin’ keywords in plugin names and descriptions. Using them will cause issues during the process of publishing the plugin on JetBrains Plugin Repository.
Choosing the license type under which you want to distribute your plugin
At this point, you need to choose the license type your plugin will be distributed under. You can select one of the standard license types (Appache license 2.0, MIT license, etc.) or create your own license. In that case, you will need to publish the license text on your website and provide a link to it when uploading the plugin.
Uploading the plugin to the company’s website
If the plugin is owned by a company, first, it should be uploaded to this company’s website. Next, when uploading this plugin to a jetbrains repository, you should provide a link to it as located on the company’s website.
Preparing additional resources for publishing
You can provide additional information before publishing the plugin. This includes the plugin description, links to the plugin’s documentation, screenshots, and feedback email. This step is not mandatory.
Creating an account on JetBrains Plugin Repository
To upload the plugin, you will need an account on JetBrains Plugin Repository.
Publishing the plugin with the help of jetbrains
After the account is successfully registered, you will need to authorize it. Next, you will need to use the ‘Upload plugin’ option in the menu located in the upper right corner of your account. A plugin upload form will appear:
On this page, you will need to do the following steps:
- Select the type of the uploaded plugin. In our case, it’s TeamCity;
- Select the compiled plugin’s file;
- Select the license type (or provide a link to a custom license);
- Provide a link to the plugin as located on the company’s website;
After this, there are fields for additional plugin information such as tags, channel, and change notes. These fields are not required, but it’s recommended to fill them.
When all the necessary data is provided, you can send a validation request. In the next few days, the plugin will be verified by an administrator and become publicly available.