mirror of https://github.com/certd/certd
perf: 支持部署到腾讯云COS
parent
a3ef3fb5cf
commit
a8a45d7f75
|
@ -10,7 +10,6 @@ import { TencentSslClient } from '../../lib/index.js';
|
||||||
icon: 'svg:icon-tencentcloud',
|
icon: 'svg:icon-tencentcloud',
|
||||||
group: pluginGroups.tencent.key,
|
group: pluginGroups.tencent.key,
|
||||||
desc: '部署到腾讯云COS源站域名证书',
|
desc: '部署到腾讯云COS源站域名证书',
|
||||||
deprecated: '暂不可用',
|
|
||||||
default: {
|
default: {
|
||||||
strategy: {
|
strategy: {
|
||||||
runStrategy: RunStrategy.SkipWhenSucceed,
|
runStrategy: RunStrategy.SkipWhenSucceed,
|
||||||
|
@ -117,15 +116,18 @@ export class DeployCertToTencentCosPlugin extends AbstractPlusTaskPlugin {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (const domain of this.domains) {
|
||||||
const params = {
|
const params = {
|
||||||
CertificateId: tencentCertId,
|
CertificateId: tencentCertId,
|
||||||
ResourceType: 'cos',
|
ResourceType: 'cos',
|
||||||
Status: 1,
|
Status: 1,
|
||||||
InstanceIdList: [`${this.bucket}#${this.region}#${this.domains}`],
|
InstanceIdList: [`${this.region}#${this.bucket}#${domain}`],
|
||||||
};
|
};
|
||||||
|
|
||||||
const res = await client.deployCertificateInstance(params);
|
const res = await client.deployCertificateInstance(params);
|
||||||
this.logger.info('部署成功', res);
|
this.logger.info(`域名${domain}部署成功:`, res);
|
||||||
|
}
|
||||||
|
this.logger.info('部署完成');
|
||||||
}
|
}
|
||||||
|
|
||||||
async onGetDomainList(data: any) {
|
async onGetDomainList(data: any) {
|
||||||
|
|
Loading…
Reference in New Issue