resources.repositories.repository definition
The repository
keyword lets you specify an external repository.
repositories:
- repository: string # Required as first property. ID of the external repository. ([-_A-Za-z0-9]*)
endpoint: string # ID of the service endpoint connecting to this repository.
name: string # string # repository name (format depends on `type`).
type: string # Type of repository: `git`, `github`, `githubenterprise`, and `bitbucket`.
ref: string # ref name to use; defaults to 'refs/heads/main'.
Properties that use this definition: resources.repositories
Properties
repository
string
Required as first parameter. ID of the external repository. Acceptable values: [_A-Za-z0-9]*endpoint
string
ID of the service endpoint connecting to this repository.name
string
string # repository name (format depends on `type`).type
string
Type of repository: `git`, `github`, `githubenterprise`, and `bitbucket`.ref
string
ref name to use; defaults to 'refs/heads/main'.repositories:
- repository: string # Required as first property. ID of the external repository. ([-_A-Za-z0-9]*)
endpoint: string # ID of the service endpoint connecting to this repository.
name: string # string # repository name (format depends on `type`).
type: string # Type of repository: `git`, `github`, `githubenterprise`, and `bitbucket`.
ref: string # ref name to use; defaults to 'refs/heads/main'.
Properties that use this definition: resources.repositories
Properties
repository
string
Required as first parameter. ID of the external repository. Acceptable values: [_A-Za-z0-9]*endpoint
string
ID of the service endpoint connecting to this repository.name
string
string # repository name (format depends on `type`).type
string
Type of repository: `git`, `github`, `githubenterprise`, and `bitbucket`.ref
string
ref name to use; defaults to 'refs/heads/main'.repositories:
- repository: string # Required as first property. ID of the external repository. ([-_A-Za-z0-9]*)
endpoint: string # ID of the service endpoint connecting to this repository.
trigger: trigger # CI trigger for this repository, no CI trigger if skipped (only works for Azure Repos).
name: string # string # repository name (format depends on `type`).
type: string # Type of repository: `git`, `github`, `githubenterprise`, and `bitbucket`.
ref: string # ref name to use; defaults to 'refs/heads/main'.
Properties that use this definition: resources.repositories
Properties
repository
string
Required as first parameter. ID of the external repository. Acceptable values: [_A-Za-z0-9]*endpoint
string
ID of the service endpoint connecting to this repository.trigger
name
string
string # repository name (format depends on `type`).type
string
Type of repository: `git`, `github`, `githubenterprise`, and `bitbucket`.ref
string
ref name to use; defaults to 'refs/heads/main'.repositories:
- repository: string # Required as first property. ID of the external repository. ([-_A-Za-z0-9]*)
endpoint: string # ID of the service endpoint connecting to this repository.
trigger: trigger # CI trigger for this repository, no CI trigger if skipped (only works for Azure Repos).
name: string # string # repository name (format depends on `type`).
type: string # Type of repository: `git`, `github`, `githubenterprise`, and `bitbucket`.
ref: string # ref name to use; defaults to 'refs/heads/main'.
Properties that use this definition: resources.repositories
Properties
repository
string
Required as first parameter. ID of the external repository. Acceptable values: [_A-Za-z0-9]*endpoint
string
ID of the service endpoint connecting to this repository.trigger
name
string
string # repository name (format depends on `type`).type
string
Type of repository: `git`, `github`, `githubenterprise`, and `bitbucket`.ref
string
ref name to use; defaults to 'refs/heads/main'.repositories:
- repository: string # Required as first property. ID of the external repository. ([-_A-Za-z0-9]*)
endpoint: string # ID of the service endpoint connecting to this repository.
trigger: trigger # CI trigger for this repository, no CI trigger if skipped (only works for Azure Repos).
name: string # string # repository name (format depends on `type`).
type: string # Type of repository: `git`, `github`, `githubenterprise`, and `bitbucket`.
ref: string # ref name to use; defaults to 'refs/heads/main'.
Properties that use this definition: resources.repositories
Properties
repository
string
Required as first parameter. ID of the external repository. Acceptable values: [-_A-Za-z0-9]*endpoint
string
ID of the service endpoint connecting to this repository.trigger
name
string
string # repository name (format depends on `type`).type
string
Type of repository: `git`, `github`, `githubenterprise`, and `bitbucket`.ref
string
ref name to use; defaults to 'refs/heads/main'.Remarks
Important
Repository resource triggers are supported for Azure Repos Git repositories only. For more information on trigger
syntax, including wildcard support for branches and tags, see trigger definition and Build Azure Repos Git or TFS Git repositories.
If your pipeline has templates in another repository, you must let the system know about that repository.
If your pipeline has templates in another repository, or if you want to use multi-repo checkout with a repository that requires a service connection, you must let the system know about that repository.
Types
Pipelines support the following values for the repository type: git
, github
, and bitbucket
.
The git
type refers to Azure Repos Git repos.
If you specify
type: git
, thename
value refers to the name of an Azure Repos Git repository.- If your pipeline is in the same Azure DevOps project as the repository, for example a repository named
tools
, you reference it usingname: tools
. - If your pipeline is in the same Azure DevOps organization as the repository, but in a different Azure DevOps project, for example a project named
ToolsProject
, you must qualify the repository name with the project name:name: ToolsProject/tools
.
- If your pipeline is in the same Azure DevOps project as the repository, for example a repository named
If you specify
type: github
, thename
value is the full name of the GitHub repo and includes the user or organization. An example isname: Microsoft/vscode
. GitHub repos require a GitHub service connection for authorization.If you specify
type: bitbucket
, thename
value is the full name of the Bitbucket Cloud repo and includes the user or organization. An example isname: MyBitbucket/vscode
. Bitbucket Cloud repos require a Bitbucket Cloud service connection for authorization.
For more information about these types, see Check out multiple repositories in your pipeline - Repository resource definition.
Examples
resources:
repositories:
- repository: common
type: github
name: Contoso/CommonTools
endpoint: MyContosoServiceConnection
See also
Feedback
Feedback senden und anzeigen für