Skip to content

Commit 7120f9a

Browse files
Merge pull request #222638 from nayef-yassin/patch-40
Update ci-cd-custom-deploy.md
2 parents dde9407 + 1a44dd7 commit 7120f9a

File tree

1 file changed

+20
-11
lines changed

1 file changed

+20
-11
lines changed

articles/sentinel/ci-cd-custom-deploy.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,23 @@ For more information, see the [Azure DevOps documentation](/azure/devops/pipelin
156156
> In both GitHub and Azure DevOps, make sure that you keep the trigger path and deployment path directories consistent.
157157
>
158158
159+
## Scale your deployments with parameter files
160+
161+
Rather than passing parameters as inline values in your content files, you can [use a JSON file that contains the parameter values](../azure-resource-manager/templates/parameter-files.md). You can then map those parameter JSON files to their associated Sentinel content files to better scale your deployments across different workspaces. There are a number of ways to map parameter files to Sentinel files, and the repositories deployment pipeline considers them in the following order:
162+
163+
:::image type="content" source="media/ci-cd-custom-deploy/deploy-parameter-file-precedence.svg" alt-text="A diagram showing the precedence of parameter file mappings.":::
164+
165+
1. Is there a mapping in the sentinel-deployment.config? [Customize your connection configuration](ci-cd-custom-deploy.md#customize-your-connection-configuration) to learn more.
166+
1. Is there a workspace-mapped parameter file? This would be a parameter file in the same directory as the content files that ends with .parameters-<WorkspaceID>.json
167+
1. Is there a default parameter file? This would be any parameter file in the same directory as the content files that ends with .parameters.json
168+
169+
It is encouraged to map your parameter files through through the configuration file or by specifying the workspace ID in the file name to avoid clashes in scenarios with multiple deployments.
170+
171+
> [!IMPORTANT]
172+
> Once a parameter file match is determined based on the above mapping precedence, the pipeline will ignore any remaining mappings.
173+
>
174+
175+
Modifying the mapped parameter file listed in the sentinel-deployment.config will trigger the deployment of its paired content file. Adding or modifying a *.parameters-\<workspaceID\>.json* file or *.parameters.json* file will also trigger a deployment of the paired content file(s) along with the newly modified parameters, unless a higher precedence parameter mappings is in place. Other content files won't be deployed as long as the smart deployments feature is still enabled in the workflow/pipeline definition file.
159176
160177
## Customize your connection configuration
161178
@@ -203,19 +220,11 @@ Here's an example of the entire contents of a valid *sentinel-deployment.config*
203220

204221
Add full path names to the `"prioritizedcontentfiles":` section. Wildcard matching is not supported at this time.
205222

206-
- **To exclude content files**, modify the `"excludecontentfiles":` section with full path names of individual .json deployment files.
223+
- **To exclude content files**, modify the `"excludecontentfiles":` section with full path names of individual .json content files.
207224

208225
- **To map parameters**:
209226

210-
The deployment script will accept three methods to map parameters. The precedence is determined for each included .json deployment file in your repository as follows:
211-
212-
:::image type="content" source="media/ci-cd-custom-deploy/deploy-parameter-file-precedence.svg" alt-text="A diagram showing the precedence of parameter file mappings.":::
213-
214-
1. Is there a mapping in the sentinel-deployment.config?
215-
1. Is there a workspace parameter file?
216-
1. Is there a default parameter file?
217-
218-
Modifying the mapped parameter file listed in the sentinel-deployment.config will trigger the deployment of its paired content file. Adding or modifying a *.parameters-\<workspaceID\>.json* file or *.parameters.json* file triggers a deployment of that corresponding content file along with the newly modified parameters, unless a higher precedence parameter mappings is in place. Other content files won't be deployed if the smart deployments feature is still enabled.
227+
The deployment script will accept three methods of mapping parameters as described in [Scale your deployments with parameter files](ci-cd-custom-deploy.md#scale-your-deployments-with-parameter-files). Mapping parameters through the sentinel-deployment.config takes the highest precedence and will guarantee that a given parameter file will be mapped to its associated content files. Simply modify the `"parameterfilemappings":` section with your target connection's workspace ID and full path names of individual .json files.
219228

220229

221230
## Next steps
@@ -226,4 +235,4 @@ For more information, see:
226235

227236
- [Sentinel CICD repositories sample](https://github.com/SentinelCICD/RepositoriesSampleContent)
228237
- [Create Resource Manager parameter file](../azure-resource-manager/templates/parameter-files.md)
229-
- [Parameters in ARM templates](../azure-resource-manager/templates/parameters.md)
238+
- [Parameters in ARM templates](../azure-resource-manager/templates/parameters.md)

0 commit comments

Comments
 (0)