You can use any CI with SOAJS as much as you provide the following environment variable to our CD script or you can write your own script and call the SOAJS CD API. You can trigger CD on any item from the catalogs (API, daemon, front end, resource, custom, etc …)
Environment variables that you will need to get from SOAJS console and set them up on each repository.
SOAJS_URL = example: https://api.soajs.org:443/marketplace/item/deploy/cd
SOAJS_key
SOAJS_cd_auth
SOAJS_repo_auth (optional)
From soa.json get the following:
name
type
version
Case1: Calling soajs CD required with the following params:
key, cd_auth, name, version, type
branch
image_tag (optional)
Check all the env where this item is deployed from this branch and
if cd strategy is auto, rebuild and add notification
if image tag is sent change it
if cd strategy is notify, add notification
Add a ledger record with a complete report about what happened.
Case2: Calling soajs CD required with the following params:
key, cd_auth, name, version, type
branch
env_list []
image_tag (optional)
Check all the env from the env_list if this item is deployed from this branch and
if cd strategy is auto, rebuild(get last commit) and add notification
if image tag is sent change it
if cd strategy is notify, add notification
if deployed from another branch in provided env do nothing
Add a ledger record with a complete report about what happened.
Case3: Calling soajs CD required with the following params:
key, cd_auth, name, version, type
tag
env_list []
image_tag (optional)
Check all the env from the env_list if this item is deployed from a tag and
if cd strategy is auto, rebuild(change to the provide repository tag) and add notification
if image tag is sent change it
if cd strategy is notify, add notification
if deployed not from tag in provided env do nothing
Add a ledger record with a complete report about what happened.
Case4: Calling soajs CD required with the following params:
key, cd_auth, name, version, type
env_list []
image
Check all the env from the env_list if this item is deployed from this image
if cd strategy is auto, rebuild(change to the provide image tag) and add notification
if cd strategy is notify, add notification
if deployed not from this image do nothing
Add a ledger record with a complete report about what happened.
On redeploy:
if image name or repository name do not match the saved deployment configuration of the item, do not allow redeployment
if image tag or repository (tag or branch) do not match the saved deployment configuration of the item, display a message and show the save configuration
On re-configure:
...
display if image info (prefix, name, tag) do not match
...
display if repository info (repo, branch or tag) do not match
...
The following can be computed or added to the yaml CI script
SOAJS_repo_branch
SOAJS_repo_commit
SOAJS_repo_tag
SOAJS_img_tag
SOAJS_img_name
SOAJS_img_prefix
SOAJS_env_list = “dev,stg,prod”
...