0

To access them dynamically I would like to use different property config files for my environments, like

  • config-production.properties
  • config-preprod.properties
  • config-sandbox.properties

Is there a system variable I could use to get the name of the environment the app is deployed in (production/preprod/sandbox)?

Or do I have to specify this manually as a property while deploying? Any idea or best practices?

1 Answers1

0

There is no predefined variable with the environment name for applications deployed to CloudHub. You could set a property manually in Runtime Manager for that application, to define the environment name for the property file.

Another option could be to use Anypoint Platform REST APIs to get the name but it will require to make several request to different endpoints (at the least login, account, deployment, environments)

aled
  • 21,330
  • 3
  • 27
  • 34