pantheon-cli automates Red Hat Pantheon docs publishing operations: listing titles, updating build configurations, triggering rebuilds, and publishing releases.
-
Kerberos ticket — SSO authentication uses Kerberos SPNEGO. Obtain a ticket before running:
kinit your-id@REDHAT.COM
Verify with
klist. The ticket typically lasts 10 hours. -
VPN — Requires Red Hat VPN for access to
pantheon.cee.redhat.comandreef.corp.redhat.com. -
Playwright Firefox — Installed automatically by
setup.sh. If needed manually:cd <clone-dir> venv/bin/playwright install firefox
-
SSO_EMAIL — Set in
.env. This email is used for the SSO login form.
Pantheon uses SAML SSO backed by Kerberos. The script:
- Launches Firefox with Kerberos SPNEGO enabled (
network.negotiate-auth.trusted-uris: .redhat.com) - Navigates to Pantheon, clicks Login
- Redirects to
sso.redhat.com, enters your email, clicks "Log in with company single sign-on" - Kerberos auto-completes the authentication
- Redirects back to Pantheon with a session cookie
The browser session is persisted at /tmp/pantheon-session/ so subsequent runs reuse the auth. Use --fresh to clear it.
A TrustArc cookie consent overlay can block UI interactions. The script force-removes it via JavaScript.
pantheon-cli list --version 1.9
pantheon-cli list --version 1.9 --title "Customizing"
pantheon-cli list --version 1.10 --product red_hat_developer_hubShows all titles with their job states, branches, and content directories.
# Dry run (default) — shows what would change
pantheon-cli update --version 1.9 --env preview --branch release-1.10
# Execute
pantheon-cli update --version 1.9 --env preview --branch release-1.10 --exec
# Change branch + directory for a specific title, enable, and rebuild
pantheon-cli update --version 1.9 --title "Customizing" --env preview \
--branch release-1.10 --directory titles/configure_customizing-rhdh \
--enable --rebuild --execOptions:
--branch BRANCH— Target git branch--directory DIR— Content directory (keeps current if omitted)--enable— Enable disabled jobs--rebuild— Trigger rebuild after config change
# Dry run
pantheon-cli rebuild --version 1.9 --env preview
# Rebuild all, enabling disabled jobs first
pantheon-cli rebuild --version 1.9 --env preview --enable --exec
# Rebuild one title and wait for completion
pantheon-cli rebuild --version 1.9 --title "About" --env preview --exec --wait
# Custom timeout (seconds)
pantheon-cli rebuild --version 1.9 --env preview --exec --wait --timeout 600# Dry run — show disabled stage jobs
pantheon-cli publish --version 1.9
# Enable all stage jobs
pantheon-cli publish --version 1.9 --exec
# Enable and rebuild
pantheon-cli publish --version 1.9 --exec --rebuild-first --wait| Option | Default | Description |
|---|---|---|
--product |
red_hat_developer_hub |
Pantheon product slug |
--version |
(required) | Product version |
--env |
preview |
Environment: preview or stage |
--title |
all | Substring filter (repeatable, OR) |
--exec |
off | Execute changes (default is dry-run) |
--fresh |
off | Clear session, re-authenticate |
--email |
from SSO_EMAIL |
SSO email override |
The script drives a real Firefox browser via Playwright to interact with Pantheon's AngularJS frontend. All data operations go through the Reef API (reef.corp.redhat.com/api) via XHR calls executed in the browser context.
Write operations use Angular's reefService, injected via:
angular.element(document.body).injector().get('reefService')| Method | Signature | Notes |
|---|---|---|
updateTitleEnvBuildConfig |
(uuid, lang, env, {branch, content_directory, content_type}) |
Update API uses snake_case fields |
toggleJenkinsJob |
(name, disabled) |
disabled is boolean: false = enable, true = disable |
startJenkinsJob |
({jobName: name}) |
Takes job name as object property |
- snake_case vs camelCase: The update API expects
content_directoryandcontent_type(snake_case), but GET responses returncontentDirectoryandcontentType(camelCase). - TrustArc overlay: A cookie consent overlay from
consent-pref.trustarc.comblocks UI clicks. The script removes it viadocument.querySelectorAll('[class*="truste"]').forEach(e => e.remove()). - Session expiry: The persistent session at
/tmp/pantheon-session/may expire. Use--freshto force re-authentication. - Headless mode: Kerberos SPNEGO requires a headed browser. The script always runs headed.
- Verification lag: After updating a build config, the GET endpoint may return stale data for a few seconds.