diff --git a/internal/delivery/http/app-serve-app.go b/internal/delivery/http/app-serve-app.go index 78a16cb4..9dd6fb0c 100644 --- a/internal/delivery/http/app-serve-app.go +++ b/internal/delivery/http/app-serve-app.go @@ -18,7 +18,6 @@ import ( var ( StatusResult = map[string]string{ - "PREPARING": "DONE", "BUILDING": "BUILDING", "BUILD_SUCCESS": "DONE", "BUILD_FAILED": "FAILED", @@ -48,7 +47,6 @@ var ( "ROLLBACK_FAILED": "FAILED", } StatusName = map[string]string{ - "PREPARING": "PREPARE", "BUILDING": "BUILD", "BUILD_SUCCESS": "BUILD", "BUILD_FAILED": "BUILD", @@ -78,34 +76,34 @@ var ( "ROLLBACK_FAILED": "ROLLBACK", } StatusStages = map[string][]string{ - "PREPARING": {"PREPARING"}, - "BUILDING": {"PREPARING", "BUILDING"}, - "BUILD_SUCCESS": {"PREPARING", "BUILD_SUCCESS"}, - "BUILD_FAILED": {"PREPARING", "BUILD_FAILED"}, - "DEPLOYING": {"PREPARING", "BUILD_SUCCESS", "DEPLOYING"}, - "DEPLOY_SUCCESS": {"PREPARING", "BUILD_SUCCESS", "DEPLOY_SUCCESS"}, - "DEPLOY_FAILED": {"PREPARING", "BUILD_SUCCESS", "DEPLOY_FAILED"}, - "BLUEGREEN_DEPLOYING": {"PREPARING", "BUILD_SUCCESS", "DEPLOY_SUCCESS", "BLUEGREEN_DEPLOYING"}, - "BLUEGREEN_WAIT": {"PREPARING", "BUILD_SUCCESS", "DEPLOY_SUCCESS", "BLUEGREEN_WAIT"}, - "BLUEGREEN_DEPLOY_FAILED": {"PREPARING", "BUILD_SUCCESS", "DEPLOY_SUCCESS", "BLUEGREEN_DEPLOY_FAILED"}, - "BLUEGREEN_PROMOTING": {"BLUEGREEN_PROMOTING"}, - "BLUEGREEN_PROMOTE_SUCCESS": {"BLUEGREEN_PROMOTING", "BLUEGREEN_PROMOTE_SUCCESS"}, - "BLUEGREEN_PROMOTE_FAILED": {"BLUEGREEN_PROMOTING", "BLUEGREEN_PROMOTE_FAILED"}, - "BLUEGREEN_ABORTING": {"BLUEGREEN_ABORTING"}, - "BLUEGREEN_ABORT_SUCCESS": {"BLUEGREEN_ABORTING", "BLUEGREEN_ABORT_SUCCESS"}, - "BLUEGREEN_ABORT_FAILED": {"BLUEGREEN_ABORTING", "BLUEGREEN_ABORT_FAILED"}, - "CANARY_DEPLOYING": {"PREPARING", "BUILD_SUCCESS", "DEPLOY_SUCCESS", "CANARY_DEPLOYING"}, - "CANARY_WAIT": {"PREPARING", "BUILD_SUCCESS", "DEPLOY_SUCCESS", "CANARY_WAIT"}, - "CANARY_DEPLOY_FAILED": {"PREPARING", "BUILD_SUCCESS", "DEPLOY_SUCCESS", "CANARY_DEPLOY_FAILED"}, - "CANARY_PROMOTING": {"CANARY_PROMOTING"}, - "CANARY_PROMOTE_SUCCESS": {"CANARY_PROMOTING", "CANARY_PROMOTE_SUCCESS"}, - "CANARY_PROMOTE_FAILED": {"CANARY_PROMOTING", "CANARY_PROMOTE_FAILED"}, - "CANARY_ABORTING": {"CANARY_ABORTING"}, - "CANARY_ABORT_SUCCESS": {"CANARY_ABORTING", "CANARY_ABORT_SUCCESS"}, - "CANARY_ABORT_FAILED": {"CANARY_ABORTING", "CANARY_ABORT_FAILED"}, + "PREPARING": {}, + "BUILDING": {"BUILDING"}, + "BUILD_SUCCESS": {"BUILD_SUCCESS"}, + "BUILD_FAILED": {"BUILD_FAILED"}, + "DEPLOYING": {"BUILD_SUCCESS", "DEPLOYING"}, + "DEPLOY_SUCCESS": {"BUILD_SUCCESS", "DEPLOY_SUCCESS"}, + "DEPLOY_FAILED": {"BUILD_SUCCESS", "DEPLOY_FAILED"}, + "BLUEGREEN_DEPLOYING": {"BUILD_SUCCESS", "DEPLOYING"}, + "BLUEGREEN_DEPLOY_FAILED": {"BUILD_SUCCESS", "DEPLOY_FAILED"}, + "BLUEGREEN_WAIT": {"BUILD_SUCCESS", "DEPLOY_SUCCESS", "BLUEGREEN_WAIT"}, + "BLUEGREEN_PROMOTING": {"BUILD_SUCCESS", "DEPLOY_SUCCESS", "BLUEGREEN_PROMOTING"}, + "BLUEGREEN_PROMOTE_SUCCESS": {"BUILD_SUCCESS", "DEPLOY_SUCCESS", "BLUEGREEN_PROMOTE_SUCCESS"}, + "BLUEGREEN_PROMOTE_FAILED": {"BUILD_SUCCESS", "DEPLOY_SUCCESS", "BLUEGREEN_PROMOTE_FAILED"}, + "BLUEGREEN_ABORTING": {"BUILD_SUCCESS", "DEPLOY_SUCCESS", "BLUEGREEN_ABORTING"}, + "BLUEGREEN_ABORT_SUCCESS": {"BUILD_SUCCESS", "DEPLOY_SUCCESS", "BLUEGREEN_ABORT_SUCCESS"}, + "BLUEGREEN_ABORT_FAILED": {"BUILD_SUCCESS", "DEPLOY_SUCCESS", "BLUEGREEN_ABORT_FAILED"}, + "CANARY_DEPLOYING": {"BUILD_SUCCESS", "DEPLOYING"}, + "CANARY_DEPLOY_FAILED": {"BUILD_SUCCESS", "DEPLOY_FAILED"}, + "CANARY_WAIT": {"BUILD_SUCCESS", "DEPLOY_SUCCESS", "CANARY_WAIT"}, + "CANARY_PROMOTING": {"BUILD_SUCCESS", "DEPLOY_SUCCESS", "CANARY_PROMOTING"}, + "CANARY_PROMOTE_SUCCESS": {"BUILD_SUCCESS", "DEPLOY_SUCCESS", "CANARY_PROMOTE_SUCCESS"}, + "CANARY_PROMOTE_FAILED": {"BUILD_SUCCESS", "DEPLOY_SUCCESS", "CANARY_PROMOTE_FAILED"}, + "CANARY_ABORTING": {"BUILD_SUCCESS", "DEPLOY_SUCCESS", "CANARY_ABORTING"}, + "CANARY_ABORT_SUCCESS": {"BUILD_SUCCESS", "DEPLOY_SUCCESS", "CANARY_ABORT_SUCCESS"}, + "CANARY_ABORT_FAILED": {"BUILD_SUCCESS", "DEPLOY_SUCCESS", "CANARY_ABORT_FAILED"}, "ROLLBACKING": {"ROLLBACKING"}, - "ROLLBACK_SUCCESS": {"ROLLBACKING", "ROLLBACK_SUCCESS"}, - "ROLLBACK_FAILED": {"ROLLBACKING", "ROLLBACK_FAILED"}, + "ROLLBACK_SUCCESS": {"ROLLBACK_SUCCESS"}, + "ROLLBACK_FAILED": {"ROLLBACK_FAILED"}, } )