我正在尝试使用 awc cli 设置触发器。根据文档:
http://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-notify-edit.html
http://docs.aws.amazon.com/codedeploy/latest/APIReference/API_UpdateDeploymentGroup.html
aws deploy update-deployment-group --application-name NAME --deployment-config-name CodeDeployDefault.OneAtATime --current-deployment-group-name TEST --trigger-configurations '[{"triggerName":"TEST-CD","triggerTargetArn":"my:arn","triggerEvents":["DEPLOYMENT_SUCCESS|DEPLOYMENT_FAILURE|INSTANCE_FAILURE"]}]'
aws deploy update-deployment-group --application-name NAME --deployment-config-name CodeDeployDefault.OneAtATime --current-deployment-group-name TEST --trigger-configurations '[{"triggerName":"TEST-CD","triggerTargetArn":"my:arn","triggerEvents":["DEPLOYMENT_SUCCESS"]}]'
aws deploy update-deployment-group --application-name NAME --deployment-config-name CodeDeployDefault.OneAtATime --current-deployment-group-name TEST --trigger-configurations '[{"triggerName":"TEST-CD","triggerTargetArn":"my:arn","triggerEvents":{"DEPLOYMENT_SUCCESS"}}]'
但我做不到。收到以下错误:
调用时发生客户端错误 (InvalidTriggerConfigException) 更新部署组操作:触发器事件类型无效
以下是正确操作的方法:
https://forums.aws.amazon.com/thread.jspa?threadID=228103