Azure / Azure/azure-devops-cli-extension

[Feature Request] `az pipelines release create` Expose an parameter to specify instanceReference.name

Open
#1,257 3 comments 1 reaction 0 assignees View on GitHub
Feature
Dominant language
Python
Stars
682
Forks
278
Avg merge
3d 23h
Merged PRs (30d)
3

Description

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I cannot create a project..

Issued code:
https://github.com/Azure/azure-devops-cli-extension/blob/2bd72a1d76cc00a84b348f573e9f8e14dfb42c5b/azure-devops/azext_devops/dev/pipelines/release.py#L47

Currently, we can only specify `version_id` though `--artifact-metadata-list` but we cannot specify name. And the payload looks like below:

```
{"artifacts": [{"alias": "SomeAlias", "instanceReference": {"id": "1234567"}}], "definitionId": 123}
```

This leads to ugly release run name - usually we have a build number in the release name but the release triggerred from CLI doesn't have such build number. Snapshot is as below. The first release run is submitted through portal and its name contains a build number (the redacted part). However, the second release run sumitted through `az pipelins release create` doesn't contain build number part.

![image](https://user-images.githubusercontent.com/7024383/156719243-2cd71a53-3e28-47ad-86f7-d23fad7ac96d.png)

Our release pipeline has a "Release name format" setting as below:
```
New Release Train -$(Build.BuildNumber)-$(rev:r)
```

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
e.g. If you want a new command to be added, what would it do?

The command should expose some parameter that allows me to pass `instanceReference.name` so that the following payload can be constructed:

```
{"artifacts": [{"alias": "SomeAlias", "instanceReference": {"id": "1234567","name":"someBuildNumber"}}], "definitionId": 123}
```

**Additional context**
Add any other context or screenshots about the feature request here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.