Support Questions
Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

Referencing environment variables with include statements in HOCON bootstrap file

Expert Contributor

Hi.

 

We use Jenkins to kick off bootstrap of CDH clusters using Cloudera Director client.  At the top of our bootstrap config, we use an include to pull in customer specific parameters.  Jenkins sets an environment variable for customerid and we'd like to reference this variable within the include statement.   I've seen a handful of references online, but none have worked.  Suggestions?

 

Works:

include "customer-config/customer18/customer-env.properties" 

 

Big fail:

include "file://${CUSTENVPATH}" 

include "${CUSTENVPATH}"

 

 

 

2 REPLIES 2

Contributor

Unfortuantly, this is a known limitation of Hocon, see https://github.com/lightbend/config/issues/122. Glancing at the comments, it doesn't look like there are any workarounds to get this type of substitution working.

Expert Contributor

Thank you for the response.