|
We encourage plugin developers to host the plugins in the Jenkins community repositories on Github. Contents
PrerequisitesIn order to host a plugin in the Jenkins plugin Update Centre, you must:
Request hostingSimply join the Developers List and send a message to tell us:
You'll get commit access to the repository under https://github.com/jenkinsci. Once you have a Jenkins repository, you can start making the following preparations for your first release. Importing source codeIn some cases you may get an empty repository, rather than a fork, in which case you can import your source code: $ cd path/to/yourplugin $ git init $ git add pom.xml src $ git commit -m "initial import of my plugin" $ git remote add origin git@github.com:jenkinsci/MYPLUGINNAME.git $ git push origin master We also recommend you look around some other plugin's POM file (such as this) to trim off the redundant things. For example, usually the <groupId> is removed (groupId for the plugin, not the one in the <parent> section), to use the default which is org.jenkins-ci.plugins. <repositories> and <pluginRepositories> can be removed as well. If you need help, contact the dev list. Declare your repository in your POMThe location of your repository must be declared in the POM for plugins hosted in Github, by adding the following fragment: <scm> <connection>scm:git:ssh://github.com/jenkinsci/MYPLUGINNAME.git</connection> <developerConnection>scm:git:ssh://git@github.com/jenkinsci/MYPLUGINNAME.git</developerConnection> <url>https://github.com/jenkinsci/MYPLUGINNAME</url> </scm> Creating a Wiki pageEach plugin must have its own page on this wiki, as a child of the Plugins page. This serves as documentation, links to the source code and issue tracker, and makes it easier for people to find your plugin via search engines.
These are the bare minimum requirements for a plugin page. This page will be linked from the Plugins page as well as directly from the Jenkins plugin manager. Once you have made your first release, you should add changelog information to the page, and document what the plugin does, and how it is configured. Please check out some good examples of how you should lay out your page: If you wish, you can also manage your documentation in your GitHub repo, so long as there's a clear link from your plugin's wiki page. Adding your Wiki page to your repoNow that you have a wiki page, its URL must be listed in your POM like this: <project> ... <url>https://wiki.jenkins-ci.org/display/JENKINS/My+Plugin</url> </project> This ensures that the update center will list your plugin correctly. Adding Maintainer InformationIn your POM, make sure to include developer information, such as: <project>
...
<developers>
<developer>
<id>devguy</id>
<name>Developer Guy</name>
<email>devguy@developerguy.blah</email>
</developer>
</developers>
</project>
The ID is your jenkins-ci.org account. The name is a human readable display name. This ensures that the update center and related tools are able to properly display the maintainer for your plugin. The email address is optional (it will be used in the plugin infobox on the wiki if provided in the POM). Continuous integration builds on DEV@cloudTo have your plugin built on jenkins.ci.cloudbees.com, you do not need to do anything---all Jenkins plugins are automatically built as Maven jobs (clean install -e). All plugin CI broken build results will be mailed to any configured developers in the POM, plus culprits. Releasing to jenkins-ci.orgThe easiest way to publish a plugin is to run the maven release plugin with your jenkins-ci.org account: $ mvn release:prepare release:perform -Dusername=... -Dpassword=... If you are using GitHub, make sure that the "origin" remote is pointed to your actual plugin repository. This will perform all the usual Maven release activity, and it will also post the plugin to the download section. If you run with the -B option, Maven will automatically use all the default values without prompting.
However if your plugin is hosted on GitHub and you have different username and/or password for GitHub and jenkins-ci.org use of the command-line arguments for username/password will result in errors. You will have to start an ssh-agent and import your private key so the release plugin can access the GitHub repository and configure the password for jenkins-ci.org in your ~/.m2/settings.xml as described below. Instead of listing username/password on the command line, you may also specify these in ~/.m2/settings.xml as follows: settings.xml <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <servers> <server> <id>maven.jenkins-ci.org</id> <!-- For parent 1.397 or newer; before this use id java.net-m2-repository --> <username>...</username> <password>...</password> </server> </servers> </settings> You may also follow these instructions to encrypt the password stored in settings.xml. Once you are done with this run mvn deploy to verify that your credential is correctly recognized by Maven. Additionally, note that your settings.xml file may need extra configuration for publishing the plugin. See here. Also consider these tips before making a plugin release. The released plugin should show up in the update center within eight hours. You will likely need to add your new release info to the Changelog section of your Jenkins plugin wiki page. Working around common issuesThese are some common issues that can occur when releasing a plugin.
Frequently asked questionsWhat should the Java package name be?Most plugins use org.jenkinsci.plugins.*, but if you'd like to use your own package name, feel free to do so. Help! My plugin is not showing up in the update center.
|
Hosting Plugins
Skip to end of metadata
Go to start of metadata
Add Comment