Skip to content

Commit

Permalink
send stage type from TAS to the host and setup the environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
liyaqin1 committed Nov 17, 2023
1 parent da46927 commit 2b73d2b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions deploy-agent/deployd/common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 2b73d2b

Please sign in to comment.