Azure-docs: Custom values

Created on 14 Mar 2019  Â·  8Comments  Â·  Source: MicrosoftDocs/azure-docs

I would like to use custom values in a task as in the ACR builder documentation. However, I cannot figure out how to pass the YAML file with values.

In a repository I have a values.yaml in the top folder and a Dockerfile in path/to/Dockerfile. The values.yaml has the content

foo: foo

A task that use values.yaml:

az acr task create \
--registry "$ACRNAME" \
--name "mytask" \
--image "myimage:{{ .Values.foo }}" \
--context "URL" \
--file "path/to/Dockerfile" \
--values "values.yaml" \
--git-access-token "token"

When executing the task with az acr task run ... it turns out that .Values.foo is blank, that is, nothing is inserted.

I have tried the ACR builder locally as suggested in the README with the values.yaml and there it parses correctly.
I have not tried to rewrite the task in YAML.

Can you help me figure out what is wrong? Is it only the Dockerfile that get send to the build computer and not the entire repository?


Document Details

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

container-registrsvc cxp in-progress product-question triaged

Most helpful comment

It's working with the YAML task.

Thanks a lot!

All 8 comments

Thanks for the feedback! We are currently investigating and will update you shortly.

@dlepow @iainfoulds could either of you comment further on this?

@robertdj - Thanks for the question. My understanding is the same as yours that the az acr task create command should allow you to pass in a custom values file path from your repo (relative to source context). @sajayantony - Can you please confirm or perhaps you see something else obvious in this customer's example? Thank you.

@robertdj Thank you for the question. Right now we only support using a values YAML file if the task is created with a YAML file. Therefore, your values.yaml is not compatible with Dockerfile. To work around this can you please rewrite task in YAML and try again?

If there is a reason why you do not want to use a task YAML file please let us know and we would be happy to create a feature request. Thanks! //cc @dlepow

Thanks @dlepow @jaysterp ! That makes sense as to why we were seeing issues.

I will let @robertdj reply further :)

@jaysterp : I'll try to rewrite the task using YAML and report back if it works

It's working with the YAML task.

Thanks a lot!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

varma31 picture varma31  Â·  3Comments

paulmarshall picture paulmarshall  Â·  3Comments

bdcoder2 picture bdcoder2  Â·  3Comments

ianpowell2017 picture ianpowell2017  Â·  3Comments

Agazoth picture Agazoth  Â·  3Comments