az pipelines

Manage Azure Pipelines.

Commands

az pipelines agent (PREVIEW) Manage agents.
az pipelines agent list (PREVIEW) Get a list of agents in a pool.
az pipelines agent show (PREVIEW) 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 (PREVIEW) Create a new Azure Pipeline (YAML based).
az pipelines delete (PREVIEW) Delete a pipeline.
az pipelines list (PREVIEW) List pipelines.
az pipelines pool (PREVIEW) Manage agent pools.
az pipelines pool list (PREVIEW) List agent pools.
az pipelines pool show (PREVIEW) Show agent pool details.
az pipelines queue (PREVIEW) Manage agent queues.
az pipelines queue list (PREVIEW) List agent queues.
az pipelines queue show (PREVIEW) 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 (PREVIEW) Queue (run) a pipeline.
az pipelines runs (PREVIEW) Manage pipeline runs.
az pipelines runs artifact (PREVIEW) Manage pipeline run artifacts.
az pipelines runs artifact download (PREVIEW) Download a pipeline artifact.
az pipelines runs artifact list (PREVIEW) List artifacts associated with a run.
az pipelines runs artifact upload (PREVIEW) Upload a pipeline artifact.
az pipelines runs list (PREVIEW) List the pipeline runs in a project.
az pipelines runs show (PREVIEW) Show details of a pipeline run.
az pipelines runs tag (PREVIEW) Manage pipeline run tags.
az pipelines runs tag add (PREVIEW) Add tag(s) for a pipeline run.
az pipelines runs tag delete (PREVIEW) Delete a pipeline run tag.
az pipelines runs tag list (PREVIEW) Get tags for a pipeline run.
az pipelines show (PREVIEW) Get the details of a pipeline.
az pipelines update (PREVIEW) Update a pipeline.
az pipelines variable (PREVIEW) Manage pipeline variables.
az pipelines variable create (Preview) Add a variable to a pipeline.
az pipelines variable delete (Preview) Delete a variable from pipeline.
az pipelines variable list (Preview) List the variables in a pipeline.
az pipelines variable update (Preview) Update a variable in a pipeline.
az pipelines variable-group (PREVIEW) Manage variable groups.
az pipelines variable-group create (Preview) Create a variable group.
az pipelines variable-group delete (Preview) Delete a variable group.
az pipelines variable-group list (Preview) List variable groups.
az pipelines variable-group show (Preview) Show variable group details.
az pipelines variable-group update (Preview) Update a variable group.
az pipelines variable-group variable (PREVIEW) Manage variables in a variable group.
az pipelines variable-group variable create (Preview) Add a variable to a variable group.
az pipelines variable-group variable delete (Preview) Delete a variable from variable group.
az pipelines variable-group variable list (Preview) List the variables in a variable group.
az pipelines variable-group variable update (Preview) Update a variable in a variable group.

az pipelines create

(PREVIEW) Create a new Azure Pipeline (YAML based).

az pipelines create --name
[--branch]
[--description]
[--detect {false, true}]
[--org]
[--project]
[--queue-id]
[--repository]
[--repository-type {github, tfsgit}]
[--service-connection]
[--skip-first-run {false, true}]
[--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
--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
--yaml-path --yml-path

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

az pipelines delete

(PREVIEW) Delete a pipeline.

az pipelines delete --id
[--detect {false, true}]
[--org]
[--project]
[--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.

--yes -y

Do not prompt for confirmation.

az pipelines list

(PREVIEW) List pipelines.

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

Optional Parameters

--detect

Automatically detect organization.

accepted values: false, true
--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-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
--top

Maximum number of pipelines to list.

az pipelines run

(PREVIEW) Queue (run) a pipeline.

az pipelines run [--branch]
[--commit-id]
[--detect {false, true}]
[--id]
[--name]
[--open]
[--org]
[--project]
[--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
--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.

--variables

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

az pipelines show

(PREVIEW) Get the details of a pipeline.

az pipelines show [--detect {false, true}]
[--id]
[--name]
[--open]
[--org]
[--project]

Optional Parameters

--detect

Automatically detect organization.

accepted values: false, true
--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.

az pipelines update

(PREVIEW) Update a pipeline.

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

Optional Parameters

--branch

Branch name for which the pipeline will be configured.

--description

Description to be updated 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-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.

--yaml-path --yml-path

Path of the pipelines yaml file in the repo.