I've a script which works locally fine and while running the script i'm passing 2 arguments in the script and its work perfectly fine, Here's how i'm running the bash script locally:
./changeDB_connection.sh "fdevtestcuskv04" "test"
But, I want to do it through azure devops pipeline and for that I've a pipeline task in which I'm calling a bash script with script arguments but it failed with this error message: ##[error]Bash exited with code '1'
Here's the pipeline task:
- task: Bash@3
displayName: 'Update Mongo Connection String'
condition: and(succeeded(), eq('${{ parameters.UpdateDBstr }}', 'true'))
inputs:
azureSubscription: $(azureSubscription)
workingDirectory: '$(System.DefaultWorkingDirectory)/Terraform/templates'
targetType: 'filePath'
failOnStderr: true
filePath: "$(System.DefaultWorkingDirectory)/Terraform/Terraform-Scripts/changeDB_connection.sh"
ScriptArguments: '-keyVaultName $(kvname) -Stringintials $(strinitial)'
let me know what am i doing wrong.


ScriptArgumentsshould be a list, though?ScriptArgumentsat all but this could be the normal state of affairs at Microsoft, of course (you are in a maze of twisty documentation, none of which is accurate, and all of which contradict each other).