mirror of
https://github.com/certd/certd.git
synced 2026-05-16 05:07:32 +08:00
perf: 密钥备份
This commit is contained in:
@@ -44,6 +44,9 @@ export class StorageService extends BaseService<StorageEntity> {
|
||||
}
|
||||
|
||||
async findPipelineVars(pipelineIds: number[]) {
|
||||
if (pipelineIds == null || pipelineIds.length === 0) {
|
||||
throw new Error('pipelineIds 不能为空');
|
||||
}
|
||||
return await this.repository.find({
|
||||
where: {
|
||||
scope: 'pipeline',
|
||||
@@ -52,4 +55,17 @@ export class StorageService extends BaseService<StorageEntity> {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async getPipelinePrivateVars(pipelineId: number) {
|
||||
if (pipelineId == null) {
|
||||
throw new Error('pipelineId 不能为空');
|
||||
}
|
||||
return await this.repository.find({
|
||||
where: {
|
||||
scope: 'pipeline',
|
||||
namespace: pipelineId + '',
|
||||
key: 'privateVars',
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user