What is the easiest way to make Azure pipeline stage fail for debugging purposes

I would like to make a given stage fail to test my conditions – stage: EnvironmentDeploy condition: and(succeeded()…) is it possible to make – stage to fail purposefully? >Solution : The easiest way I can think of is adding a job with a PowerShell script, and using the throw keyword to exit the script with… Read More What is the easiest way to make Azure pipeline stage fail for debugging purposes

fatal: ambiguous argument 'HEAD^': unknown revision or path not in the working tree when using git diff

I am trying to take out git diff of a particular file in a folder using below command on azure devops pipeline: git diff –name-only HEAD^ .\dev-artifacts.properties .\dev-artifacts.properties or git diff –name-status HEAD HEAD^ or git diff –name-only dev-artifacts.properties dev-artifacts.properties After running this command, I am getting below error: fatal: ambiguous argument ‘HEAD^’: unknown revision… Read More fatal: ambiguous argument 'HEAD^': unknown revision or path not in the working tree when using git diff

How to add 10 hrs in the Get-Date in azure cli task for Azure pipeline?

I am using below and tried adding hrs without any luck. This returns time in UTC while I want the time in same format but 10 hrs ahead. – task: AzureCLI@2 name: date displayName: dateValue inputs: azureSubscription: ‘test’ scriptType: ‘pscore’ scriptLocation: ‘inlineScript’ inlineScript: | $date = $(Get-Date -Format yyyy-MM-dd’T’HH:mm:ss) echo "##vso[task.setvariable variable=date]$date" >Solution : To… Read More How to add 10 hrs in the Get-Date in azure cli task for Azure pipeline?

Pass script argument in Azure DevOps Pipeline which run a Powershell Script

Hi I have a simple Azure DevOps Pipeline trigger: – main pool: vmImage: ubuntu-latest steps: – task: AzurePowerShell@5 inputs: azureSubscription: ‘Azure-DevOps’ ScriptType: ‘FilePath’ ScriptPath: ‘az-ps-scripts/session-07/vnet/vnet.ps1’ ScriptArguments: ‘-RGNAME RunFmPp’ azurePowerShellVersion: ‘LatestVersion’ workingDirectory: ‘az-ps-scripts/session-07/vnet/’ As you can see it has a ScriptArguments: ‘-RGNAME RunFmPp’ and it runs vnet.ps1 script. But in fact, I do not know how… Read More Pass script argument in Azure DevOps Pipeline which run a Powershell Script