Azure-devops-docs: packages is not an option resources

Created on 8 Apr 2020  Â·  12Comments  Â·  Source: MicrosoftDocs/azure-devops-docs

it's confusing to see documentation about 'packages', while it's not a valid option


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri1 devops-cicd-procestech devopprod doc-bug

Most helpful comment

@juliakm Thanks for the update.

Do you have any other examples of using a universal package and if the feed is within the same DevOps project what sort of connection needs to be set up?

All 12 comments

@gintuoklis -- Gintautas, thank you for your feedback.

@juliakm -- Julia, if this assertion is correct, I can remove all references to "packages" from that article for you.

@gintuoklis I'm reaching out to the product team to get more information on this.

Blog post released 4/28 once again mentions packages as a valid resource option.
https://devblogs.microsoft.com/devops/announcing-general-availability-of-azure-pipelines-yaml-cd/

This is actually a pretty big ask, so I'm holding my breath it was perhaps stealth rolled out.

dirty update:

resources:
packages:
- package: coolname
<...>

This actually appears to work ... except I cant seem to guess what params it wants. This wqould be really _REALLY_ cool to know

@gintuoklis and @Justin-DynamicD This feature is being deployed now and may not be available for your organization yet. I'll get more info on the required parameters.

hi @juliakm,
I found examples within your design documents

There you have parameter Connection
connection: string # service connection for your package repo.

It is unclear how to use it, in case you want to download universal package hosted within the same project. Is 'universal packages' in scope for resources at all? Could you please make inquiries about it as well?

Hi @Justin-DynamicD

Not the best and especially in this case, but sometimes it can help.
You can find the Yaml schema under https://dev.azure.com/{OrgName}/_apis/distributedtask/yamlschema?api-version=5.1

There I found these for packageResource.

"packageResource": {
      "type": "object",
      "properties": {
        "package": {
          "description": "Alias of package artifact",
          "$ref": "#/definitions/referenceName"
        },
        "type": {
          "description": "Type of the package. Ex - NuGet, NPM etc.",
          "$ref": "#/definitions/nonEmptyString"
        },
        "connection": {
          "description": "Name of the connection. This connection will be used for all the communication related to this artifact.",
          "$ref": "#/definitions/nonEmptyString"
        },
        "name": {
          "description": "Name of the package",
          "$ref": "#/definitions/nonEmptyString"
        },
        "version": {
          "$ref": "#/definitions/nonEmptyString"
        },
        "tag": {
          "$ref": "#/definitions/nonEmptyString"
        },
        "trigger": {
          "description": "Trigger a new pipeline run when a new version of this package is available.",
          "$ref": "#/definitions/packageResourceTrigger"
        }
      },
      "additionalProperties": false,
      "firstProperty": [
        "package"
      ],
      "required": [
        "package",
        "type",
        "connection",
        "name"
      ]
    }
`

@juliakm any update on this?

@oliverstopp - I'm still working on tracking down more information. In the meantime, here's an example of a working pipeline that uses a GitHub package resource.

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 

@juliakm Thanks for the update.

Do you have any other examples of using a universal package and if the feed is within the same DevOps project what sort of connection needs to be set up?

@oliverstopp - I want to know the same. I posted it here in case that helps:

https://developercommunity.visualstudio.com/idea/1154402/support-universal-packages-as-pipeline-resources.html

The article includes GitHub packages now. I apologize for not updating the issue earlier.

For the question about universal packages, I'd recommend looking at the Universal Packages task.

Was this page helpful?
0 / 5 - 0 ratings