fix(cms-deploy): resolve base from scoped image ancestry
This commit is contained in:
@@ -312,6 +312,16 @@ def cms_autodeploy_publish_status(result):
|
||||
print('cms_autodeploy_tick=' + json.dumps(result, sort_keys=True))
|
||||
|
||||
|
||||
def cms_autodeploy_error_status(error, policy_errors):
|
||||
result={'status':'attention','errorType':type(error).__name__}
|
||||
if isinstance(error,policy_errors):result['reason']=str(error)[:200]
|
||||
# Only fixed CMS codes are added. External stderr/raw exception text stays
|
||||
# private, even if a caller mutates the exception's message or code.
|
||||
if isinstance(error,CmsBuildBaseError) and error.code in CMS_BUILD_BASE_ERROR_CODES:
|
||||
result['reason']=error.code
|
||||
return result
|
||||
|
||||
|
||||
def cms_autodeploy_tick():
|
||||
require_root()
|
||||
ensure_layout()
|
||||
@@ -339,10 +349,7 @@ def cms_autodeploy_tick():
|
||||
try:
|
||||
result = Controller(queue,Source(token,runner_id=cms_ci_registered_runner_id()),CmsAutodeployInstaller()).tick()
|
||||
except Exception as error:
|
||||
result = {'status':'attention','errorType':type(error).__name__}
|
||||
# Policy errors contain only fixed codes/IDs; other exception text
|
||||
# can originate in external tools and is never copied to status.
|
||||
if isinstance(error,errors):result['reason']=str(error)[:200]
|
||||
result = cms_autodeploy_error_status(error,errors)
|
||||
finally:
|
||||
queue.close()
|
||||
cms_autodeploy_publish_status(result)
|
||||
|
||||
Reference in New Issue
Block a user