Azure-pipelines-agent: YAML - Powershell task error "Unexpected value 'arguments'"

Created on 10 Sep 2018  路  4Comments  路  Source: microsoft/azure-pipelines-agent

Adopted from "View YAML":
image

"arguments" is not working when build using .yml

Have you tried trouble shooting?

Yes

Agent Version and Platform

2.140.0

OS of the machine running the agent?
Windows

VSTS Type and Version

VisualStudio.com

If VisualStudio.com, what is your account name? http://account.visualstudio.com
intentionaltest.visualstudio.com

What's not working?

steps:

  • powershell: ./ 'src/Print-Log.ps1'
    arguments: '-identity foobar'
    displayName: "Print Log"

Error:
build.yml (Line: 7, Col: 3): Unexpected value 'arguments'

Most helpful comment

@fernisoites the UI is busted for export to YAML, try the following script:

  - task: powershell@2
    inputs:
      targetType: filePath
      filePath: test.ps1
      arguments: test
    displayName: 'PowerShell Script'

All 4 comments

@fernisoites the UI is busted for export to YAML, try the following script:

  - task: powershell@2
    inputs:
      targetType: filePath
      filePath: test.ps1
      arguments: test
    displayName: 'PowerShell Script'

I was facing the same issue this morning. @TingluoHuang solution did the trick for me !

We have created a new repository for all YAML related issues, please move the current issue to there.
https://github.com/Microsoft/azure-pipelines-yaml

closing since answered. if anything left to answer, see the point above about moving to azure-pipelines-yaml

Was this page helpful?
0 / 5 - 0 ratings