Publish standalone CLI bundles to Apps CDN and install from the CDN latest alias#3835
Open
bcotrim wants to merge 8 commits into
Open
Publish standalone CLI bundles to Apps CDN and install from the CDN latest alias#3835bcotrim wants to merge 8 commits into
bcotrim wants to merge 8 commits into
Conversation
Collaborator
📊 Performance Test ResultsComparing b55027b vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issues
WordPress.com Studio CLIApps CDN product)How AI was used in this PR
AI helped map the existing Apps CDN / Fastlane / Buildkite release flow, design the CLI upload to mirror the established PHP CLI binary path, switch the installers to the CDN
latestalias, and verify the work locally (Ruby + YAML syntax, the fastlane helper tests, astudio_cli_cdn_builds/upload dry-run harness, an end-to-endinstall.shbehavior harness, and a real throwaway upload against the production CDN). All changes were reviewed and validated before pushing.Proposed Changes
Makes the standalone Studio CLI available to users without the desktop app, kept current automatically.
WordPress.com Studio CLIproduct), for nightly/dev, beta, and stable alike. The bundles track the app build exactly — same version and visibility — so stable bundles become public at publish time just like the app, and there's no separate step to run.latestalias, so no bespoke redirect service is needed.STUDIO_CLI_VERSIONpins a specific version, andSTUDIO_CLI_URLis retained as a bypass for local builds and mirrors (that path keeps.sha256sidecar verification; the CDN path relies on HTTPS plus a staged-extraction guard, since the CDN exposes the checksum only as build metadata).studio-cli-<platform>-<arch>.tgz(gzipped tar) for all six platform/arch targets.Trade-off / remaining dependency: the
install.sh/install.ps1scripts themselves still need public hosting for thecurl … | bash/irm … | iexentry points (the CDN serves uploaded builds, not arbitrary scripts) — a separate WordPress.com-side task. Until that lands, the CLI is installable via the direct CDN URL orSTUDIO_CLI_URL.Testing Instructions
Fastlane (dry run, no remote side effects):
Confirm it lists the six platform/arch uploads with the right product, platform labels, version, and sha. Existing helper tests still pass:
bash .buildkite/commands/run-fastlane-tests.sh.Real CDN upload (verified): a throwaway
0.0.1/ Internal build was uploaded to the productionWordPress.com Studio CLIproduct via the samemedia/newendpoint the lane posts to — confirming the upload path works and that the.tgzfile type is accepted (see Notes).Installer —
STUDIO_CLI_URLbypass (checksum-verified):Installer — default CDN mode: with bundles published, a fresh install resolves
https://appscdn.wordpress.com/downloads/wordpress-com-studio-cli/<slug>/latest/full-install(e.g.
mac-silicon), andSTUDIO_CLI_VERSION=v1.11.0pins that version.Windows:
install.ps1mirrors the same logic (win32 →windows-x64/windows-arm64). It was validated structurally but needs a real Windows run to confirm (nopwshlocally).Pre-merge Checklist
Notes for reviewers
.tgz, not.tar.gz. The Apps CDN's upload validation (WordPresswp_check_filetype_and_ext) rejects the.tar.gzdouble extension — even thoughgzis allow-listed — while.tgz(same gzip bytes, single extension, already on the CDN's accepted-mime list) uploads cleanly.tar -xzfhandles both identically, so the installers and extraction logic are unchanged.install.shclearscom.apple.quarantinefrom the extracted files. The bundled.nodemodules are unsigned, so a browser-downloaded bundle would otherwise be Gatekeeper-blocked ("library load disallowed by system policy"). Thecurl … | bashpath isn't quarantined, so this is defensive for manual / MDM-managed installs. (Signing + notarizing the macOS bundle is a possible future hardening, tracked separately.)fs-ext-extra-prebuiltships both arches per-OS, and the target Node binary is downloaded per arch. Only cross-OS needs a native runner, which the matrix already provides.create_draft_github_release→make_cdn_builds_publicpath — no change to that logic.