-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 新增项目级事件回调 #10146 #10253
feat: 新增项目级事件回调 #10146 #10253
Conversation
…o feat_10146 # Conflicts: # support-files/sql/1001_ci_project_ddl_mysql.sql
@@ -440,4 +440,12 @@ CREATE TABLE IF NOT EXISTS `T_OPERATIONAL_PRODUCT` | |||
) ENGINE = InnoDB | |||
DEFAULT CHARSET = utf8mb4 COMMENT ='运营产品信息表'; | |||
|
|||
CREATE TABLE IF NOT EXISTS `T_PROJECT_CALLBACK` ( | |||
`ID` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID', | |||
`EVENT` varchar(32) DEFAULT NULL COMMENT '事件类型', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改成EVENT_TYPE
enum class ProjectEventType { | ||
CREATE, | ||
UPDATE, | ||
ENABLE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
区分启用和禁用
@@ -381,4 +385,93 @@ object OkhttpUtils { | |||
false | |||
} | |||
} | |||
|
|||
private fun buildRequest( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 重试在com.tencent.devops.common.util.HttpRetryUtils有实现,不需要重复造轮子
- callback应该只有post请求,不需要关注其他请求方法的
@POST | ||
@Path("/create") | ||
@Operation(summary = "新建项目级回调") | ||
fun create( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
创建回调url和凭证应该分开,url需要区分region
"secretType[${it.secretType}]" | ||
) | ||
// 4.发请求 | ||
send( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
回调请求如果超时3s,应该终止
#10146