Commit Graph

468 Commits

Author SHA1 Message Date
João Moreno
d2f1f7ce97 Inline Compile & CompileCLI stages into platform specific jobs (#296006)
* chore: ralph loop checkpoint - 2026-02-17 12:48

* fix shell script

* Inline compile stage into platform jobs

Remove the standalone Compile stage from the ADO pipeline. Each
platform job (Windows, Linux, macOS, Alpine, Web) now compiles
TypeScript itself instead of downloading a shared Compilation artifact.

- Add VSCODE_RUN_CHECKS parameter to Linux jobs for hygiene/lint/CG
- Add VSCODE_RUN_COMPILE_EXTRAS parameter to macOS jobs for telemetry
  extraction and sourcemap upload
- Remove VSCODE_COMPILE_ONLY parameter entirely
- Delete product-compile.yml (no longer referenced)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Always run telemetry extraction on macOS builds

The macOS Universal app merge requires both x64 and arm64 builds to have
identical file sets. Telemetry extraction was only running on arm64 (via
VSCODE_RUN_COMPILE_EXTRAS), causing the universal merge to fail due to
missing telemetry-core.json and telemetry-extensions.json in the x64 build.

Move telemetry extraction outside the VSCODE_RUN_COMPILE_EXTRAS gate so
it runs on all macOS builds. Sourcemap upload remains gated.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Run telemetry extraction on all client builds

All client builds (Linux, Windows, macOS) need telemetry-core.json and
telemetry-extensions.json. Previously only macOS arm64 ran extract-telemetry.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Only run telemetry extraction on Linux x64 (client build)

Linux arm64 and armhf are server-only builds, no need for telemetry files.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Remove .ralph scaffolding files

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix telemetry extraction on Windows with native PowerShell

The bash extract-telemetry.sh script fails on Windows because the Unix
bin shim gets interpreted as Node.js code. Use a native PowerShell
implementation that calls the extractor JS entry point directly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Handle missing telemetry files gracefully on Windows

The telemetry extractor may skip emitting declarations-resolved.json
when no events are found. Handle this case with a warning instead of
failing the build.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Use deterministic build date from git commit timestamp

When each platform compiles independently, the build date embedded in
cli.js (via INSERT_PRODUCT_CONFIGURATION) differs between machines
because each uses new Date().toISOString(). This causes the macOS
Universal app merge to fail since cli.js SHA differs between x64/arm64.

Fix: use the git commit date (git log -1 --format=%cI HEAD) instead
of the current wall-clock time. This ensures all independent builds
on different machines produce identical timestamps.

Updated in:
- build/lib/date.ts: writeISODate() uses git commit date
- build/next/index.ts: bundle(), transpile, and readISODate fallback
  all use git commit date

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Remove redundant extensions-ci task from CI pipelines

core-ci (esbuild path) already includes cleanExtensionsBuildTask,
compileNonNativeExtensionsBuildTask, and compileExtensionMediaBuildTask.
Running extensions-ci in parallel caused a race condition where
core-ci's rimraf of .build/extensions clashed with extensions-ci
writing to the same directory.

Also removes dead code:
- extensions-ci and extensions-ci-pr task definitions (fully subsumed)
- core-ci-old task (useEsbuildTranspile is always true)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* remove VSCODE_RUN_COMPILE_EXTRAS

* address PR feedback regarding code duplication of `getGitCommitDate()` function by exporting a single helper function from `build/lib/date.ts` and importing it in `build/next/index.ts` to ensure consistent behavior and improve code maintainability.

* update readISODate function to return git commit date instead of current date

* add telemetry sorting script and integrate into build process for consistent output

* refactor telemetry extraction process: replace shell script with TypeScript implementation

* update skill

* update telemetry-extractor dependency to version 1.19.0

* fix build

* fix more duplicate telemetry definition issues

* cleanup

* refactor: consolidate validation checks into quality checks and remove obsolete tasks

* bust the cache

* undo cache bust

* fix expression

* fix

* fix: update Azure storage account name in quality checks

* fix: initialize stages set with 'Quality'

* fix: add VSCODE_BUILD_TYPE parameter with options for Product and CI builds

* fix: update Azure Pipeline CLI to use parameters instead of variables for queueing builds

* fix: update VSCODE_BUILD_TYPE parameter values for clarity

* fix: update default value for VSCODE_BUILD_TYPE parameter to 'Product'

* leaner

* even leaner

* only npm ci in build

* 💄

* run entire npm ci

* fix

* fix

* fix it

* Inline CompileCLI into platform stages

- Remove centralized CompileCLI stage
- Move CLI jobs into Windows, Linux, macOS stages as independent jobs
- CLI jobs now compile, publish unsigned mid-job, sign, and publish signed
- Platform compile jobs use deemon + waitForArtifacts for async CLI download
- Delete separate CLI sign jobs (now merged into CLI compile jobs)
- Remove CompileCLI from publish.ts stage tracking

* fix: macOS CLI signing - use proper directory structure for ESRP

* fix: add BUILDS_API_URL to Windows and Linux job templates

* fix: label Linux CLI jobs clearly

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: João Moreno <22350+joaomoreno@users.noreply.github.com>
2026-03-01 08:48:08 +01:00
Robo
61a6cf5929 refactor: pull dmgbuild from repo (#291949)
* refactor: pull dmgbuild from repo

* ci: update python version

* chore: try with homebrew

* chore: fix binary path
2026-02-20 10:14:11 +01:00
Robo
b3669c244f ci: fix electron download from test steps (#292811)
* ci: fix electron download from test steps

* build: always repackage electron from oss entry scripts
2026-02-04 16:37:20 +01:00
Robo
d0e516655a fix: rename product executable on macOS (#291948)
* fix: rename product executable name on macOS

* chore: update test/automation/src/electron.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: update test/automation/src/electron.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: rename in additional places

* chore: rename in code-perf.js

* chore: create symlink for backwards compatibility

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-03 14:50:21 -08:00
Robo
2c2c45a9b5 ci: skip server codesign for universal (#292475) 2026-02-03 07:03:21 +00:00
Dmitriy Vasyura
8343acba0b Match macOS server entitlements to those used in client builds (#292442) 2026-02-02 19:04:42 -08:00
Dmitriy Vasyura
ed8f9653da Sign macOS server binaries (#291872) 2026-02-02 15:53:33 +01:00
Alex Ross
e0e634e326 Bump macOS test timeout to 90 minutes (#291664)
The owners of this have asked us to try a longer timeout to help them determine if the issues we're seeing are perf degradation or a hang
2026-01-29 17:25:35 +00:00
Robo
0074df9396 fix: update disk badge icons for dmg (#290879)
* fix: update disk badge icons for dmg

* chore: try with code icons as badge

* fix: patch badge icon outside of dmgbuild

Refs https://github.com/dmgbuild/dmgbuild/issues/278
which doesn't work well on macOS 26. We avoid forking
the project in this manner.
2026-01-28 12:03:31 +01:00
Ladislau Szomoru
e3657ad9e3 Engineering - adopt the ACES VMs (#290427) 2026-01-26 16:50:05 +00:00
Robo
0ced11929b feat: add dmg for macOS (#289179)
* feat: add dmg for macOS arm64

* chore: create dmg for all archs

* chore: move zx dependency to build

* fix: invalid condition in universal build

* chore: update background

* fix: publishing universal dmg
2026-01-22 18:21:39 -08:00
Ladislau Szomoru
dd65f0c5ef Engineering - switch from npm-run-all to npm-run-all2 (#284087)
* Introduce compilation error

* Engineering - limit the tasks that we run

* Limit available memory to simulate an OOM

* Try to update the task

* Remove the use of npm-run-all

* Fix script

* Another try

* Try npm-run-all2

* Restore tasks, keep npm-run-all2

* Switch from npm-run-all to npm-run-all2

* Revert changes that were used for testing
2026-01-05 15:49:42 +01:00
Matt Bierner
f0e7fe3775 Convert a few more build scripts to TypeScript
For #277526
2025-11-21 09:26:54 -08:00
Matt Bierner
2648263d3e Run our build scripts directly as typescript (#277567)
* Run our build scripts directly as typescript #277567

Follow up on #276864
For #277526

* Remove a few more ts-node references

* Fix linux and script reference

* Remove `_build-script` ref

* Fix script missing closing quote

* use type only import

* Fix export

* Make sure to run copy-policy-dto

* Make sure we run the copy-policy-dto script

* Enable `verbatimModuleSyntax`

* Pipelines fixes

* Try adding explicit ext to path

* Fix bad edit

* Revert extra `--`

---------

Co-authored-by: João Moreno <joaomoreno@users.noreply.github.com>
2025-11-21 14:56:00 +01:00
João Moreno
911a41f96e Revert "Insider builds should have an auto increasing version number" (#278356)
Revert "Insider builds should have an auto increasing version number (#277497)"

This reverts commit 222fb55dd5.
2025-11-19 15:08:11 +01:00
João Moreno
222fb55dd5 Insider builds should have an auto increasing version number (#277497)
* wip

* more logs

* add bump-insiders-version.yml

* ok give this a try

* fix paths

* missing parameter

* ok

* fix

* fix CI

* hm

* rm

* fix appx version

* fix inno

* whoops

* update insiders version in compile job as well

* thanks @lszomoru
2025-11-17 17:21:33 +01:00
Raymond Zhao
ea01b7e2bb chore: fix SBOM names (#274460) 2025-11-02 14:35:48 +01:00
Matt Bierner
fe8fc75455 Pick up latest TS native preview
Fixes the emit for copyright headers
2025-10-28 09:18:27 -07:00
Paul
d72d6a2424 Generate policy data as JSON (#272368) 2025-10-21 12:48:33 -07:00
Paul
6025703c6a Revert "Generate policy data as JSON" (#272362) 2025-10-20 16:12:10 -07:00
Paul
99c299e880 Generate policy data as JSON (#272018) 2025-10-20 14:38:48 -07:00
Robo
179cd04f2a ci: upload logs from azure test pipeline (#270843) 2025-10-15 09:10:40 +02:00
Ladislau Szomoru
53bbb5267e Engineering - add missing check for macOS CLI job (#269996) 2025-10-06 12:47:04 +02:00
Ladislau Szomoru
4b8bd3cb6f Engineering - refactor product pipeline (#269979) 2025-10-06 11:12:40 +02:00
Ladislau Szomoru
034e8a4bf4 Engineering - add node_modules stage to keep node_modules cache warm (#268839)
* Engineering - scaffold Windows jobs to maintain node_modules cache

* Add agent pool

* No need to extract node_modules

* Delete commented out code

* Add Linux jobs

* Add macOS job

* Add missing condition

* Add Web job

* Remove steps to download compilation output

* Fix condition for the node_modules stage

* Remove parameter

* Add Alpine jobs

* Remove the check to test the stage

* Switch macOS job to x64

* Restore the check for the node_modules stage

* Remove extraction
2025-09-29 13:55:31 +02:00
Ladislau Szomoru
bb58370bb2 Engineering - tweak repository checkout task (#267213)
* Engineering - limit the checkout for the publish and release stages

* Tweak checkout for each job

* Fix path
2025-09-17 16:30:05 +02:00
Ladislau Szomoru
8b03d13e2e Engineering - pipeline improvements (#267130)
* Engineering - try things out

* Use parameters.sbomEnabled instead

* Windows CLI - disable SBOM creation

* macOS CLI - disable SBOM creation

* Remove the isProduction template parameter
2025-09-17 00:05:39 +00:00
Ladislau Szomoru
8e7ae9a3b5 Engineering - mark test artifacts as non-production (#266146)
* Engineering - disable SDL tasks for non-production artifacts

* Engineering - set isProduction for test artifacts
2025-09-11 07:12:40 +00:00
João Moreno
8d7e69612d revert back to official nodejs mirror (#265692)
maybe the issue is gone by now 🤞:
- https://github.com/microsoft/azure-pipelines-tasks/issues/18280
- https://github.com/nodejs/nodejs.org/issues/4495
2025-09-08 17:14:10 +00:00
João Moreno
0ec8ac6438 Check for artifact existence before publishing (#263777)
* Refactor artifact publishing steps to use a common template across all build configurations

* Refactor conditions in publish artifact template

* typo

* whops

* fix msg

* hm
2025-08-29 15:49:34 +02:00
Robo
35173c1de1 Revert "ci: always generate artifact prefix (#263738)" (#263764)
This reverts commit 502526da29.
2025-08-28 08:31:42 +00:00
Robo
502526da29 ci: always generate artifact prefix (#263738) 2025-08-28 07:22:41 +02:00
Ladislau Szomoru
cb596f81ac Engineering - cleanup pull request ADO pipeline (#262276)
* Initial implementation

* Fix indentation
2025-08-19 11:25:14 +02:00
Robo
96c621c1a7 ci: address sha mismatches in unviersal build (#261850)
* ci: fix sha for unsigned client archives

* ci: split package used for signing and universal builds
2025-08-15 19:13:50 +00:00
Matt Bierner
12a275ffe7 Use ts-native to compile our build scripts
There are a few minor differences in output, mostly around formatting/comments. Const enums are also not inlined but that seems fine in these cases
2025-08-06 11:41:52 -07:00
Aman Karmani
5e5fabe435 [engineering] parallelize unzip in product-build-darwin-universal.yml (#257775) 2025-07-28 04:48:36 +00:00
Ladislau Szomoru
1799c2beaa Engineering - refactor codesign scripts (#246459)
* Engineering - consolidate codesign scripts

* Try using a script task

* Switch back to old syntax

* Bump deemon
2025-04-14 09:13:45 +02:00
Ladislau Szomoru
5d1942a398 Engineering - refactor macOS stage (#246059)
* WIP - fold sign steps into the jobs

* Speed up compilation

* Add back tasks

* Remove tasks that are not needed

* Update folder

* Fix universal job

* More work

* Improve script

* Improve logging

* More logging tweaks

* Another fix for the script

* Add back CLI job and run tests

* Fix pipeline condition

* Move testing to the ARM64 stage

* Update Codesign task names

* Run tests after publishing unsigned packages

* Background codesign

* Use bash when running background signing

* Another attempt

* Add error handling to script

* Add more logging

* .

* Pull request feedback

* More feedback

* Remove signature verification condition

* Delete tasks that are not needed

* Fix task display name

* Use VSCODE_ARCH parameter

* Update task display name
2025-04-09 11:22:35 +00:00
Ladislau Szomoru
5631ffb317 Engineering - update test task display name (#245847) 2025-04-07 10:44:58 +02:00
Ladislau Szomoru
43a584662c Engineering - add macOS coverage to PR pipeline (#245531) 2025-04-04 09:25:28 +02:00
Ladislau Szomoru
5f65e5f6e9 Engineering - run tests based on target (#245367) 2025-04-03 06:27:23 +00:00
Ladislau Szomoru
d17c002ece Engineering - PR pipeline improvements (#245331) 2025-04-02 18:35:48 +02:00
Ladislau Szomoru
e09d79667b Engineering - switch over to the new build agents (#244964)
* Engineering - switch CLI stage agents

* Update the macOS stage

* Comment out policy generation to unblock

* ensure node modules cache takes agent's arch into account

---------

Co-authored-by: João Moreno <joaomoreno@users.noreply.github.com>
2025-03-31 16:56:23 +02:00
Ladislau Szomoru
f82be6d0f1 Engineering - only run unit tests on Webkit (#244447)
* Engineering - only run unit tests on Webkit

* PR feedback
2025-03-24 12:56:17 +01:00
Josh Spicer
9595934bdb Generate macOS configuration profiles (#241773)
* generate configuration policy and manifests

* add darwin pipeline job

* argument for per-platform generation of policy

* adopt argument in pipeline

* formatting tweaks in generated profile (+ check in .js file)

* tidy up output plists

* copy policy definitions

* implement the remaining renderProfileValue()

* remove unnecessary platform option

* copy to .app in vscode-darwin-$PLATFORM-min-ci gulp task

* add darwinProfileUUID and darwinProfilePayloadUUID to product.json

* better way to package in gulp script

* bump distro commit (c3ec5ba485)

* Add bundles policy paths to macOS universal build 'filesToSkip'

Needs this when creating universal macOS app:

Expected all non-binary files to have identical SHAs when creating a universal build
but "Contents/Resources/app/policies/cs-cz/com.microsoft.VSCodeInsiders.plist" did not

See:
298a872f5f/src/index.ts (L163-L172)
2025-03-13 17:12:25 -07:00
Robo
cad433cd6c ci: debug flaky asset_id step in macOS sign stage (#240558) 2025-02-13 15:54:57 +09:00
Robo
9df979cc9a ci: fix installation of build dependencies (#239290)
* ci: fix installation of build dependencies

* ci: add missing quality parameter
2025-01-31 09:27:39 +00:00
João Moreno
dfe78a1fb9 use WIF for Codesign (#233908)
* use WIF for Codesign

* fix indentation

* fix tasks
2024-11-15 22:16:31 +01:00
João Moreno
0244c5edf7 move to new esrp service connection (#233591) 2024-11-11 12:52:05 -08:00
João Moreno
a46559966e move to new service connection, remove deprecated storage account upload (#233191) 2024-11-06 14:57:38 +01:00