fix: 上传到阿里云cas,证书前缀无效的bug

pull/469/head
xiaojunnuo 2025-07-22 23:53:33 +08:00
parent 4e5e862f58
commit b382351c7b
3 changed files with 12 additions and 2 deletions

View File

@ -298,7 +298,7 @@ import { FsIcon } from "@fast-crud/fast-crud";
import { useSettingStore } from "/@/store/settings"; import { useSettingStore } from "/@/store/settings";
import { useUserStore } from "/@/store/user"; import { useUserStore } from "/@/store/user";
import TaskShortcuts from "./component/shortcut/task-shortcuts.vue"; import TaskShortcuts from "./component/shortcut/task-shortcuts.vue";
import { eachSteps, findStep } from "../utils"; import { eachSteps, findStep, eachStages } from "../utils";
import { usePluginStore } from "/@/store/plugin"; import { usePluginStore } from "/@/store/plugin";
import { getCronNextTimes } from "/@/components/cron-editor/utils"; import { getCronNextTimes } from "/@/components/cron-editor/utils";
import { useCertViewer } from "/@/views/certd/pipeline/use"; import { useCertViewer } from "/@/views/certd/pipeline/use";
@ -381,6 +381,9 @@ export default defineComponent({
// //
currentHistory.value = null; currentHistory.value = null;
pipeline.value = cloneDeep(currentPipeline.value); pipeline.value = cloneDeep(currentPipeline.value);
eachStages(pipeline.value.stages, item => {
item.status = null;
});
return; return;
} }
currentHistory.value = history; currentHistory.value = history;

View File

@ -15,6 +15,7 @@ import {EmailService} from '../../../modules/basic/service/email-service.js';
import {http, HttpRequestConfig, logger, mergeUtils, utils} from '@certd/basic'; import {http, HttpRequestConfig, logger, mergeUtils, utils} from '@certd/basic';
import {NotificationService} from '../../../modules/pipeline/service/notification-service.js'; import {NotificationService} from '../../../modules/pipeline/service/notification-service.js';
import {TaskServiceBuilder} from "../../../modules/pipeline/service/getter/task-service-getter.js"; import {TaskServiceBuilder} from "../../../modules/pipeline/service/getter/task-service-getter.js";
import { cloneDeep } from 'lodash-es';
@Provide() @Provide()
@Controller('/api/pi/handle') @Controller('/api/pi/handle')
@ -103,6 +104,7 @@ export class HandleController extends BaseController {
const taskCtx: TaskInstanceContext = { const taskCtx: TaskInstanceContext = {
pipeline: undefined, pipeline: undefined,
step: undefined, step: undefined,
define: cloneDeep( pluginDefine.define),
lastStatus: undefined, lastStatus: undefined,
http, http,
download, download,

View File

@ -97,7 +97,12 @@ export class UploadCertToAliyun extends AbstractTaskPlugin {
logger: this.logger, logger: this.logger,
endpoint, endpoint,
}); });
const certName = this.buildCertName(CertReader.getMainDomain(this.cert.crt)) let certName = ""
if (this.name){
certName = this.appendTimeSuffix(this.name)
}else{
certName = this.buildCertName(CertReader.getMainDomain(this.cert.crt))
}
this.aliyunCertId = await client.uploadCert({ this.aliyunCertId = await client.uploadCert({
name: certName, name: certName,
cert: this.cert, cert: this.cert,