Closed estebanreyl closed 5 years ago
Does the imported file in alias-src
need to be local file? Can I do something like https://github.com/azure/acr-tasks/alias.yaml?
@northtyphoon I don't see why not? additionally, it would be interesting to see if there are some public ones people are using. Ideally we can build it with support for both local and remote files.
@estebanreyl What if the alias file is in a private repo?
@shahzzzam … Good question. We could try adding some form of support maybe for GitHub auth but I don't really see a good way to add general auth for such a purpose. Personally I believe given such a requirement local files are not unreasonable as users would likely be able to include these along with their also in all likelyhood private projects. Suggestions are welcome though, I am truthfully less familiar with what we can expect from users
@estebanreyl hmm, if the context is remote and private, we do allow users to pass in the git access token during Task creation. @northtyphoon I believe if the alias.yaml file is in the same repo as the context, it will already be locally available when running the Task (because we download the context before running the task). But if it is in a different private repo, do we want users to send additional git access tokens for the task?
@shahzzzam That means it would thus make sense to give support for at least that context? It gets hazier in terms of expected use for me later on allowing additional repos with access tokens.
Confirming we're removing the need to specify $ in cmd references
# helm deploy the updated hello-world image
- cmd: >
helm update helloworld ./release/helm/
--reuse-values
--set helloworld.image=$registry/hello-world:$id
@SteveLasker yes
The feature has been merged https://github.com/Azure/acr-builder/pull/468
Task Yaml alias additions
We have been discussing how to facilitate and improve on existing task yaml capabilities. In particular by looking at declaring aliases within the yaml files for reusability and general convenience. In current consideration we want something providing functionality similar to C's #define preprocessor directive, with some added changes, in particular:
Defined values would be accessed using the $ character as a preceding char. $$ used to escape $. All alias could also be disabled in the define portion of the yaml or the alias identifier $ can be re defined.
Alias definition should be hierarchical, such that the last override of an alias will be the final considered value, that is hierarchically speaking: local definitions > file definitions > Global definitions
As an example we could see:
Example global definitions:
Example task yaml file:
Example org-defaults.yaml: