YannickRe / azuredevops-buildagents

Generate self-hosted build agents for Azure DevOps, just like Microsoft does.
MIT License
151 stars 90 forks source link

Error: A template expression is not allowed in this context #1

Closed Marcus-James-Adams closed 3 years ago

Marcus-James-Adams commented 3 years ago
parameters:
- name: image_type
  displayName: Build Agent Image
  type: string
  default: windows2019
  values:
  - windows2019
  - ubuntu2004
- name: variable_group
  displayName: Variable Group
  type: string
  default: BuildAgents
- name: agent_pool
  displayName: Agent Pool
  type: string
  default: MyPool

trigger: none

pool: ${{ parameters.agent_pool }}

On validating I get

/buildagent-generation.yml (Line: 20, Col: 7): A template expression is not allowed in this context

if however, I change pool to be a hardcoded value it runs ok eg (pool: MyPool)

YannickRe commented 3 years ago

I'm sorry about that, I just pushed a fix => https://github.com/YannickRe/azuredevops-buildagents/commit/708c9b35a0f659864a619c1104eafcffe877b745 Thank you for letting me know!

Marcus-James-Adams commented 3 years ago

Thanks, thats the shizzle