I am trying to use variables set with the Variables-Screen in Azure Pipelines as the input for a template parameter, but get the error:
Encountered error(s) while parsing pipeline YAML: /azure-pipelines.yml (Line: 18, Col: 25): The 'androidIsLibrary' parameter value '$(ANDROID_IS_LIBRARY)' is not a valid Boolean.
I built a template within Azure Pipelines. The template takes several Parameters. On of it looks like this:
parameters:
- name: androidIsLibrary
type: boolean
default: false
I have set a variable inside a variable group ANDROID_IS_LIBRARY with value false.
I added the variable group inside my pipeline with the following statement:
variables:
- group: adr-general-library
After that I included my template with parameter as shown here:
jobs:
- template: job--android--build_and_deploy.yml@templates
parameters:
androidIsLibrary: $(ANDROID_IS_LIBRARY)
I can't find an example for this particular use case in the Azure DevOps documentation, so I hope somebody already faced that problem. I want to use that template with parameters but want to structure my parameters centralized in a variable group. There are a lot more variables and parameters, so it is not a solution to just put the variable definition directly into the templates. And I am also not able to change the template.
Thanks in advance