@@ -161,19 +161,19 @@ The deployment script is searched as follows:
#### 2: template-based deployment
In this mode, you have to provide a [OpenShift templates](https://docs.openshift.com/container-platform/latest/openshift_images/using-templates.html)
In this mode, you have to provide a [OpenShift templates](https://docs.openshift.com/container-platform/latest/applications/creating_applications/using-templates.html)
in your project structure, and let the GitLab CI template `oc apply` it.
The template processes the following steps:
1. _optionally_ executes the `os-pre-apply.sh` script in your project to perform specific environment pre-initialization (for e.g. create required services),
2. looks for your OpenShift [template](https://docs.openshift.com/container-platform/latest/openshift_images/using-templates.html) file, performs [variables substitution](#using-variabless) and [`oc apply`](https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/developer-cli-commands.html#oc-apply) it,
2. looks for your OpenShift [template](https://docs.openshift.com/container-platform/latest/applications/creating_applications/using-templates.html) file, performs [variables substitution](#using-variabless) and [`oc apply`](https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/developer-cli-commands.html#oc-apply) it,
1. look for a specific `openshift-$environment_type.yml` in your project (e.g. `openshift-staging.yml` for staging environment),
2. fallbacks to default `openshift.yml`.
3. _optionally_ executes the `os-post-apply.sh` script in your project to perform specific environment post-initialization stuff,
4. _optionally_ executes the `os-readiness-check` to wait & check for the application to be ready (if not found, the template assumes the application was successfully started).
Deployment jobs process the selected template with the following [labels](https://docs.openshift.com/container-platform/latest/openshift_images/using-templates.html#writing-labels):
Deployment jobs process the selected template with the following [labels](https://docs.openshift.com/container-platform/latest/applications/creating_applications/using-templates.html#writing-labels):
*`app`: the application target name to use in this environment (i.e. `$environment_name`)<br/>
_Can be overridden with `$OS_APP_LABEL`._
@@ -251,8 +251,8 @@ by using available environment variables:
3. any [custom variable](https://docs.gitlab.com/ee/ci/variables/#for-a-project)
(ex: `${SECRET_TOKEN}` that you have set in your project CI/CD variables)
While your scripts may simply use any of those variables, your [OpenShift templates](https://docs.openshift.com/container-platform/latest/openshift_images/using-templates.html)
shall be variabilized using [parameters](https://docs.openshift.com/container-platform/latest/openshift_images/using-templates.html#templates-writing-parameters_using-templates).
While your scripts may simply use any of those variables, your [OpenShift templates](https://docs.openshift.com/container-platform/latest/applications/creating_applications/using-templates.html)
shall be variabilized using [parameters](https://docs.openshift.com/container-platform/latest/applications/creating_applications/using-templates.html#writing-parameters).
Parameters are evaluated in the following order:
@@ -404,8 +404,8 @@ The OpenShift template uses some global configuration used throughout all jobs.
| `scripts-dir` / `OS_SCRIPTS_DIR` | directory where OpenShift scripts (templates, hook scripts) are located | `.` _(root project dir)_ |
| `base-template-name` / `OS_BASE_TEMPLATE_NAME` | Base OpenShift template name | `openshift` |
| `app-label` / `OS_APP_LABEL` | The OpenShift [label](https://docs.openshift.com/container-platform/latest/openshift_images/using-templates.html#writing-labels) set with the `$environment_name` [dynamic variable](#using-variables) value. _Advanced usage_ | `app` |
| `env-label` / `OS_ENV_LABEL` | The OpenShift [label](https://docs.openshift.com/container-platform/latest/openshift_images/using-templates.html#writing-labels) set with the `$environment_type` [dynamic variable](#using-variables) value (`review`, `integration`, `staging` or `prod`). _Advanced usage_ | `env` |
| `app-label` / `OS_APP_LABEL` | The OpenShift [label](https://docs.openshift.com/container-platform/latest/applications/creating_applications/using-templates.html#writing-labels) set with the `$environment_name` [dynamic variable](#using-variables) value. _Advanced usage_ | `app` |
| `env-label` / `OS_ENV_LABEL` | The OpenShift [label](https://docs.openshift.com/container-platform/latest/applications/creating_applications/using-templates.html#writing-labels) set with the `$environment_type` [dynamic variable](#using-variables) value (`review`, `integration`, `staging` or `prod`). _Advanced usage_ | `env` |