[ 项目 ] 测试项目版本管理

This commit is contained in:
zeaslity
2023-06-30 11:41:13 +08:00
parent 6d50ca39a9
commit 6acb5e8141
2 changed files with 5 additions and 5 deletions

View File

@@ -28,7 +28,7 @@ import java.util.stream.Collectors;
import static io.wdd.rpc.init.AgentStatusCacheService.ALL_AGENT_TOPIC_NAME_SET; import static io.wdd.rpc.init.AgentStatusCacheService.ALL_AGENT_TOPIC_NAME_SET;
import static io.wdd.rpc.init.AgentStatusCacheService.ALL_HEALTHY_AGENT_TOPIC_NAME_LIST; import static io.wdd.rpc.init.AgentStatusCacheService.ALL_HEALTHY_AGENT_TOPIC_NAME_LIST;
import static io.wdd.rpc.message.handler.sync.OMessageHandlerServer.AGENT_LATEST_VERSION; import static io.wdd.rpc.message.handler.sync.OMessageHandlerServer.LATEST_VERSION;
import static io.wdd.rpc.message.handler.sync.OMessageHandlerServer.OCTOPUS_MESSAGE_FROM_AGENT; import static io.wdd.rpc.message.handler.sync.OMessageHandlerServer.OCTOPUS_MESSAGE_FROM_AGENT;
@Service @Service
@@ -133,7 +133,7 @@ public class OctopusAgentServiceImpl implements OctopusAgentService {
String latestVersion = (String) redisTemplate String latestVersion = (String) redisTemplate
.opsForValue() .opsForValue()
.get( .get(
AGENT_LATEST_VERSION LATEST_VERSION
); );
return latestVersion; return latestVersion;

View File

@@ -23,7 +23,7 @@ public class OMessageHandlerServer {
* Redis Key 用于保存Agent的最新版本 * Redis Key 用于保存Agent的最新版本
* 由 GitHubAction发送至 RabbitMQ中然后此处获取处理发送至Redis中 * 由 GitHubAction发送至 RabbitMQ中然后此处获取处理发送至Redis中
*/ */
public static final String AGENT_LATEST_VERSION = "AGENT_LATEST_VERSION"; public static final String LATEST_VERSION = "LATEST_VERSION";
/** /**
* 存储所有的从 Agent过来的 OctopusMessage * 存储所有的从 Agent过来的 OctopusMessage
* 各个业务模块需要自己手动去获取自己需要的内容 * 各个业务模块需要自己手动去获取自己需要的内容
@@ -62,7 +62,7 @@ public class OMessageHandlerServer {
// 获取Agent的版本信息 // 获取Agent的版本信息
if (octopusMessage if (octopusMessage
.getUuid() .getUuid()
.equals("Octopus-Server")) { .equals("Octopus-Version")) {
// 更新缓存Agent的最新版本信息 // 更新缓存Agent的最新版本信息
String latestVersion = (String) octopusMessage.getResult(); String latestVersion = (String) octopusMessage.getResult();
@@ -73,7 +73,7 @@ public class OMessageHandlerServer {
redisTemplate redisTemplate
.opsForValue() .opsForValue()
.set( .set(
AGENT_LATEST_VERSION, LATEST_VERSION,
latestVersion latestVersion
); );