mirror of
https://github.com/certd/certd.git
synced 2026-04-29 00:28:11 +08:00
chore:
This commit is contained in:
@@ -95,14 +95,14 @@ export class DeployCertToAliyunOSS extends AbstractTaskPlugin {
|
|||||||
component: {
|
component: {
|
||||||
name: 'a-select',
|
name: 'a-select',
|
||||||
options: [
|
options: [
|
||||||
{ value: 'cas.aliyuncs.com', label: '中国大陆' },
|
{ value: 'cn-hangzhou', label: '中国大陆' },
|
||||||
{ value: 'cas.ap-southeast-1.aliyuncs.com', label: '新加坡' },
|
{ value: 'southeast-1', label: '新加坡' },
|
||||||
{ value: 'cas.eu-central-1.aliyuncs.com', label: '德国(法兰克福)' },
|
{ value: 'eu-central-1', label: '德国(法兰克福)' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
required: true,
|
required: true,
|
||||||
})
|
})
|
||||||
casEndpoint!: string;
|
casRegion!: string;
|
||||||
|
|
||||||
@TaskInput({
|
@TaskInput({
|
||||||
title: 'Access授权',
|
title: 'Access授权',
|
||||||
@@ -131,10 +131,14 @@ export class DeployCertToAliyunOSS extends AbstractTaskPlugin {
|
|||||||
let certId: any = this.cert;
|
let certId: any = this.cert;
|
||||||
let certName: any = this.appendTimeSuffix("certd");
|
let certName: any = this.appendTimeSuffix("certd");
|
||||||
if (typeof this.cert === "object") {
|
if (typeof this.cert === "object") {
|
||||||
|
let endpoint = `cas.${this.casRegion}.aliyuncs.com`;
|
||||||
|
if (this.casRegion === "cn-hangzhou"){
|
||||||
|
endpoint = "cas.aliyuncs.com";
|
||||||
|
}
|
||||||
const sslClient = new AliyunSslClient({
|
const sslClient = new AliyunSslClient({
|
||||||
access,
|
access,
|
||||||
logger: this.logger,
|
logger: this.logger,
|
||||||
endpoint: this.casEndpoint
|
endpoint: endpoint
|
||||||
});
|
});
|
||||||
|
|
||||||
certName = this.buildCertName(CertReader.getMainDomain(this.cert.crt));
|
certName = this.buildCertName(CertReader.getMainDomain(this.cert.crt));
|
||||||
@@ -179,7 +183,7 @@ export class DeployCertToAliyunOSS extends AbstractTaskPlugin {
|
|||||||
<Certificate>${this.cert.crt}</Certificate>
|
<Certificate>${this.cert.crt}</Certificate>
|
||||||
`
|
`
|
||||||
}else{
|
}else{
|
||||||
certStr = `<CertId>${this.cert}</CertId>`
|
certStr = `<CertId>${this.cert}-${this.casRegion}</CertId>`
|
||||||
}
|
}
|
||||||
|
|
||||||
const xml = `
|
const xml = `
|
||||||
|
|||||||
Reference in New Issue
Block a user