Skip to content

Upload nightly full installers and wire up fastlane tests#3626

Merged
mokagio merged 6 commits into
trunkfrom
ainfra-2434-nightly-cdn-links-for-wordpress-studio-trunk-builds
May 27, 2026
Merged

Upload nightly full installers and wire up fastlane tests#3626
mokagio merged 6 commits into
trunkfrom
ainfra-2434-nightly-cdn-links-for-wordpress-studio-trunk-builds

Conversation

@mokagio
Copy link
Copy Markdown
Contributor

@mokagio mokagio commented May 27, 2026

Related issues

  • AINFRA-2434
  • Companion change required on the backend to enabled to resolving /nightly. Until that lands, the new uploads are silently created but the URL still 404s — this PR is safe to merge before or after.

How AI was used in this PR

Claude (Opus 4.7) wrote the changes after a back-and-forth on visibility semantics and CI gating.
Reviewed and iterated on by the author.

Proposed Changes

  • trunk now uploads full installers (DMG/EXE/APPX) to the Apps CDN.
  • Nightly full installers get visibility: 'internal' (Automatticians only); update binaries stay external so the unauthenticated Electron/Squirrel auto-updater keeps working — see PR #3623.
  • New fastlane Helper Tests CI step.

Testing Instructions

  • Locally: ruby fastlane/test/*_test.rb — all 35 cases pass.
  • trunk verification (after merge): inspect the next trunk Buildkite "Distribute Dev Builds" step — the 🔗 Build available for … annotation should now list DMG/EXE/APPX entries alongside the existing Update entries, and the Mac/Silicon DMGs should appear on appscdn.wordpress.com as Nightly + Internal posts.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors? (N/A — fastlane + CI only.)

mokagio and others added 3 commits May 27, 2026 11:16
Encodes the rule that Nightly full installers are restricted to logged-in
Automatticians (so the planned `/nightly` CDN link only resolves for
internal users), while updates and all Beta/Production builds stay
external.
The helper is unused for now; the Fastfile change that calls it lands in
the next commit so the move and the behavior change stay reviewable
separately.

Tests run with bare `ruby fastlane/test/studio_apps_cdn_upload_test.rb`
(Minitest is stdlib).

Related to AINFRA-2434.

---

Generated with the help of Claude Code, https://claude.ai/code

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Trunk Buildkite builds already produce DMG/EXE/APPX installers; the
`distribute_builds` lane was only uploading the auto-updater payloads
(`.app.zip`, `.nupkg`).
As a result the planned `/nightly` CDN link had nothing installable to
resolve to.

Uploading full installers on every build (not only when `release_tag` is
set) unblocks AINFRA-2434.
Visibility is decided via `StudioAppsCdnUpload.visibility_for`, so
nightly full installs are Internal (Automatticians only) while updates
stay External (the in-app auto-updater is unauthenticated and would
otherwise stop seeing nightly updates).

Related to AINFRA-2434.

---

Generated with the help of Claude Code, https://claude.ai/code

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
App-validation jobs (lint/unit/e2e) treat `fastlane/**` and Gemfile-ish
paths as non-code and skip on fastlane-only PRs — sensible for them, but
it leaves the helper tests under `fastlane/test/` unprotected.

Adds a `fastlane` job type that is the inverse of the existing skip
rules: it runs only when at least one changed file is fastlane/ or Ruby
setup related, via `pr_changed_files --any-match`.
The new pipeline step sits next to Lint, on the Mac queue, and shells
out to `bash` so it doesn't need the script's exec bit.

Related to AINFRA-2434.

---

Generated with the help of Claude Code, https://claude.ai/code

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 27, 2026 01:17
@mokagio mokagio self-assigned this May 27, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Studio’s distribution pipeline to publish nightly full installers (DMG/EXE/APPX) to the Apps CDN, with visibility rules that keep nightly installers internal while preserving external visibility for update payloads. It also adds a dedicated CI step to run the existing Fastlane helper Minitest suite when Fastlane/Ruby-related files change.

Changes:

  • Add a StudioAppsCdnUpload.visibility_for helper to encode Apps CDN visibility rules (nightly full installers internal; everything else external).
  • Update the Fastlane distribute_builds flow to upload full installers on nightly builds and apply the computed visibility per artifact.
  • Add a Buildkite step + command script to run fastlane/test/*_test.rb, gated by a new fastlane job-type in should-skip-job.sh.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
fastlane/lib/studio_apps_cdn_upload.rb Adds a single-purpose helper to determine Apps CDN visibility for a build artifact.
fastlane/test/studio_apps_cdn_upload_test.rb Adds Minitest coverage for the new visibility helper.
fastlane/Fastfile Uploads nightly full installers (in addition to update payloads) and wires visibility via the helper.
.buildkite/pipeline.yml Introduces a “Fastlane Helper Tests” pipeline step.
.buildkite/commands/should-skip-job.sh Adds fastlane job type and related file-match patterns for gating.
.buildkite/commands/run-fastlane-tests.sh Runs Fastlane helper Minitest files, respecting the skip logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .buildkite/commands/should-skip-job.sh Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment thread .buildkite/commands/run-fastlane-tests.sh Outdated
Comment thread .buildkite/commands/run-fastlane-tests.sh Outdated
Comment thread .buildkite/pipeline.yml Outdated
mokagio and others added 2 commits May 27, 2026 11:36
Co-authored-by: Gio Lodi <giovanni.lodi42@gmail.com>
@mokagio mokagio requested review from twstokes and wojtekn May 27, 2026 05:16
@mokagio mokagio merged commit 02b16f9 into trunk May 27, 2026
12 checks passed
@mokagio mokagio deleted the ainfra-2434-nightly-cdn-links-for-wordpress-studio-trunk-builds branch May 27, 2026 23:55
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.

3 participants