@@ -251,10 +251,10 @@ The following hook scripts are supported on **deployment jobs**:
Deployment hook scripts may use the following environment variables:
*`$appname`: the application target name to use in this environment
*`$env`: the environment type (`review`, `integration`, `staging` or `production`)
*`$tmpappname`: the application current name being used during the deployment in this environment (different
from `$appname` during a blue/green deployment for instance)
*`$environment_name`: the application target name to use in this environment
*`$environment_type`: the environment type (`review`, `integration`, `staging` or `production`)
*`$tmp_environment_name`: the application current name being used during the deployment in this environment (different
from `$environment_name` during a blue/green deployment for instance)
*`$hostname`: the current hostname being used during the deployment in this environment
*`$domain`: the Cloud Foundry domain being used during the deployment in this environment
*`$routepath`: the Cloud Foundry route path being used during the deployment in this environment
@@ -269,7 +269,7 @@ The following hook scripts are supported on **cleanup jobs**:
Cleanup hook scripts may use the following environment variables:
*`$appname`: the name of the application in this environment
*`$environment_name`: the name of the application in this environment
* any [GitLab CI environment](https://docs.gitlab.com/ee/ci/variables/#predefined-environment-variables).
##### Cleanup job limitations
@@ -317,7 +317,7 @@ Deployment jobs support a versatile way to evaluate the **deployment manifest**.
#### Manifest file lookup
1. look for a specific `manifest-$env.yml` in your project (e.g. `manifest-staging.yml` for staging environment),
1. look for a specific `manifest-$environment_type.yml` in your project (e.g. `manifest-staging.yml` for staging environment),
2. fallbacks to default `manifest.yml`.
#### Variables replacement support
@@ -325,13 +325,13 @@ Deployment jobs support a versatile way to evaluate the **deployment manifest**.
Deployment jobs support Cloud Foundry [variables replacement](https://docs.cloudfoundry.org/devguide/deploy-apps/manifest-attributes.html#-add-variables-to-a-manifest)
with the following variables:
*`((appname))`: the application target name to use in this environment
*`((environment_name))`: the application target name to use in this environment
*`((env))`: the environment type (`review`, `integration`, `staging` or `production`)
*`((hostname))`: the current hostname being used during the deployment in this environment
* merged with file `cf-vars-$env.yml` if present in your project (e.g. `cf-vars-staging.yml` for staging environment).
* or merged with file `cf-vars.yml` if present in your project **and no `cf-vars-$env.yml` file was found**.
* merged with file `cf-vars-$environment_type.yml` if present in your project (e.g. `cf-vars-staging.yml` for staging environment).
* or merged with file `cf-vars.yml` if present in your project **and no `cf-vars-$environment_type.yml` file was found**.
:warning: your `cf-vars-$env.yml` or `cf-vars.yml` files **may** contain variable patterns such as `${MY_SECRET}`.
:warning: your `cf-vars-$environment_type.yml` or `cf-vars.yml` files **may** contain variable patterns such as `${MY_SECRET}`.
If so, those patterns will be evaluated (replaced) with actual environment values. Beware that those values can be leaked by the `cf push` output.
Multiline variables must be surrounded by **double quotes** (`"`).
@@ -350,7 +350,7 @@ Here is the general recommendation (for each one of your environments):
to use none).
* if the application is mapped to **several routes**:
* declare the [routes in your manifest](https://docs.cloudfoundry.org/devguide/deploy-apps/manifest-attributes.html#routes),
possibly using `((appname))` and `((hostname))` variables,
possibly using `((environment_name))` and `((hostname))` variables,
* set the `$CF_xxx_HOST_NAME` variable to override the hostname to use (or leave unset to use default),
*`xxx-domain` input or `$CF_xxx_DOMAIN` variables won't be used,
*`xxx-route-path` input or `$CF_xxx_ROUTE_PATH` variables won't be used.
@@ -550,7 +550,7 @@ build:
When deploying to review environment, the application name is **generated** (after the project and branch name).
So the project should either not specify the application name in the manifest, or use a specific `manifest-review.yml`
with [variabilized](https://docs.cloudfoundry.org/devguide/deploy-apps/manifest-attributes.html#-add-variables-to-a-manifest)
`((appname))`.
`((environment_name))`.
### Spring Boot back-end
@@ -609,11 +609,11 @@ applications:
memory: 768m
instances: 1
services:
- ((appname))-db
- ((environment_name))-db
```
This file will be used for review and staging environments, and uses [variables](https://docs.cloudfoundry.org/devguide/deploy-apps/manifest-attributes.html#-add-variables-to-a-manifest)
for the MySQL service name (built from `((appname))`).
for the MySQL service name (built from `((environment_name))`).
The manifest doesn't need to specify the application name because it is explicitly set by the template deployment scripts.
@@ -649,11 +649,11 @@ It also uses specific scalability settings (instances & memory).
##### `cf-pre-push.sh`
This script should ensure the required database is created, naming the database service after the application target name (`$appname`).
This script should ensure the required database is created, naming the database service after the application target name (`$environment_name`).