Skip to content

chore: add devhub-environment input to just-nuts workflows @W-24095410@ - #2914

Merged
WillieRuemmele merged 4 commits into
mainfrom
wr/jwtbat-just-nuts
Sep 10, 2026
Merged

chore: add devhub-environment input to just-nuts workflows @W-24095410@#2914
WillieRuemmele merged 4 commits into
mainfrom
wr/jwtbat-just-nuts

Conversation

@WillieRuemmele

@WillieRuemmele WillieRuemmele commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds an optional devhub-environment input to just-nut.yml and just-nuts.yml
  • When specified, the job runs under that GitHub Environment, whose secrets override the default org-level TESTKIT_* credentials
  • When unspecified (default), behavior is identical to today — org-level secrets resolve as always

Why

@W-24095410@ — We need to run NUTs against different devhub configurations (e.g., a connected app with JWT-based access tokens enabled) without swapping org-level secrets and remembering to revert.

Previously, the only way to change which org NUTs authenticate against was to overwrite the org-level TESTKIT_AUTH_URL / TESTKIT_JWT_* secrets — risky, not reversible without backups, and affects all workflows.

How it works

  1. Create a GitHub Environment (e.g., devhub-gs0-jwt) at repo Settings > Environments
  2. Add only the secrets that differ (client ID, key, username, instance) — everything else falls through to org-level
  3. Pass the environment name when triggering:
    gh workflow run just-nuts.yml -f channel-or-version=nightly -f devhub-environment=devhub-gs0-jwt

Test plan

  • Run just-nuts with no devhub-environment — should behave identically to today
  • Create a devhub-gs0-jwt environment with GS0 JWT credentials
  • Run just-nuts with -f devhub-environment=devhub-gs0-jwt — should use environment secrets
  • Verify NUTs that use streaming/CometD fail with JWT tokens (confirming the environment override works)

Temporarily disables TESTKIT_JWT_CLIENT_ID, TESTKIT_JWT_KEY, and
TESTKIT_HUB_INSTANCE env vars so the testkit falls through to
AUTH_URL strategy. This forces NUTs to authenticate through the
connected app with JWT-based access tokens enabled, surfacing
endpoints that reject JWT tokens (e.g., Streaming/CometD 403).

W-24095410
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

This PR lacks any commits of the 'fix' or 'feat' type, and therefore will not trigger a release. To silence all further warnings, react to this warning comment (or any other) with the 👀 emoji.

NOTE: If your repo uses squash commits, make sure to add the appropriate conventional commit prefix (e.g., 'fix:', 'feat:', 'chore:', etc) in the squash commit message.

Adds an optional `devhub-environment` input to just-nut.yml and
just-nuts.yml that selects a GitHub Environment whose secrets
override the default TESTKIT_* credentials. When unspecified,
behavior is identical to today (org-level secrets).

This enables testing NUTs against different devhub configurations
(e.g., JWT-based access tokens) without swapping org-level secrets.

W-24095410
@WillieRuemmele WillieRuemmele changed the title chore: disable JWT auth in just-nuts to test JWTBAT chore: add devhub-environment input to just-nuts workflows Sep 8, 2026
@WillieRuemmele WillieRuemmele changed the title chore: add devhub-environment input to just-nuts workflows chore: add devhub-environment input to just-nuts workflows @W-24095410@ Sep 8, 2026
@WillieRuemmele
WillieRuemmele marked this pull request as ready for review September 8, 2026 19:36
@WillieRuemmele
WillieRuemmele had a problem deploying to GS0 - gs0_dev_hub_20210415 September 8, 2026 19:42 — with GitHub Actions Failure
@WillieRuemmele
WillieRuemmele temporarily deployed to GS0 - gs0_dev_hub_20210415 September 8, 2026 19:42 — with GitHub Actions Inactive
@WillieRuemmele
WillieRuemmele temporarily deployed to GS0 - gs0_dev_hub_20210415 September 8, 2026 19:42 — with GitHub Actions Inactive
@WillieRuemmele
WillieRuemmele temporarily deployed to GS0 - gs0_dev_hub_20210415 September 8, 2026 19:42 — with GitHub Actions Inactive
@WillieRuemmele
WillieRuemmele temporarily deployed to GS0 - gs0_dev_hub_20210415 September 8, 2026 19:42 — with GitHub Actions Inactive
@WillieRuemmele
WillieRuemmele had a problem deploying to GS0 - gs0_dev_hub_20210415 September 8, 2026 19:42 — with GitHub Actions Failure
@WillieRuemmele
WillieRuemmele temporarily deployed to GS0 - gs0_dev_hub_20210415 September 8, 2026 19:42 — with GitHub Actions Inactive
iowillhoit
iowillhoit previously approved these changes Sep 8, 2026
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