Skip to content

Latest commit

 

History

History
73 lines (50 loc) · 4.37 KB

CONTRIBUTING.md

File metadata and controls

73 lines (50 loc) · 4.37 KB

Contributing

  1. Please sign one of the contributor license agreements below.
  2. Fork the repo, develop and test your code changes, add docs.
  3. Make sure that your commit messages clearly describe the changes.
  4. Send a pull request.

Here are some guidelines for hacking on gcloud-java.

Using maven for build/test

After you cloned the repository use Maven for building and running the tests. Maven 3.0+ is required.

When downloading the source, we recommend you obtain service account credentials. These credentials will allow you to run integration tests using mvn verify in command line. Follow step 2 of the authentication instructions to generate and use JSON service account credentials.

It's also important to test that changes don't break compatibility with App/Compute Engine and when running elsewhere. To run tests on different platforms, try deploying the apps available on the gcloud-java-examples repository. End-to-end tests should ensure that gcloud-java works when running on the

When changes are made to authentication and project ID-related code, authentication and project ID inference should be tested using all relevant methods detailed in the authentication docs and project ID docs.

Known issue: If you have installed the Google Cloud SDK, be sure to log in (using gcloud auth login) before running tests. Though the Datastore tests use a local Datastore emulator that doesn't require authentication, they will not run if you have the Google Cloud SDK installed but aren't authenticated.

Please, do not use your production projects for executing integration tests. While we do our best to make our tests independent of your project's state and content, they do perform create, modify and deletes, and you do not want to have your production data accidentally modified.

Adding Features

In order to add a feature to gcloud-java:

The feature must be fully documented using Javadoc and examples should be provided. The feature must work fully on Java 7 and above. The feature must not add unnecessary dependencies (where "unnecessary" is of course subjective, but new dependencies should be discussed).

Coding Style

Maintain the coding style in the project and in particular the modified files. Follow the Google Java style.

Contributor License Agreements

Before we can accept your pull requests you'll need to sign a Contributor License Agreement (CLA):

  • If you are an individual writing original source code and you own the intellectual property, then you'll need to sign an individual CLA.
  • If you work for a company that wants to allow you to contribute your work, then you'll need to sign a corporate CLA.

You can sign these electronically (just scroll to the bottom). After that, we'll be able to accept your pull requests.

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See Code of Conduct for more information.