-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
Description
Is your feature request related to a problem? Please describe.
As a template authors, in order to have scripts and spruce expressions to fetch files (in config repo ot template repos), that avoid hardcoded path (such as root deploment, subdeployment), I need to rely on variables.
This enables:
- ease refactorings such as deployment renaming, or moving across root deployments
- sharing/factorizing scripts and spruce expressions among multiple root deployments (potentialy contributes to https://github.com/orange-cloudfoundry/paas-templates/issues/376 )
Describe the solution you'd like
Export new env variables such as:
SECRET_HOME=
TEMPLATE_HOME=
ROOT_DEPLOYMENT=hello-world-root-depls
DEPLOYMENT=generic-appthat would be used using spruce env var interpolation https://github.com/geofffranks/spruce/blob/master/doc/environment-variables-and-defaults.md#can-i-use-the-values-of-environment-variables-in-an-operation
path_to_my_file: ((concat $TEMPLATE_HOME "/" $ROOT_DEPLOYMENT "/cf-apps-deployments/" $DEPLOYMENT "/template" ))
and in shell script in
${TEMPLATE_HOME}/{ROOT_DEPLOYMENT}/cf-apps-deployments/${DEPLOYMENT}/template
${SECRET_HOME}/{ROOT_DEPLOYMENT}/cf-apps-deployments/${DEPLOYMENT}/myfile.txtDescribe alternatives you've considered
- documenting internal
CUSTOM_SCRIPT_DIRvariable as as the following initially suggested in doc(reference-dataset): document spruce file usage #258 (comment)
secrets: # this key is pruned by spruce
timeout_from_file: ((concat "../../../../" $CUSTOM_SCRIPT_DIR "/spruce-file-sample-from-templates.txt" ))Additional context
This is a followup of #255 and #258 (comment)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
P3