diff --git a/src/apis/actions.ts b/src/apis/actions.ts index 3326dbe..3987394 100644 --- a/src/apis/actions.ts +++ b/src/apis/actions.ts @@ -47,6 +47,7 @@ function createCodingCIJobReq({ depotId, envs = [], pipeline, + useCITemp = false, }: CreateCodingCIJobOptions): CreateCodingCIJobRequest { if (!pipeline) { pipeline = new Pipeline(); @@ -56,9 +57,16 @@ function createCodingCIJobReq({ let steps = stage.addSteps(); steps.addShell('env'); steps.addShell('date'); - steps.addShell('echo TENCENT_SECRET_ID=$TENCENT_SECRET_ID > .env'); - steps.addShell('echo TENCENT_SECRET_KEY=$TENCENT_SECRET_KEY >> .env'); - steps.addShell('echo TENCENT_TOKEN=$TENCENT_TOKEN >> .env'); + if (useCITemp) { + 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'); + } else { + steps.addShell('echo TENCENT_SECRET_ID=$TENCENT_SECRET_ID > .env'); + steps.addShell('echo TENCENT_SECRET_KEY=$TENCENT_SECRET_KEY >> .env'); + steps.addShell('echo TENCENT_TOKEN=$TENCENT_TOKEN >> .env'); + } + steps.addShell('echo SERVERLESS_PLATFORM_VENDOR=tencent >> .env'); steps.addShell('echo SERVERLESS_PLATFORM_STAGE=$SERVERLESS_PLATFORM_STAGE >> .env'); diff --git a/src/apis/index.ts b/src/apis/index.ts index 9f06b1c..fa12563 100644 --- a/src/apis/index.ts +++ b/src/apis/index.ts @@ -29,7 +29,7 @@ async function request(capi: Capi, options: RequestOptions): Promise