Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate e2e-test-cycloud job with Buildmaster #260

Closed
wants to merge 2 commits into from
Closed

Conversation

rgagarinr
Copy link
Contributor

Issue: FEI-6125

Summary:
This draft PR introduces a Cypress Cloud job that runs in parallel with the existing Lambda e2e-test job. It also includes a Mocha implementation for each worker. (Note: The Mocha implementation requires updates with yarn, which can be addressed in a subsequent PR.)

The primary goal is to utilize Jenkins stash functionality to capture and merge all junit reports into a single file, enabling streamlined processing.

@rgagarinr rgagarinr requested a review from a team as a code owner January 22, 2025 19:23

dir('webapp/services/static') {
// We build the secrets first, so that we can create test users in our
// tests.
sh("yarn cypress:secrets");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cc @jeresig -- is this something we need to be doing some other way, now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - this will need to use the new wrapper script I added here: https://github.com/Khan/webapp/pull/28829 good catch! I'm going to be landing the script to master today.

Copy link
Member

@somewhatabstract somewhatabstract Jan 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to call yarn cypress:secrets at all. Secrets are handled internally to the CyCloud runner and passed as environment variables option, rather than a JSON file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, makes sense we can remove this yarn secrets call.

Copy link
Member

@csilvers csilvers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems pretty safe to start off with, I appreciate you being careful about the new job not interfering with the existing job. I want to make sure I understand about the rm first before approving though.

jobs/e2e-test-cycloud.groovy Outdated Show resolved Hide resolved
def resultsDir = "results"; // Directory to store results
def junitFile = "${resultsDir}/junit-${workerId}.xml";

// Ensure the results directory exists
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you also need to clear out any old xml files that might be there?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, thanks! Yeah, we need to clean up the old xml files first to avoid conflicts.

jobs/e2e-test-cycloud.groovy Outdated Show resolved Hide resolved
Comment on lines 178 to 181
"./dev/cypress/e2e/tools/start-cypress-cloud-run.ts",
"--cyConfig baseUrl=\"${E2E_URL}\"",
"--reporter mocha-junit-reporter",
"--reporter-options mochaFile=${junitFile}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: This invocation will need to change. These args aren't supported by the runner and I'm not sure we need to provide them like this. I think most of this can be calculated internally to the code.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition, we're not going to do junit right away. That's a stretch goal once we have things working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants