From 34888c55ff2e39c1bfe9544b408dd3f8d6dd18fb Mon Sep 17 00:00:00 2001 From: miguelangaranocurrents <140348970+miguelangaranocurrents@users.noreply.github.com> Date: Thu, 21 Nov 2024 16:23:31 -0500 Subject: [PATCH] feat: added env for machine id (#218) Co-authored-by: miguelangarano --- packages/cypress-cloud/lib/api/types/run.ts | 1 + packages/cypress-cloud/lib/run.ts | 4 ++++ turbo.json | 1 + 3 files changed, 6 insertions(+) diff --git a/packages/cypress-cloud/lib/api/types/run.ts b/packages/cypress-cloud/lib/api/types/run.ts index 8a8a6ff..30d3a6b 100644 --- a/packages/cypress-cloud/lib/api/types/run.ts +++ b/packages/cypress-cloud/lib/api/types/run.ts @@ -25,6 +25,7 @@ export type CreateRunPayload = { autoCancelAfterFailures: ValidatedCurrentsParameters["autoCancelAfterFailures"]; coverageEnabled?: boolean; previousCiBuildId?: string; + providedMachineId?: string; }; export type CloudWarning = { diff --git a/packages/cypress-cloud/lib/run.ts b/packages/cypress-cloud/lib/run.ts index ed118aa..f91dae0 100644 --- a/packages/cypress-cloud/lib/run.ts +++ b/packages/cypress-cloud/lib/run.ts @@ -110,10 +110,14 @@ export async function run(params: CurrentsRunParameters = {}) { autoCancelAfterFailures, coverageEnabled: experimentalCoverageRecording, previousCiBuildId: process.env.CURRENTS_PREVIOUS_CI_BUILD_ID, + providedMachineId: process.env.CURRENTS_MACHINE_ID, }); setRunId(run.runId); info("🎥 Run URL:", bold(run.runUrl)); + process.env.CURRENTS_MACHINE_ID + ? info("🤖 Machine ID:", bold(run.machineId)) + : null; cutInitialOutput(); await startWSS(); diff --git a/turbo.json b/turbo.json index a560ccb..ead9d99 100644 --- a/turbo.json +++ b/turbo.json @@ -17,6 +17,7 @@ "CURRENTS_API_URL", "CURRENTS_RECORD_KEY", "CURRENTS_PREVIOUS_CI_BUILD_ID", + "CURRENTS_MACHINE_ID", "TF_BUILD", "TF_BUILD_BUILDNUMBER", "AZURE_HTTP_USER_AGENT",