Skip to content
Snippets Groups Projects
Commit 42fcd96b authored by Girija Saint Ange's avatar Girija Saint Ange
Browse files

Update usage of extra_fucntions and add an example in hook script

parent e3062cec
No related branches found
No related tags found
No related merge requests found
...@@ -417,9 +417,9 @@ The template provides extra scripts that can be called in your `.gitlab-ci.yml` ...@@ -417,9 +417,9 @@ The template provides extra scripts that can be called in your `.gitlab-ci.yml`
| Function signature | Description | | Function signature | Description |
|------------------------------------|-------------------------------------------| |------------------------------------|-------------------------------------------|
| `force_rollout(<deployment_name>)` | Force a new rollout of the specified deployment. This can be useful when your deployment references a `stable` or `latest`image stream tag that is updated by gitlab pipeline. Once your template applied, if you only changed some application stuff and pushed a new version of the image, yet did not change anything in your template, no rollout will be triggered. Call this function to force a new rollout. | | `force_rollout <deploymentConfig_name>` | Force a new rollout of the specified deploymentConfig. This can be useful when your deployment references a `stable` or `latest`image stream tag that is updated by gitlab pipeline. Once your template applied, if you only changed some application stuff and pushed a new version of the image, yet did not change anything in your template, no rollout will be triggered. Call this function to force a new rollout. |
| `poll_last_rollout(<deployment_name>, [timeout: 2 minutes])` | Wait for the last rollout to end. This function will fail if the rollout fails or did not ended during the specified amount of time (two minutes by default). | | `poll_last_rollout <deploymentConfig_name>, [timeout: 2 minutes]` | Wait for the last rollout to end. This function will fail if the rollout fails or did not ended during the specified amount of time (two minutes by default). |
| `purge_old_image_tags(<image_name>, <number_to_keep>)` | For the given image stream, crawls all the tags and keeps only the `N` youngest ones. This can be useful when you create a new image tag for each pipeline (exemple of tag: `$CI_COMMIT_SHORT_SHA` or `$CI_COMMIT_SHA`). | | `purge_old_image_tags <image_name>, <number_to_keep>` | For the given image stream, crawls all the tags and keeps only the `N` youngest ones. This can be useful when you create a new image tag for each pipeline (exemple of tag: `$CI_COMMIT_SHORT_SHA` or `$CI_COMMIT_SHA`). |
## Variants ## Variants
...@@ -631,6 +631,9 @@ mkdir -p target/openshift/deployments && cp target/my-application-1.0.0-SNAPSHOT ...@@ -631,6 +631,9 @@ mkdir -p target/openshift/deployments && cp target/my-application-1.0.0-SNAPSHOT
# trigger build: this will trigger a deployment # trigger build: this will trigger a deployment
oc start-build "$appname" --from-dir=target/openshift --wait --follow oc start-build "$appname" --from-dir=target/openshift --wait --follow
# example for force_rollout
force_rollout $appname
``` ```
##### `os-readiness-check.sh` ##### `os-readiness-check.sh`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment