mirror of
https://github.com/certd/certd.git
synced 2026-04-24 04:17:25 +08:00
chore: aliyun esa ok
This commit is contained in:
@@ -138,40 +138,40 @@ export class AliyunDeployCertToESA extends AbstractTaskPlugin {
|
|||||||
|
|
||||||
const client = await this.getClient(access);
|
const client = await this.getClient(access);
|
||||||
|
|
||||||
// const { certId, certName } = await this.getAliyunCertId(access);
|
const { certId, certName } = await this.getAliyunCertId(access);
|
||||||
|
|
||||||
for (const siteId of this.siteIds) {
|
for (const siteId of this.siteIds) {
|
||||||
await this.clearSiteLimitCert(client, siteId);
|
await this.clearSiteLimitCert(client, siteId);
|
||||||
// try {
|
try {
|
||||||
// const res = await client.doRequest({
|
const res = await client.doRequest({
|
||||||
// // 接口名称
|
// 接口名称
|
||||||
// action: "SetCertificate",
|
action: "SetCertificate",
|
||||||
// // 接口版本
|
// 接口版本
|
||||||
// version: "2024-09-10",
|
version: "2024-09-10",
|
||||||
// data: {
|
data: {
|
||||||
// body: {
|
body: {
|
||||||
// SiteId: siteId,
|
SiteId: siteId,
|
||||||
// CasId: certId,
|
CasId: certId,
|
||||||
// Type: "cas",
|
Type: "cas",
|
||||||
// Name: certName
|
Name: certName
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
// this.logger.info(`部署站点[${siteId}]证书成功:${JSON.stringify(res)}`);
|
this.logger.info(`部署站点[${siteId}]证书成功:${JSON.stringify(res)}`);
|
||||||
|
|
||||||
// } catch (e) {
|
} catch (e) {
|
||||||
// if (e.message.includes("Certificate.Duplicated")) {
|
if (e.message.includes("Certificate.Duplicated")) {
|
||||||
// this.logger.info(`站点[${siteId}]证书已存在,无需重复部署`);
|
this.logger.info(`站点[${siteId}]证书已存在,无需重复部署`);
|
||||||
// } else {
|
} else {
|
||||||
// throw e;
|
throw e;
|
||||||
// }
|
}
|
||||||
// } finally {
|
} finally {
|
||||||
// try {
|
try {
|
||||||
// await this.clearSiteExpiredCert(client, siteId);
|
await this.clearSiteExpiredCert(client, siteId);
|
||||||
// } catch (e) {
|
} catch (e) {
|
||||||
// this.logger.error(`清理站点[${siteId}]过期证书失败`, e)
|
this.logger.error(`清理站点[${siteId}]过期证书失败`, e)
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -296,7 +296,7 @@ export class AliyunDeployCertToESA extends AbstractTaskPlugin {
|
|||||||
data: {
|
data: {
|
||||||
query: {
|
query: {
|
||||||
SiteId: siteId,
|
SiteId: siteId,
|
||||||
Id: oldly.id
|
Id: oldly.Id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user