Skip to content

VSCE: implement nightly build & automate release

Warren Gifford requested to merge bee/vsce-nightly into main

Created by: abeatrix

Summary

Close https://github.com/sourcegraph/sourcegraph/issues/34205

This PR adds and defines the VSCE_NIGHTLY (vscode: Puppeteer tests for VS Code extension) build to the existing pipeline.

Once this PR is merged, we can then add this to buildkite with the daily schedule setting for it to run daily / nightly.

Massive thanks to @jhchabran for giving me an intro to buildkite and pipeline, and for explaining how the schedule works! 🙇

Current Implementation

  1. Made a commit to the release branch vsce/release in a certain format eg 'minor release'.
  2. This would trigger the pipeline to run the release build
  3. The pipeline will then read the commit and get the release type env based on the commit
  4. Check if the release type is valid, process to the release step if valid
  5. Update changelog by replacing "Next Release" to "Latest Release"
  6. Update package name in package.json to match the name we use in the Marketplace: "soucegraph"
  7. Run the vsce command to publish the extension with the marketplace token stored in our pipeline secret manager https://github.com/sourcegraph/infrastructure/pull/3276
  8. Revert changes made to both package.json and changelog to remain consistency between branches

Future Plans

Update the script so that it would make commits with the changes we made when the pipeline is run.

Test plan

A test build has been created and runs successfully for the nightly build: buildkite link image

For automate release, I have tested the script using vsce package patch instead of vsce publish patch: Confirmed the package is using the correct version number in package.json: image Confirmed the CHANGELOG.md has been updated accordingly: image CHANGLOG looks correct in the marketplace when installed using the package while no changes are made to the original files: image

Merge request reports

Loading