From d4d4278e60be04a59403a47e02ee920bd0651eef Mon Sep 17 00:00:00 2001 From: Maxim <82579915+MaximSieb@users.noreply.github.com> Date: Wed, 21 May 2025 16:33:26 +0200 Subject: [PATCH 1/2] Escape backslashes --- .../PrePostDeploymentScript.Ver2.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SamplesV2/ContinuousIntegrationAndDelivery/PrePostDeploymentScript.Ver2.ps1 b/SamplesV2/ContinuousIntegrationAndDelivery/PrePostDeploymentScript.Ver2.ps1 index 0227a49f..6b9dd9ab 100644 --- a/SamplesV2/ContinuousIntegrationAndDelivery/PrePostDeploymentScript.Ver2.ps1 +++ b/SamplesV2/ContinuousIntegrationAndDelivery/PrePostDeploymentScript.Ver2.ps1 @@ -1,3 +1,4 @@ +### Microsoft provided script https://github.com/Azure/Azure-DataFactory/blob/main/SamplesV2/ContinuousIntegrationAndDelivery/PrePostDeploymentScript.Ver2.ps1 <# .SYNOPSIS Stop/ start triggers during release process (CICD) @@ -191,7 +192,8 @@ function Compare-TriggerPayload { $triggerTemplateJson = ConvertTo-Json -InputObject $triggerInTemplate.properties -Depth $MaxJsonDepth -EscapeHandling Default $updatedTemplateJson = Update-TriggerTemplate -templateJson $triggerTemplateJson -templateParameters $templateParameters $serializerOptions = New-Object System.Text.Json.JsonSerializerOptions -Property @{ PropertyNameCaseInsensitive = $True } - $payloadPSObject = $updatedTemplateJson | ConvertFrom-Json -Depth $MaxJsonDepth + $updatedTemplateJsonReplaced = $updatedTemplateJson.Replace('\', '\\') + $payloadPSObject = $updatedTemplateJsonReplaced | ConvertFrom-Json -Depth $MaxJsonDepth if ($triggerDeployed.Properties.RuntimeState -ne $payloadPSObject.runtimeState) { Write-Host "Change detected in '$($triggerDeployed.Name)' trigger payload - runtimeState changed" return $True; From 9a9748f73cbcff621cea4e0bf67dc97f60608979 Mon Sep 17 00:00:00 2001 From: Maxim <82579915+MaximSieb@users.noreply.github.com> Date: Wed, 21 May 2025 16:35:48 +0200 Subject: [PATCH 2/2] Remove line --- .../PrePostDeploymentScript.Ver2.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/SamplesV2/ContinuousIntegrationAndDelivery/PrePostDeploymentScript.Ver2.ps1 b/SamplesV2/ContinuousIntegrationAndDelivery/PrePostDeploymentScript.Ver2.ps1 index 6b9dd9ab..3370466b 100644 --- a/SamplesV2/ContinuousIntegrationAndDelivery/PrePostDeploymentScript.Ver2.ps1 +++ b/SamplesV2/ContinuousIntegrationAndDelivery/PrePostDeploymentScript.Ver2.ps1 @@ -1,4 +1,3 @@ -### Microsoft provided script https://github.com/Azure/Azure-DataFactory/blob/main/SamplesV2/ContinuousIntegrationAndDelivery/PrePostDeploymentScript.Ver2.ps1 <# .SYNOPSIS Stop/ start triggers during release process (CICD)