fnproject / cli

CLI tool for fnproject.
https://fnproject.io
Apache License 2.0
132 stars 66 forks source link

Fn CLI to support variables / environment variable substitution #677

Open vamshikrishna83 opened 1 year ago

vamshikrishna83 commented 1 year ago

I am unable to find a way to control and set APP_VERSION outside of func.yaml and pass it on as either environment variable or other means to make fn build pick up this version and tag docker image with that version.

I have tried both the below options, but was not able to find a way where version could be passed on as value.

schema_version: 20180708
name: image_name
version: '{{ env:APP_VERSION }}'
runtime: docker
schema_version: 20180708
name: image_name
version: ${APP_VERSION}
runtime: docker

Is there support to define and use environment variables in func.yaml files. If so, please provide some details on how to get this working for version and other values as well.