I have created a yaml script to build pipelines for Azure Data Factory with Azure DevOps.
During the Powershell Script job the pipeline fails with the error:
##[error]PowerShell exited with code ‘1’.
The full error is as follows:
The yaml script is a follows:
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- adf_publish
pool:
vmImage: ubuntu-latest
steps:
- script: |
tree $(System.DefaultWorkingDirectory)
displayName: Show file structure of System.DefaultWorkingDirectory during a build
- task: AzurePowerShell@5
inputs:
azureSubscription: 'NewConnectionName'
ScriptType: 'FilePath'
ScriptPath: '$(System.DefaultWorkingDirectory)/caplogic-warehouse-dev-df/PrePostDeploymentScript.ps1'
- task: AzurePowerShell@5
inputs:
azureSubscription: 'NewConnectionName'
ScriptType: 'FilePath'
ScriptPath: '$(System.DefaultWorkingDirectory)/caplogic-warehouse-dev-df/PrePostDeploymentScript.ps1'
ScriptArguments: '-armTemplate "$(System.DefaultWorkingDirectory)/caplogic-warehouse-dev-df/ARMTemplateForFactory.json" -ResourceGroupName $(ResourceGroup) -DataFactoryName $(DataFactory) -predeployment $true -deleteDeployment $false'
azurePowerShellVersion: 'LatestVersion'
Can someone let me know what could cause the Powershell script to fail with code ‘1’?