We'd love to accept your patches and contributions to this project. There are just a few small guidelines you need to follow.
Contributions to this project must be accompanied by a Contributor License Agreement. You (or your employer) retain the copyright to your contribution, this simply gives us permission to use and redistribute your contributions as part of the project. Head over to https://cla.developers.google.com/ to see your current agreements on file or to sign a new one.
You generally only need to submit a CLA once, so if you've already submitted one (even if it was for a different project), you probably don't need to do it again.
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult GitHub Help for more information on using pull requests.
An essential part of getting your change through is to make sure all existing tests pass.
- Maven to build and run tests.
- A GCP project to test on with the compute engine API enabled with all relevant permissions enabled, especially billing. Running integration tests will also incur billing.
- For development, IntelliJ is recommended.
- For Windows Images/VM's, have Java and OpenSSH pre-installed. We have suggested startup-scripts for installing both if you do not want to pre-install, but pre-installing is advised.
- Write/change tests as necessary based on the code changes you made.
- Make sure you are at the directory where pom.xml is located.
- Run the following:
mvn test
- By default, the integration tests are not executed. In case you are interested in executing
them, disable the
skipITs
property. - The following environment variables are required to run the integration tests. 5, 6, and 7 are only required when running a windows integration test.
- GOOGLE_PROJECT_ID
- GOOGLE_CREDENTIALS
- GOOGLE_REGION
- GOOGLE_ZONE
- GOOGLE_BOOT_DISK_PROJECT_ID
- GOOGLE_BOOT_DISK_IMAGE_NAME
- GOOGLE_JENKINS_PASSWORD
- GOOGLE_SA_NAME
- Run the following:
mvn verify -DskipITs=false
- By default, the integration tests only use linux based agents for testing. If you make a
windows-related change, or otherwise want to test that a change still works for windows agents,
run the tests with the flag
-Dit.windows=true
like this:
mvn verify -Dit.windows=true
Make sure you have these extra environment variables configured:
- GOOGLE_BOOT_DISK_PROJECT_ID will be the same as your project id.
- GOOGLE_BOOT_DISK_IMAGE_NAME will be the name of the image you created using packer in Google cloud console.
- GOOGLE_JENKINS_PASSWORD will be the password you set when creating the image with packer, used for password based ssh authentication.
- More information on building your baseline windows image can be found here and an example powershell script for setup can be found here.