The mechanisms are the same as on traditional BAW - online Workflow Servers connected to a Workflow Center, or offline servers fed with installation packages - and all of them are scriptable through the Operations REST API:
- Create the snapshot from the track (Workflow Center): the Operations REST create snapshot operation on the container's track, or Studio / the Workflow Center UI; tag the Git commit of your source export with the snapshot name.
- Export / archive the snapshot as .twx or as an offline installation package for servers that are not connected: POST /ops/std/bpm/containers/{acronym}/versions/{snapshot}/offline_package?server=<server name> - the package is a zip that the target server installs.
- Install on an online server: POST /ops/std/bpm/servers/workflow/{server}/install?container=CLM&version=2.3; on an offline server upload the package: POST /ops/std/bpm/containers/install (multipart file). Both return an asynchronous operation id; poll GET /ops/system/queue/{id} until it finishes.
- Configure the new version on the target: copy env vars / EPVs / team bindings from the previous version with the .../sync resources (previous answer), then activate it and make it the default: POST .../versions/{snapshot}/activate and .../default.
- Migrate instances if wanted: POST /ops/std/bpm/containers/migrate?container=CLM&source_version=2.2&target_version=2.3, then deactivate / archive the old version once its instance count is zero.
# Tekton / Jenkins step (bash): install package on an offline production Workflow Server and wait
OP=$(curl -sk -X POST "$PROD/ops/std/bpm/containers/install" -H "Authorization: ZenApiKey $KEY" -H "BPMCSRFToken: $TOKEN" \
-F "file=@CLM-2.3-package.zip" | jq -r .id)
until [ "$(curl -sk "$PROD/ops/system/queue/$OP" -H "Authorization: ZenApiKey $KEY" -H "BPMCSRFToken: $TOKEN" | jq -r .status)" != "running" ]; do sleep 10; done
curl -sk -X POST "$PROD/ops/std/bpm/containers/CLM/versions/2.3/env_vars/sync?source_version=2.2" -H "Authorization: ZenApiKey $KEY" -H "BPMCSRFToken: $TOKEN"
curl -sk -X POST "$PROD/ops/std/bpm/containers/CLM/versions/2.3/activate" -H "Authorization: ZenApiKey $KEY" -H "BPMCSRFToken: $TOKEN" The exact paths and parameter names are in the Swagger of your release (GET /ops/docs); the operations listed above exist on 21.0.3+ under the containers and servers groups. Keep the twx exports in Git (question on source control applies) and let the pipeline promote the same package to every environment.
References