You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Learn how to enforce compliance policies on your Azure resources before and after deployment with Azure Pipelines. Azure Pipelines lets you build, test, and deploy with continuous integration (CI) and continuous delivery (CD) using [Azure DevOps](/azure/devops/). One scenario for adding Azure Policy to a pipeline is when you want to ensure that resources are deployed only to authorized regions and are configured to send diagnostics logs to Azure Log Analytics.
14
+
Learn how to enforce compliance policies on your Azure resources before and after deployment with Azure Pipelines. Azure Pipelines lets you build, test, and deploy with continuous integration (CI) and continuous delivery (CD) using [Azure DevOps](/azure/devops/). One scenario for adding Azure Policy to a pipeline is when you want to ensure that resources are deployed only to authorized regions and are configured to send diagnostics logs to Azure Log Analytics.
15
15
16
-
You'll need a [classic pipeline](/azure/devops/pipelines/release/define-multistage-release-process)to take advantage of Azure Policy.
16
+
You can use either the [classic pipeline](/azure/devops/pipelines/release/define-multistage-release-process)or [YAML pipeline](/azure/devops/pipelines/get-started/yaml-pipeline-editor?view=azure-devops) processes to implement Azure Policy in your CI/CD pipelines.
17
17
18
18
For more information, see [What is Azure Pipelines?](/azure/devops/pipelines/get-started/what-is-azure-pipelines)
19
-
and [Create your first pipeline](/azure/devops/pipelines/create-first-pipeline).
19
+
and [Create your first pipeline](/azure/devops/pipelines/create-first-pipeline).
20
20
## Prepare
21
21
22
22
1. Create an [Azure Policy](./create-and-manage.md) in the Azure portal.
@@ -30,10 +30,12 @@ and [Create your first pipeline](/azure/devops/pipelines/create-first-pipeline).
30
30
31
31

32
32
33
+
If you're using a YAML pipeline definition, then use the [AzurePolicyCheckGate@0](/azure/devops/pipelines/tasks/reference/azure-policy-check-gate-v0) Azure Pipelines task.
34
+
33
35
## Validate for any violation(s) during a release
34
36
35
37
> [!NOTE]
36
-
> Use the [AzurePolicyCheckGate](/azure/devops/pipelines/tasks/deploy/azure-policy) task to check for policy compliance in YAML. This task can only be used as a gate and not in a build or a release pipeline.
38
+
> Use the [AzurePolicyCheckGate](/azure/devops/pipelines/tasks/deploy/azure-policy) task to check for policy compliance in YAML. This task can only be used as a gate and not in a build or a release pipeline.
0 commit comments