AppMap provides a GitHub status check for your CI flow to ensure that pull requests meet crucial performance, security, and quality requirements before they are merged and deployed to production.
ci command is integrated with the testing step of your build job in CI.
Connecting your AppMap org to your GitHub org is required to get continuous AppMap status checks.
1. Go to your account settings on AppMap Server and select an AppMap organization. This will bring you to the settings page for that AppMap organization.
2. Under Third party integrations click the Install button. This will bring you to the app installation page on GitHub.
3. Select the GitHub organization you want to map to your AppMap organization.
4. GitHub will make you aware of what minimal permissions are required by AppMap Server to provide the status check, and ask you to select a repository (or repositories) to report on. Select projects that are being scanned by AppMap Analysis in ci.
Upon granting access you will be automatically redirected back to AppMap Server.
5. On AppMap Server navigate to the application you want to link the repository you selected in the previous step, and click on the settings icon next to the application name. This will bring you to the settings page for that application.
6. In the Third party integrations pane select which GitHub repository you want to track.
AppMap is now linked to your GitHub repository.
Assuming that the AppMap ci command is integrated into the test step of your build job, then any time a PR is opened or updated, AppMap Analysis will scan the code, push any findings to AppMap Server and update the associated commit status in GitHub.
Note: When uploading findings to AppMap Server, branch and commit information will be resolved from the environment if possible. If you have a non-standard configuration, or you’re running locally, you may provide these values yourself using the
-C options to specify the branch and commit details, respectively. For example:
npx @appland/scanner ci --appmap-dir tmp/appmap -C $(git rev-parse HEAD) -b $(git branch --show-current)
The best way to remove a finding and get the AppMap status check to pass is to update the code to fix the behavior that generated the finding. If a PR is updated to fix a finding , it will trigger another AppMap Analysis scan, and (assuming there are no other findings) the status check will then pass.
Clicking on the details link of the AppMap commit status will bring you to AppMap Server and show you the detailed results of the scan that generated the findings.
Here you can choose to defer findings to be addressed later.
Deferring a finding will automatically update the status of the PR.
See the Integrating with CI (Basic) guide for details.