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

Generate test certificates in pipeline #4747

Merged
merged 4 commits into from
Aug 22, 2024
Merged

Generate test certificates in pipeline #4747

merged 4 commits into from
Aug 22, 2024

Conversation

florelis
Copy link
Member

@florelis florelis commented Aug 21, 2024

The tests use test certificates for codesigning and for HTTPS with the localhost server. These test certificates were stored as secure files in the pipelines.

This PR changes the test pipeline to generate the certificates on each run so that we don't need to create new certificates when they expire, or if we want to recreate the pipelines in a different ADO account.

  • Added pipeline steps to create/install the test certificates for codesigning and HTTPS. The scripts export the path and password (a GUID) as pipeline variables for use in subsequent tasks
  • The E2E setup is removed from the build job, and now is only performed in the test job. This way, we don't have to preserve the certificate and its password as an artifact between jobs.
  • Removed unnecessary BinSkim task (already included in official pipelines)
  • Standardized the location of all test installers used for E2E tests to a single folder in the artifacts (before they are used to create the local index)
  • Removed unused certificates from the code (unrelated to the ones being replaced)
  • Updated hash tests that were using the existing certificates to use a different file, as the cert is no longer constant
  • Added collection of the logs from the localhost server and index creation; this requires stopping the server after it is used
  • Updated test execution to use path to the local index used in the test job, instead of one from the build artifacts
Microsoft Reviewers: Open in CodeFlow

@florelis florelis requested a review from a team as a code owner August 21, 2024 05:01
@florelis florelis merged commit 57c22c5 into master Aug 22, 2024
9 of 13 checks passed
@florelis florelis deleted the testcerts branch August 22, 2024 17:31
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.

2 participants