0
votes

I have a web-application that is hosted on two environments one is DEV one is PROD, the DEV environment has _DEV and _UAT instances, which we are currently testings. The issue is this - in both DEV and PROD app name is the same, but for UAT it has _UAT extension. Since changing the manifest every time is not an option, do you know how can I set up and use variables so that bluemix can see that if _UAT is the environment, use this name and these settings?

Here is a snap of our manifest with names changed:

applications:
 path: .
  memory: 256M
  instances: 3
  domain:  bm.devfg.com
  buildpack: sdk-for-nodejs
  name: AppName (in UAT this should say AppName_UAT)
  host: AppName
  disk_quota: 1024M
services:
  - dynatracesaasnodejs
  - postgresunixdb
env:
  NODE_TLS_REJECT_UNAUTHORIZED: "0"
2

2 Answers

0
votes

I have used full blown substitution of the entire manifest file in some of my projects. As part of the preparations for build and deployment, just do a simple copy of the proper manifest file. In one of my old projects I had four different manifest files: manifest.yml, manifest_PROD.yml, Manifest_DEV.yml, and manifest_TEST.yml. As part of the deployment and build script (using the Continuous Delivery services), just copy the appropriate manifest file to manifest.yml before starting deployment.

0
votes

You could look into using variable substitution for your manifest file. With that your appname would be read from the environment or passed in from another configuration file:

name: ((appname))