Map resources for optimization
After reviewing open optimizations, you can enable optimization by mapping the relevant resources to their version-controlled source files in GitHub. Mapping ensures that Perforce Unified Compliance can locate and update the correct files for optimization.
After mapping, a resource is optimized via automated pull requests unless the mapping changes or the optimization is specifically excluded, for example a higher-risk optimization that requires manual review.
For an overview of how resource mapping works, see Core concepts: Resource mapping.
Before you can map resources, Perforce Unified Compliance must be integrated with your GitHub repositories. If there are issues with this integration, contact your administrator.
To map resources for optimization, complete the following steps:
Step 1: Select the optimizations
-
In the Optimizations window, use the checkboxes to select the open optimizations for which you want to map resources.
A banner at the top of the screen shows the number of optimizations selected. You can click the banner to view a focused list of your selections. Selections remain active during your current session, or until you manually clear them.
Step 2: Download the mapping template
When you have selected one or more optimizations, you can prepare them for mapping:
-
Click Download mapping template. You can find the button in the main Optimizations window or the focused view of your selections.
A mapping template is generated and saved locally. This is a YAML file containing the relevant resources.
For a description of this file, and how it is used, see Configure the mapping file.
Step 3: Share the mapping template with your DevOps team
Share the mapping template with your DevOps team using your organization's internal channels.
Your DevOps team must:
-
Locate the corresponding source files in GitHub.
-
For each resource, add the correct GitHub branch and files.
-
Save the file with the name .repo_remediation.
-
Commit the completed
.repo_remediationfile to the root of the default branch of the relevant GitHub repository.
See Configure the mapping file.
Each GitHub repo can have only one .repo_remediation file. If the template was split into multiple files to be populated with mappings, the populated files must be recombined into a single file named .repo_remediation before committing.
The .repo_remediation file must follow standard YAML formatting rules.