Skip to content

Commit

Permalink
Merge pull request #53 from openinfradev/fix-stages
Browse files Browse the repository at this point in the history
app-serving: fix pipeline stages
  • Loading branch information
robertchoi80 authored May 18, 2023
2 parents 85bc403 + a628418 commit b356910
Showing 1 changed file with 27 additions and 29 deletions.
56 changes: 27 additions & 29 deletions internal/delivery/http/app-serve-app.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (

var (
StatusResult = map[string]string{
"PREPARING": "DONE",
"BUILDING": "BUILDING",
"BUILD_SUCCESS": "DONE",
"BUILD_FAILED": "FAILED",
Expand Down Expand Up @@ -48,7 +47,6 @@ var (
"ROLLBACK_FAILED": "FAILED",
}
StatusName = map[string]string{
"PREPARING": "PREPARE",
"BUILDING": "BUILD",
"BUILD_SUCCESS": "BUILD",
"BUILD_FAILED": "BUILD",
Expand Down Expand Up @@ -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"},
}
)

Expand Down

0 comments on commit b356910

Please sign in to comment.