4

I'm trying to run a pipeline using AZ CLI. I have a simple pipeline:

parameters:
- name: initials
  displayName: Initials
  type: string

trigger:
- master

pool:
  vmImage: ubuntu-latest

steps:
- script: echo ${{ parameters.initials }}
  displayName: Test

And I try to run it using:

az pipelines run --organization <my org> --project <my project> --name <pipeline> --branch <my branch> --debug --variables initials=maim

Then I end up with an error:

ValidationResults":[{“result”:“error”,“message”:"A value for the parameter must be provided

Which is a bit odd since you can tell from the debug that the parameter is being set:

Debug output

1 Answer 1

8

It because you need to send parameters and you send variables.

According to this GitHub issue it fixed in a new version:

  1. Need to remove old package first:
az extension remove -n azure-devops
az extension add --source https://github.com/roshan-sy/release-repo/releases/download/1/azure_devops-0.23.0-py2.py3-none-any.whl
  1. Initial test looks good:
az login
az pipelines run --help
...
--parameters : Space separated "name=value" pairs for the parameters you would like to set.
...
az pipelines run --name "{pipeline.name}" --parameters Param1={Value1}
2
  • Thank you so much! I've been struggling with this for hours! Hoping for a new release soon
    – Matt Immer
    Commented Jan 19, 2022 at 8:33
  • Yea, don't know for what they waiting... but this workaround works :) Commented Jan 19, 2022 at 8:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.