Skip to content

[BUG]: Shelveset name cannot be set in pipeline run CLI #21207

@luchua-bc

Description

@luchua-bc

New issue checklist

Task name

az pipelines run

Task version

No response

Issue Description

When running a DevOps pipeline with a TFVC repo using DevOps UI, "Shelveset name" can be specified.

Image

However, this option with "az pipelines run" CLI doesn't work.

az pipelines run --org "https://dev.azure.com/$ORGANIZATION"  --project "$PROJECT" --name "$PIPELINE_NAME" --variables shelvesetName="xxx"

I tried the --parameters option and the name shelveset but it doesn't help either.

This is important for us to automate pipeline runs. Please help to investigate. Thanks.

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Windows 2025

Relevant log output

Expect the following in pipeline log as what is shown when running with the UI. 

  "sourceBranch": "<my_shelve_name>;<my_email>"


But it's not shown in pipeline run history.

Full task logs with system.debug enabled

No response

Repro steps

steps:
- powershell: | 
      $shelveset = $env:Build_SourceTfvcShelveset
       Write-Host "Shelveset name is $shelveset"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions