1
votes

I don't know if is already released az devops extension to create pipeline release with AZ CLI. There are post relating to 1y ago. I found documentation here but I can't understant how to create various stage of release pipeline.

https://docs.microsoft.com/en-us/cli/azure/ext/azure-devops/pipelines/release?view=azure-cli-latest#ext-azure-devops-az-pipelines-release-create

Someone has already created release pipeline with yaml and tell me how please? Or just post some command to import into Azure-DevOps project?

1

1 Answers

0
votes

For this issue , right now there is no way to automate the creation of classic release definition. You will need to create the definition and then you can queue a Release run using az pipelines release create command.

The role of az pipelines release create command is to kick off a new release for an existing release pipeline, not to create a new release pipeline.

You can refer to this issue on github about this.

So as a workaround , it is possible to automate the new yaml pipeline definitions with az pipelines create command which can constitute both build (CI) and release (CD).

First you can create a yaml file(e.g. azure-pipelines.yml) in the repo and set the definition for both CI and CD pipelines in the yaml file. YAML schema reference can give you guidance.

Then you can create an Azure Pipeline for a repository with the pipeline yaml already checked in into the repository via az pipeline create command. Specify --yaml-path in the command.

--yaml-path --yml-path :

Path of the pipelines yaml file in the repo (if yaml is already present in the repo).