az pipelines

Manage Azure Pipelines.

This command group is a part of the azure-devops extension.

Commands

az pipelines agent

Manage agents.

az pipelines agent list

Get a list of agents in a pool.

az pipelines agent show

Show agent details.

az pipelines build

Manage builds.

az pipelines build definition

Manage build definitions.

az pipelines build definition list

List build definitions.

az pipelines build definition show

Get the details of a build definition.

az pipelines build list

List build results.

az pipelines build queue

Request (queue) a build.

az pipelines build show

Get the details of a build.

az pipelines build tag

Manage build tags.

az pipelines build tag add

Add tag(s) for a build.

az pipelines build tag delete

Delete a build tag.

az pipelines build tag list

Get tags for a build.

az pipelines create

Create a new Azure Pipeline (YAML based).

az pipelines delete

Delete a pipeline.

az pipelines folder

Manage folders for organizing pipelines.

az pipelines folder create

Create a folder.

az pipelines folder delete

Delete a folder.

az pipelines folder list

List all folders.

az pipelines folder update

Update a folder name or description.

az pipelines list

List pipelines.

az pipelines pool

Manage agent pools.

az pipelines pool list

List agent pools.

az pipelines pool show

Show agent pool details.

az pipelines queue

Manage agent queues.

az pipelines queue list

List agent queues.

az pipelines queue show

Show details of agent queue.

az pipelines release

Manage releases.

az pipelines release create

Request (create) a release.

az pipelines release definition

Manage release definitions.

az pipelines release definition list

List release definitions.

az pipelines release definition show

Get the details of a release definition.

az pipelines release list

List release results.

az pipelines release show

Get the details of a release.

az pipelines run

Queue (run) a pipeline.

az pipelines runs

Manage pipeline runs.

az pipelines runs artifact

Manage pipeline run artifacts.

az pipelines runs artifact download

Download a pipeline artifact.

az pipelines runs artifact list

List artifacts associated with a run.

az pipelines runs artifact upload

Upload a pipeline artifact.

az pipelines runs list

List the pipeline runs in a project.

az pipelines runs show

Show details of a pipeline run.

az pipelines runs tag

Manage pipeline run tags.

az pipelines runs tag add

Add tag(s) for a pipeline run.

az pipelines runs tag delete

Delete a pipeline run tag.

az pipelines runs tag list

Get tags for a pipeline run.

az pipelines show

Get the details of a pipeline.

az pipelines update

Update a pipeline.

az pipelines variable

Manage pipeline variables.

az pipelines variable create

Add a variable to a pipeline.

az pipelines variable delete

Delete a variable from pipeline.

az pipelines variable list

List the variables in a pipeline.

az pipelines variable update

Update a variable in a pipeline.

az pipelines variable-group

Manage variable groups.

az pipelines variable-group create

Create a variable group.

az pipelines variable-group delete

Delete a variable group.

az pipelines variable-group list

List variable groups.

az pipelines variable-group show

Show variable group details.

az pipelines variable-group update

Update a variable group.

az pipelines variable-group variable

Manage variables in a variable group.

az pipelines variable-group variable create

Add a variable to a variable group.

az pipelines variable-group variable delete

Delete a variable from variable group.

az pipelines variable-group variable list

List the variables in a variable group.

az pipelines variable-group variable update

Update a variable in a variable group.

az pipelines create

Create a new Azure Pipeline (YAML based).

az pipelines create --name
                    [--branch]
                    [--description]
                    [--detect {false, true}]
                    [--folder-path]
                    [--org]
                    [--project]
                    [--queue-id]
                    [--repository]
                    [--repository-type {github, tfsgit}]
                    [--service-connection]
                    [--skip-first-run {false, true}]
                    [--subscription]
                    [--yaml-path]

Examples

Create an Azure Pipeline from local checkout repository context

Repository name/url (--repository), type (--repository-type) and branch name (--branch) will be detected from the local git repository
az pipelines create --name 'ContosoBuild' --description 'Pipeline for contoso project'

Create an Azure Pipeline for a repository hosted on Github using clone url

az pipelines create --name 'ContosoBuild' --description 'Pipeline for contoso project'
--repository https://github.com/SampleOrg/SampleRepo --branch master

Create an Azure Pipeline for a repository hosted on Github organization SampleOrg, repository name SampleRepo

az pipelines create --name 'ContosoBuild' --description 'Pipeline for contoso project'
--repository SampleOrg/SampleRepoName --branch master --repository-type github

Create an Azure Pipeline for a repository hosted in a Azure Repo in the same project

az pipelines create --name 'ContosoBuild' --description 'Pipeline for contoso project'
--repository SampleRepoName --branch master --repository-type tfsgit

Create an Azure Pipeline for a repository with the pipeline yaml already checked in into the repository

Service connection required for non Azure Repos can be optionally provided in the command to run it non interatively
az pipelines create --name 'ContosoBuild' --description 'Pipeline for contoso project'
--repository https://github.com/SampleOrg/SampleRepo --branch master --yml-path azure-pipelines.yml [--service-connection SERVICE_CONNECTION]

Required Parameters

--name

Name of the new pipeline.

Optional Parameters

--branch

Branch name for which the pipeline will be configured. If omitted, it will be auto-detected from local repository.

--description

Description for the new pipeline.

--detect

Automatically detect organization.

accepted values: false, true
--folder-path

Path of the folder where the pipeline needs to be created. Default is root folder. e.g. "user1/test_pipelines".

--org --organization

Azure DevOps organization URL. You can configure the default organization using az devops configure -d organization=ORG_URL. Required if not configured as default or picked up via git config. Example: https://dev.azure.com/MyOrganizationName/.

--project -p

Name or ID of the project. You can configure the default project using az devops configure -d project=NAME_OR_ID. Required if not configured as default or picked up via git config.

--queue-id

Id of the queue in the available agent pools. Will be auto detected if not specified.

--repository

Repository for which the pipeline needs to be configured. Can be clone url of the git repository or name of the repository for a Azure Repos or Owner/RepoName in case of GitHub repository. If omitted it will be auto-detected from the remote url of local git repository. If name is mentioned instead of url, --repository-type argument is also required.

--repository-type

Type of repository. If omitted, it will be auto-detected from remote url of local repository. 'tfsgit' for Azure Repos, 'github' for GitHub repository.

accepted values: github, tfsgit
--service-connection

Id of the Service connection created for the repository for GitHub repository. Use command az devops service-endpoint -h for creating/listing service_connections. Not required for Azure Repos.

--skip-first-run --skip-run

Specify this flag to prevent the first run being triggered by the command. Command will return a pipeline if run is skipped else it will output a pipeline run.

accepted values: false, true
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yaml-path --yml-path

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

az pipelines delete

Delete a pipeline.

az pipelines delete --id
                    [--detect {false, true}]
                    [--org]
                    [--project]
                    [--subscription]
                    [--yes]

Required Parameters

--id

ID of the pipeline.

Optional Parameters

--detect

Automatically detect organization.

accepted values: false, true
--org --organization

Azure DevOps organization URL. You can configure the default organization using az devops configure -d organization=ORG_URL. Required if not configured as default or picked up via git config. Example: https://dev.azure.com/MyOrganizationName/.

--project -p

Name or ID of the project. You can configure the default project using az devops configure -d project=NAME_OR_ID. Required if not configured as default or picked up via git config.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

az pipelines list

List pipelines.

az pipelines list [--detect {false, true}]
                  [--folder-path]
                  [--name]
                  [--org]
                  [--project]
                  [--query-examples]
                  [--query-order {ModifiedAsc, ModifiedDesc, NameAsc, NameDesc, None}]
                  [--repository]
                  [--repository-type {bitbucket, git, github, githubenterprise, svn, tfsgit, tfsversioncontrol}]
                  [--subscription]
                  [--top]

Optional Parameters

--detect

Automatically detect organization.

accepted values: false, true
--folder-path

If specified, filters to definitions under this folder.

--name

Limit results to pipelines with this name or starting with this name. Examples: "FabCI" or "Fab*".

--org --organization

Azure DevOps organization URL. You can configure the default organization using az devops configure -d organization=ORG_URL. Required if not configured as default or picked up via git config. Example: https://dev.azure.com/MyOrganizationName/.

--project -p

Name or ID of the project. You can configure the default project using az devops configure -d project=NAME_OR_ID. Required if not configured as default or picked up via git config.

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--query-order

Order of the results.

accepted values: ModifiedAsc, ModifiedDesc, NameAsc, NameDesc, None
--repository

Limit results to pipelines associated with this repository.

--repository-type

Limit results to pipelines associated with this repository type. It is mandatory to pass 'repository' argument along with this argument.

accepted values: bitbucket, git, github, githubenterprise, svn, tfsgit, tfsversioncontrol
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--top

Maximum number of pipelines to list.

az pipelines run

Queue (run) a pipeline.

az pipelines run [--branch]
                 [--commit-id]
                 [--detect {false, true}]
                 [--folder-path]
                 [--id]
                 [--name]
                 [--open]
                 [--org]
                 [--project]
                 [--subscription]
                 [--variables]

Optional Parameters

--branch

Name of the branch on which the pipeline run is to be queued. Example: refs/heads/master or master or refs/pull/1/merge.

--commit-id

Commit-id on which the pipeline run is to be queued.

--detect

Automatically detect organization.

accepted values: false, true
--folder-path

Folder path of pipeline. Default is root level folder.

--id

ID of the pipeline to queue. Required if --name is not supplied.

--name

Name of the pipeline to queue. Ignored if --id is supplied.

--open

Open the pipeline results page in your web browser.

--org --organization

Azure DevOps organization URL. You can configure the default organization using az devops configure -d organization=ORG_URL. Required if not configured as default or picked up via git config. Example: https://dev.azure.com/MyOrganizationName/.

--project -p

Name or ID of the project. You can configure the default project using az devops configure -d project=NAME_OR_ID. Required if not configured as default or picked up via git config.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--variables

Space separated "name=value" pairs for the variables you would like to set.

az pipelines show

Get the details of a pipeline.

az pipelines show [--detect {false, true}]
                  [--folder-path]
                  [--id]
                  [--name]
                  [--open]
                  [--org]
                  [--project]
                  [--query-examples]
                  [--subscription]

Optional Parameters

--detect

Automatically detect organization.

accepted values: false, true
--folder-path

Folder path of pipeline. Default is root level folder.

--id

ID of the pipeline.

--name

Name of the pipeline. Ignored if --id is supplied.

--open

Open the pipeline summary page in your web browser.

--org --organization

Azure DevOps organization URL. You can configure the default organization using az devops configure -d organization=ORG_URL. Required if not configured as default or picked up via git config. Example: https://dev.azure.com/MyOrganizationName/.

--project -p

Name or ID of the project. You can configure the default project using az devops configure -d project=NAME_OR_ID. Required if not configured as default or picked up via git config.

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az pipelines update

Update a pipeline.

az pipelines update [--branch]
                    [--description]
                    [--detect {false, true}]
                    [--id]
                    [--name]
                    [--new-folder-path]
                    [--new-name]
                    [--org]
                    [--project]
                    [--queue-id]
                    [--subscription]
                    [--yaml-path]

Optional Parameters

--branch

Branch name for which the pipeline will be configured.

--description

New description for the pipeline.

--detect

Automatically detect organization.

accepted values: false, true
--id

Id of the pipeline to update.

--name

Name of the pipeline to update.

--new-folder-path

New full path of the folder to move the pipeline to. e.g. "user1/production_pipelines".

--new-name

New updated name of the pipeline.

--org --organization

Azure DevOps organization URL. You can configure the default organization using az devops configure -d organization=ORG_URL. Required if not configured as default or picked up via git config. Example: https://dev.azure.com/MyOrganizationName/.

--project -p

Name or ID of the project. You can configure the default project using az devops configure -d project=NAME_OR_ID. Required if not configured as default or picked up via git config.

--queue-id

Queue id of the agent pool where the pipeline needs to run.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yaml-path --yml-path

Path of the pipelines yaml file in the repo.