diff --git a/deploy-agent/deployd/common/config.py b/deploy-agent/deployd/common/config.py index 6ae58cca42..f874bec2fd 100644 --- a/deploy-agent/deployd/common/config.py +++ b/deploy-agent/deployd/common/config.py @@ -104,6 +104,8 @@ def update_variables(self, deploy_status): self._environ['ENV_NAME'] = deploy_status.report.envName if deploy_status.report.stageName: self._environ['STAGE_NAME'] = deploy_status.report.stageName + if deploy_status.report.stageType: + self._environ['COMPUTE_STAGE_TYPE'] = deploy_status.report.stageType if deploy_status.first_deploy: self._environ['FIRST_DEPLOY'] = str(deploy_status.first_deploy) if deploy_status.is_docker: diff --git a/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/DeployGoalBean.java b/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/DeployGoalBean.java index b44da7f556..ce2ef21640 100644 --- a/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/DeployGoalBean.java +++ b/deploy-service/common/src/main/java/com/pinterest/deployservice/bean/DeployGoalBean.java @@ -25,6 +25,7 @@ public class DeployGoalBean { private String envId; private String envName; private String stageName; + private String stageType; private DeployStage deployStage; private BuildBean build; private String deployAlias; @@ -65,6 +66,14 @@ public void setStageName(String stageName) { this.stageName = stageName; } + public String getStageType() { + return stageType; + } + + public void setStageType(String stageType) { + this.stageType = stageType; + } + public DeployStage getDeployStage() { return deployStage; } diff --git a/deploy-service/common/src/main/java/com/pinterest/deployservice/handler/PingHandler.java b/deploy-service/common/src/main/java/com/pinterest/deployservice/handler/PingHandler.java index 0e053655e0..50225644e4 100644 --- a/deploy-service/common/src/main/java/com/pinterest/deployservice/handler/PingHandler.java +++ b/deploy-service/common/src/main/java/com/pinterest/deployservice/handler/PingHandler.java @@ -760,6 +760,7 @@ public PingResponseBean generateInstallResponse(GoalAnalyst.InstallCandidate ins goal.setEnvId(envBean.getEnv_id()); goal.setEnvName(envBean.getEnv_name()); goal.setStageName(envBean.getStage_name()); + goal.setStageType(envBean.getStage_type()); goal.setIsDocker(envBean.getIs_docker()); // TODO optimize the next stage here based on deploy ( some deploy does not have all the stages ) @@ -835,6 +836,7 @@ PingResponseBean generateDeleteResponse(GoalAnalyst.UninstallCandidate candidate goal.setDeployStage(candidate.report.getDeployStage()); goal.setEnvName(candidate.environ.getEnv_name()); goal.setStageName(candidate.environ.getStage_name()); + goal.setStageType(candidate.environ.getStage_type()); goal.setFirstDeploy(false); response.setDeployGoal(goal); return response;