From d39614c0c7511701d3d431f37824a79cf40b561e Mon Sep 17 00:00:00 2001 From: Veaceslav <118342408+vCaisim@users.noreply.github.com> Date: Fri, 11 Oct 2024 13:55:15 +0300 Subject: [PATCH] feat: add previousCiBuildId to run creation --- packages/cypress-cloud/lib/api/types/run.ts | 1 + packages/cypress-cloud/lib/run.ts | 1 + turbo.json | 1 + 3 files changed, 3 insertions(+) diff --git a/packages/cypress-cloud/lib/api/types/run.ts b/packages/cypress-cloud/lib/api/types/run.ts index f6b33515..8a8a6fff 100644 --- a/packages/cypress-cloud/lib/api/types/run.ts +++ b/packages/cypress-cloud/lib/api/types/run.ts @@ -24,6 +24,7 @@ export type CreateRunPayload = { batchSize?: number; autoCancelAfterFailures: ValidatedCurrentsParameters["autoCancelAfterFailures"]; coverageEnabled?: boolean; + previousCiBuildId?: string; }; export type CloudWarning = { diff --git a/packages/cypress-cloud/lib/run.ts b/packages/cypress-cloud/lib/run.ts index 1610f160..ed118aa9 100644 --- a/packages/cypress-cloud/lib/run.ts +++ b/packages/cypress-cloud/lib/run.ts @@ -109,6 +109,7 @@ export async function run(params: CurrentsRunParameters = {}) { batchSize, autoCancelAfterFailures, coverageEnabled: experimentalCoverageRecording, + previousCiBuildId: process.env.CURRENTS_PREVIOUS_CI_BUILD_ID, }); setRunId(run.runId); diff --git a/turbo.json b/turbo.json index 104c23a2..a560ccbb 100644 --- a/turbo.json +++ b/turbo.json @@ -16,6 +16,7 @@ "CURRENTS_PROJECT_ID", "CURRENTS_API_URL", "CURRENTS_RECORD_KEY", + "CURRENTS_PREVIOUS_CI_BUILD_ID", "TF_BUILD", "TF_BUILD_BUILDNUMBER", "AZURE_HTTP_USER_AGENT",