microsoft/gctoolkit

Public

mirrored from https://github.com/microsoft/gctoolkitAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
a71cfdc2203aa71624dfc19307e301e22f8b14b4

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

CONTRIBUTING.md

59lines · modecode

1# Contributing
2
3This project welcomes contributions and suggestions. Most contributions require you to
4agree to a Contributor License Agreement (CLA) declaring that you have the right to,
5and actually do, grant us the rights to use your contribution. For details, visit
6[https://cla.microsoft.com](https://cla.microsoft.com).
7
8When you submit a pull request, a CLA-bot will automatically determine whether you need
9to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the
10instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
11
12This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
13For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
14or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
15
16## Prerequisite for Contributing on GCTooKit
17
18The 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
20If 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
22You must also add `github` as a server in your `~/.m2/settings.xml` file. Replace `USERNAME` with your GitHub user name 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
32## Build
33
34The build is vanilla Maven.
35
36* `mvn clean` - remove build artifacts
37* `mvn compile` - compile the source code
38
39### Additional build properties
40
41* `skipUnpack` - boolean. Defaults to `false`. This tells the build to skip unpacking the gctoolkit-testdata logs.
42 If the test data has already be extracted to the gclogs directory, setting this property to `true` can save
43 a minute or so of build time.
44
45## Test
46
47Once above steps are configured you can execute test cases with following command.
48
49* `mvn test -Pcontributor` - run unit tests (this project uses JUnit 5)
50
51### Contributor maven profile
52
53* `-Pcontributor` maven profile will enable downloading test data, checks that are required for the build, and running unit tests.
54
55## Package
56
57The packaging is vanilla Maven.
58
59* `mvn package` - create the binaries.
60