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

Support setting custom HTTPS certification paths from environment variables #6479

Merged
merged 3 commits into from
Aug 14, 2024

Conversation

petebacondarwin
Copy link
Contributor

@petebacondarwin petebacondarwin commented Aug 13, 2024

What this PR solves / how to test

(Note that there are two auxiliary commits in this PR, which can be reviewed independently.)

Fixes #5997

Author has addressed the following

  • Tests
    • TODO (before merge)
    • Included
    • Not necessary because:
  • E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required / Maybe required
    • Not required because: is not tested in e2e tests
  • Changeset (Changeset guidelines)
    • TODO (before merge)
    • Included
    • Not necessary because:
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Not necessary because: environment variables like this are not generally documented.

…nment variables

As well as providing paths to custom HTTPS certificate files, it is now possible to use WRANGLER_HTTPS_KEY_PATH and WRANGLER_HTTPS_CERT_PATH environment variables.

Specifying the file paths at the command line overrides specifying in environment variables.

Fixes #5997
…n Wrangler tests

This helper from Vitest will automatically revert to the original process.env values after each test.
@petebacondarwin petebacondarwin requested review from a team as code owners August 13, 2024 10:50
Copy link

changeset-bot bot commented Aug 13, 2024

🦋 Changeset detected

Latest commit: 4ef97ed

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
wrangler Minor
@cloudflare/vitest-pool-workers Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368361203/npm-package-wrangler-6479

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/6479/npm-package-wrangler-6479

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368361203/npm-package-wrangler-6479 dev path/to/script.js
Additional artifacts:
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368361203/npm-package-create-cloudflare-6479 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368361203/npm-package-cloudflare-kv-asset-handler-6479
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368361203/npm-package-miniflare-6479
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368361203/npm-package-cloudflare-pages-shared-6479
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368361203/npm-package-cloudflare-vitest-pool-workers-6479
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368361203/npm-package-cloudflare-workers-editor-shared-6479
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10368361203/npm-package-cloudflare-workers-shared-6479

Note that these links will no longer work once the GitHub Actions artifact expires.


wrangler@3.70.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240806.0
workerd 1.20240806.0 1.20240806.0
workerd --version 1.20240806.0 2024-08-06

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

@petebacondarwin petebacondarwin added the e2e Run e2e tests on a PR label Aug 13, 2024
Copy link
Contributor

@CarmenPopoviciu CarmenPopoviciu left a comment

Choose a reason for hiding this comment

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

really nice one Pete! Thank you for working on this <3

@petebacondarwin petebacondarwin merged commit 3c24d84 into main Aug 14, 2024
25 checks passed
@petebacondarwin petebacondarwin deleted the https-cert-from-env-issue-5997 branch August 14, 2024 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e Run e2e tests on a PR
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

🚀 Feature Request: Load dev https certificate and key from environment variables
2 participants