resources.packages.package definition

You can consume NuGet and npm GitHub packages as a resource in YAML pipelines. When specifying package resources, set the package as NuGet or npm.

packages:
- package: string # Required as first property. Alias of package artifact.
  type: string # Required. Type of the package. Ex - NuGet, NPM etc.
  connection: string # Required. Name of the connection. This connection will be used for all the communication related to this artifact.
  name: string # Required. Name of the package.
  version: string
  tag: string
  trigger: none | true # Trigger a new pipeline run when a new version of this package is available.

Definitions that reference this definition: resources.packages

Properties

package string. Required as first property.
Alias of package artifact. Acceptable values: [-_A-Za-z0-9]*.

type string. Required.
Type of the package. Ex - NuGet, NPM etc.

connection string. Required.
Name of the connection. This connection will be used for all the communication related to this artifact.

name string. Required.
Name of the package.

version string.

tag string.

trigger string.
Trigger a new pipeline run when a new version of this package is available. none | true.

Examples

In this example, there is an GitHub service connection named pat-contoso to a GitHub npm package named contoso. Learn more about GitHub packages.

resources:
  packages:
    - package: contoso
      type: npm
      connection: pat-contoso
      name: yourname/contoso 
      version: 7.130.88 
      trigger: true

pool:
  vmImage: ubuntu-latest

steps:
- getPackage: contoso 

See also