microsoft/gctoolkit
Publicmirrored fromhttps://github.com/microsoft/gctoolkitAvailable
CONTRIBUTING.md
66lines · modecode
| 1 | # Contributing |
| 2 | |
| 3 | This project welcomes contributions and suggestions. Most contributions require you to |
| 4 | agree to a Contributor License Agreement (CLA) declaring that you have the right to, |
| 5 | and actually do, grant us the rights to use your contribution. For details, visit |
| 6 | [https://cla.microsoft.com](https://cla.microsoft.com). |
| 7 | |
| 8 | When you submit a pull request, a CLA-bot will automatically determine whether you need |
| 9 | to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the |
| 10 | instructions provided by the bot. You will only need to do this once across all repositories using our CLA. |
| 11 | |
| 12 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). |
| 13 | For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) |
| 14 | or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. |
| 15 | |
| 16 | ## Prerequisite for Contributing on GCTooKit |
| 17 | |
| 18 | The gctoolkit build relies on test data which is archived in [GitHub Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry). This requires you to [authenticate to GitHub packages with a personal access token (PAT)](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry#authenticating-with-a-personal-access-token) to build and test. |
| 19 | |
| 20 | If your organization uses Single Sign-On (SSO), also follow the directions under [Authorizing a personal access token for use with SAML single sign-on](https://docs.github.com/en/github/authenticating-to-github/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on). |
| 21 | |
| 22 | You must also add `github` as a server in your `~/.m2/settings.xml` file. Replace `USERNAME` with your GitHub username and `TOKEN` with your PAT. |
| 23 | |
| 24 | ```xml |
| 25 | <server> |
| 26 | <id>github</id> |
| 27 | <username>USERNAME</username> |
| 28 | <password>TOKEN</password> |
| 29 | </server> |
| 30 | ``` |
| 31 | ## Submit an Issue |
| 32 | |
| 33 | if you wish to contribute to GCSToolkit we would kindly ask that you submit an issue to the issue tracker. Doing so will help with the management of the project. |
| 34 | |
| 35 | ## Build |
| 36 | |
| 37 | The build uses the Maven wrapper (`mvnw`) to help ensure reproducible builds and so we don't force you to change your system Maven install. |
| 38 | |
| 39 | * `mvnw clean` - remove build artifacts |
| 40 | * `mvnw compile` - compile the source code |
| 41 | |
| 42 | ### Additional build properties |
| 43 | |
| 44 | * `skipUnpack` - boolean. Defaults to `false`. This tells the build to skip unpacking the gctoolkit-testdata logs. |
| 45 | If the test data has already been extracted to the gclogs directory, setting this property to `true` can save |
| 46 | a minute or so of build time. |
| 47 | |
| 48 | ## Test |
| 49 | |
| 50 | Once above steps are configured you can execute test cases with following command. |
| 51 | |
| 52 | * `mvnw test -Pcontributor` - run unit tests (this project uses JUnit 5) |
| 53 | |
| 54 | ### Contributor maven profile |
| 55 | |
| 56 | * `-Pcontributor` maven profile will enable downloading test data, checks that are required for the build, and running unit tests. |
| 57 | |
| 58 | ## Package |
| 59 | |
| 60 | The packaging is vanilla Maven. |
| 61 | |
| 62 | * `mvnw package` - create the binaries. |
| 63 | |
| 64 | ## Deploy / Publish |
| 65 | |
| 66 | This is a task performed by the core project maintainers, if you think they're behind or would like to get a release out please raise a GitHub issue. |
| 67 | |