onepremise / gReview

A Bamboo plugin integrating Gerrit which allows Bamboo to verify changes and update the Gerrit review system.
Apache License 2.0
15 stars 23 forks source link

gReview - The Bamboo Gerrit Integration Plugin

This plugin polls Gerrit for changes submitted to the Gerrit review system. When a new change is submitted, gReview will checkout the change and verify it builds. gReview will update the Gerrit change to reflect the correct score for a successful or unsuccessful build.

Features

Requirements

Install

Bamboo

The Bamboo install guide can be found here.

Gerrit

A quick install is available here.

A Tomcat install guide is also in the works.

gReview

This plugin can be installed via the Universal Plugin Manager in Bamboo.

Note: Resave your repository settings in your projects, which use Gerrit, to store your settings with the most recent format and save mechanisms.

Usage

Setup Gerrit

Optional Gerrit Branch Configuration

By default, gReview is configured to draw down changes from Gerrit using the master branch. If you choose, you may overide this setting and configure to poll all branches or a specific custom branch. However, keep in mind, this setting may be redundant if you use Bamboo's branching features. If you choose to overide the default branch, you will find the settings available here:

Enable Gerrit Verification

Viewing Gerrit Change Information

Gerrit change information is available under the Build Summary Gerrit Tab

Adding Gitweb

Creating A Branch (Gerrit UI)

Checkout Branch Made from Gerrit UI

Creating A Branch (Git Console)

Troubleshooting

Connection Issues

Make sure you have Gerrit setup correctly with SSH identity key generated and host used in the SSH connection string added to known host. Detailed instructions are available in the Gerrit documentation.

Note: Some builds will still hang in native msysgit mode on Windows due to the following issue with the bamboo-git-plugin: https://jira.atlassian.com/browse/BAM-11096.

You can work around this issue by manually adding your hostname, used in the repository configuration, to the msysgit/.ssh/known_hosts file. Example:

127.0.0.1 ssh-rsa XXXXB3NzaC1yc2EAAAADAQABBBBgQC699HzXHwr1H6OJeVlRo7h4r+3PY d0wNkqzl6EUAeU2iZjqFqQL2ZiNVqs2JrpTNadbgtXBNk9rhQIWajQZG9ZJG/OPxe+NOkbWQVev rcELsw5N2wxcJOWz+ey1tFv3VCtNCLUGgF7yIg0kZZVQ+HvAzLoMbiHs0haVmEjnLherSw==

NullPointerException Encountered after Upgrade

If this is an upgrade, and you encouter a NullException when attempting to build, you may need to resave your repository settings.Release 1.2.3 changed the way the ssh private key is stored for multiple repositories. Resaving should resolve this issue.

Unable to Delete Repository

This is an old issue and has been fixed in new releases of Bamboo. Here's the ticket.

Debugging

If problems persist, you can turn on debugging in the Administration console to help resolve and report issues. Steps to turn on debugging:

Check your Bamboo home directory for log output:

Ex: bamboo-home\logs\atlassian-bamboo.log

Bug Fixes and Enhancements

1.4.6.7 Updates

1.4.6.5 Updates

1.4.5.1 Updates

1.4.3.6 Updates

1.4.2.1 Updates

1.4.1.20 Updates

1.4.0 Updates

1.3.0 Updates

1.2.9 Updates

1.2.8 Updates

1.2.3 Updates

1.2.2 Updates

1.2.1 Updates

1.2.0 Updates

1.1.3 Updates

1.1.2 Updates

1.1 Updates

Development Branches

How to build the Bamboo Gerrit Plugin

Impatient way:

  1. `mvn package' (Apache Maven 2.2.1 was used to develop this plugin)

More patient way:

  1. Download and install the latest JDK.
  2. Download and install the Atlassian Plugin SDK.
  3. Run `atlas-package -DskipTests' in the directory containing Bamboo Gerrit Plugin pom.xml.
  4. Grab plugin JAR file from `./target/greview-.jar'.

Full documentation on how to develop Atlassian Plugins is available at the Atlassian Developer Site.

How to deploy Git Plugin into existing Bamboo instance

Full documentation on installing Atlassian Plugins is available at:

Maintainer

Jason Huntley

profile for Jason Huntley on Stack Exchange, a network of free, community-driven Q&A sites