实现回滚使用CodePipeline编排的部署的最佳机制是什么?源来自S3存储桶,我们正在寻找是否有一个单一的回滚机制,无需人工干预。
答案 0 :(得分:1)
CodePipeline doesn't support rollback currently. If you are using CodeDeploy as the deployment action, you can setup rollback on alarm or failed deployment on the CodeDeploy DeploymentGroup. The cloud formation template to enable auto-rollback for a CodeDeploy deployment group looks like:
Type: "AWS::CodeDeploy::DeploymentGroup"
Properties:
...
AutoRollbackConfiguration:
Enabled: true
Events:
- "DEPLOYMENT_FAILURE"
- "DEPLOYMENT_STOP_ON_ALARM"
AlarmConfiguration:
Alarms:
- CloudWatchAlarm1
- CloudWatchAlarm2
Enabled: true
You can find more information about it at Deployments and Redeploy
答案 1 :(得分:1)
如果我们不使用 AWS CodeDeploy,那么我们随时都可以使用手动回滚方式,即重新部署之前的稳定版本或标签。