Below are the use cases you will be dealign with when you call the CD API of SOAJS:
call continuous delivery to change repository source
tag
branch & commit
call continuous delivery to change image source
image_tag
image_tag & image_name & image_prefix
you can also call to change both repository and image source
env_list is optional if not specified SOAJS will check all environments
Case1: Calling soajs CD to change the repository source:
key, cd_auth, name, version, type
branch
commit
Check all the env where this item is deployed from this branch and
if cd strategy is auto, rebuild and add notification
if cd strategy is notify, add notification
Add a ledger record with a complete report about what happened.
Case2: Calling soajs CD to change the repository source:
key, cd_auth, name, version, type
tag
Check all the env where this item is deployed from this tag and
if cd strategy is auto, rebuild and add notification
if cd strategy is notify, add notification
Add a ledger record with a complete report about what happened.
Case3: Calling soajs CD to change the image source:
key, cd_auth, name, version, type
image_tag
env_list []
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
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
branch
commit
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.
Case5: Calling soajs CD required with the following params:
key, cd_auth, name, version, type
branch
commit
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.
Case6: 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.
Case7: Calling soajs CD required with the following params:
key, cd_auth, name, version, type
env_list []
image_tag
image_name
image_prefix
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, name and/or prefix) and add notification
if cd strategy is notify, add notification
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
all the remaining information will be driven from the save configuration
later on we will support discrepancy comparison for the following:
image info
repository info
volume info
ports info
env info
args info
0 Comments