Unexpected value 'resources'" in YAML template

Viewed 2263

Is there a way ot declare resources in Yaml template ?

#yaml template
parameters:
- name: p1
resources: 
   repositories: #repository with cd template
     - repository: yaml.templates
2 Answers

Following beatcracker in this issue: https://github.com/Microsoft/azure-pipelines-yaml/issues/49

It should be possible to include resources from templates, if you utilize the extends keyword. I have not been able to confirm it since the extends keyword is currently only supported in Azure DevOps Services.

But he gave the example seen below.

azure-pipelines.yml

resources:
  containers:
  - container: node_latest
    image: node:latest

extends:
  template: template.yml

template.yml

resources:
  containers:
  - container: node_lts
    image: node:lts
Related