Skip to content

Commit

Permalink
fix: change useCITemp to useCITempAuth
Browse files Browse the repository at this point in the history
  • Loading branch information
yugasun committed Sep 21, 2020
1 parent 504ed49 commit 3d8ec23
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/apis/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function createCodingCIJobReq({
depotId,
envs = [],
pipeline,
useCITemp = false,
useCITempAuth = false,
}: CreateCodingCIJobOptions): CreateCodingCIJobRequest {
if (!pipeline) {
pipeline = new Pipeline();
Expand All @@ -57,7 +57,7 @@ function createCodingCIJobReq({
let steps = stage.addSteps();
steps.addShell('env');
steps.addShell('date');
if (useCITemp) {
if (useCITempAuth) {
steps.addShell('echo TENCENT_SECRET_ID=$TENCENT_TEMP_SECRET_ID > .env');
steps.addShell('echo TENCENT_SECRET_KEY=$TENCENT_TEMP_SECRET_KEY >> .env');
steps.addShell('echo TENCENT_TOKEN=$TENCENT_TEMP_TOKEN >> .env');
Expand Down
8 changes: 6 additions & 2 deletions src/typings/ci-interfaces.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,18 @@ export interface CreateProjectWithTemplateResponse {
* @api CreateCodingCIJob
*/
export interface CreateCodingCIJobOptions {
// 构建计划名称
jobName: string;
// 项目 ID
projectId: number;
// 仓库 ID
depotId?: number;
// 环境变量
envs?: CIJobEnv[];
// for customizing pipeline
// 自定义 pipeline
pipeline?: PipelineInterface;
// 是否使用 CI 提供的临时密钥作为鉴权信息,默认为 false
useCITemp?: boolean;
useCITempAuth?: boolean;
}

export interface CreateCodingCIJobRequest {
Expand Down

0 comments on commit 3d8ec23

Please sign in to comment.