New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow environment variables for tags #770
Comments
@GuilleAmutio you want the tag be
You will get For example: And with that you will get something like |
Unfortunately, setting
it would be nice to support arbitrary environment variables using the So
would allow for env variables as well as arbitrary values. |
I still don't understand the what takes precedence between nx.json and an apps project.json. It'd be nice if the options are merged in order. That could potentially solve the env var problem with something like
? (A single |
We just ran into a similar problem as @nsainaney: we'd like certain tags to be enabled only on a release, so something akin to
However, As far as I can tell that should be possible by adding an additional key to the render context of the handlebar call here. Probably only envvars starting with a particular prefix such as |
If it is too cumbersome to allow ENV variables as part of the config tags definition maybe it would be easier to add an additional input like e.g. "INPUT_ADDL_TAGS" that doesn't replace the tags created through the "tags" config but just adds them as additional tags? |
Hello everyone, first of all sorry for the delay in responding, I have been very busy lately... I just want to comment that several parts of the plugin flow have support for environment variables interpolation, so this works fine:
Also, for automatic metadata tagging, RAW tags are also supported doing something like this:
In both cases you need to setup the environment variables in your terminal or CI provider. If you need more information please share your config and we can work together to find a way to solve your issue :D |
Hello @gperdomor Thanks for the sample of using RAW tags. I coudn't find in the documentation rules about which tag will be used. In your exemple, when will the semver used ? And does the major and minor comes from package.json ? Thanks |
I would really like to have the option of defining the TAGs for the images as environment variables. Maybe this is already possible but I could not find the right way to do it.
On my targets field on the project.json I have:
So the tag would be something like my myproject.frontend.dev.20230404122321 (I know it is not the best way to TAG, but let's say it is a requirement).
Is this already possible?
The text was updated successfully, but these errors were encountered: