зеркало из https://github.com/dotnet/razor.git
Update insertion doc for vscode (#10482)
This commit is contained in:
Родитель
b4404959b5
Коммит
5790184ca1
|
@ -6,22 +6,21 @@ The C# extension is the shipping vehicle for the VS Code Razor experience, so to
|
|||
|
||||
At a high level inserting involves:
|
||||
|
||||
1. Downloading the right build artifacts from our official CI build
|
||||
2. Uploading a subset of those artifacts to a special folder on a network share
|
||||
3. Running a pipeline to take the folder contents and upload them to a CDN for external consumption
|
||||
4. Doing a pull request to the extension repo to update various download URLs
|
||||
1. Find the version number from CI builds
|
||||
2. Updating the vscode repo and doing a PR by
|
||||
1. Update the version in the `package.json`
|
||||
2. Running `updateRazorVersion` via gulp
|
||||
3. Pushing a PR
|
||||
|
||||
## Permissions
|
||||
|
||||
Before getting started you it should be noted that only Microsoft employees will have the correct access to get the right information to perform and insertion. Details on the permissions required are outlined at this [internal document](https://github.com/dotnet/aspnetcore-internal/blob/main/docs/release/InsertingRazorIntoOmniSharp.md#get-the-permissions-youll-need-later).
|
||||
In order to pull in new packages from upstreams into the msft_consumption feed we use for restoring, you will need to be a member of the 'CSharp VS Code Extension contributors' group in the [Azure Devops instance](https://dev.azure.com/azure-public/vside/_settings/teams). This is the same as needed to [update the Roslyn language server version](https://github.com/dotnet/vscode-csharp/blob/main/CONTRIBUTING.md#updating-the-roslyn-language-server-version).
|
||||
|
||||
## Inserting
|
||||
|
||||
When ready to insert you will follow the steps listed in each below section in order to update the C# extension with the latest Razor assets:
|
||||
|
||||
### Acquire all the pieces to insert
|
||||
|
||||
First you need to locally download and extract the build artifacts that you want to deploy
|
||||
### Find the version to insert
|
||||
|
||||
1. Go to the Razor build you want to insert at https://dev.azure.com/dnceng/internal/_build?definitionId=262
|
||||
|
||||
|
@ -29,75 +28,24 @@ First you need to locally download and extract the build artifacts that you want
|
|||
|
||||
2. Click the "X Artifacts" link from the build information
|
||||
![image](images/build_summary.png)
|
||||
3. Find the **BlobArtifacts** artifact and download it by clicking the `...` menu:
|
||||
- You won't need everything in BlobArtifacts but its much more convenient to download a single file, and you only approximately 7% of the download is unnecessary.
|
||||
|
||||
3. Find the **BlobArtifacts** artifact
|
||||
![image](images/blobartifacts.png)
|
||||
4. Unzip the BlobArtifacts.zip file you end up with and delete any file that doesn't start with "RazorLanguageServer" or "DevKitTelemetry"
|
||||
|
||||
At the end of this process you should have a folder containing 20 files. Rename the folder to the version number, pulled from any one of the file names in the folder.
|
||||
|
||||
![image](images/remaining_files.png)
|
||||
|
||||
### Upload to VS CDN
|
||||
|
||||
1. Wait for the permissions you requested at the top of this document to be accepted.
|
||||
2. Go to the server, and the `release` share, then the `\ddpublish\vscode-razor` folder
|
||||
- For the name of the server, skip to step 4, and you'll see it in the Azure DevOps UI. The actual server name is unimportant, and liable to change, as long as its the one the release pipeline linked below is looking at.
|
||||
3. Upload the entire folder you created above.
|
||||
- Alternatively, create a folder named the version that you'll be publishing, i.e. `7.0.0-preview.23328.2`, and then upload each of the 9 (or 18) zip files you have after the above steps.
|
||||
4. Navigate to the CDN upload [Release Pipeline](https://devdiv.visualstudio.com/DevDiv/_releases2?definitionId=1025&view=mine&_a=releases) and click **Create release** in the top right corner.
|
||||
- **BranchName:** use the format `vscode-razor-{VERSION}` where `{VERSION}` is something like `7.0.0-preview.23328.2`.
|
||||
- **OwnerAliases:** Leave existing aliases, adding your alias(es) in the form `{DOMAIN}\{ALIAS}` where `{ALIAS}` is something like `REDMOND\FNURK` - semicolon delimited, including the single quotes.
|
||||
- **SecuredSharePath:** Replace `<yourPath>` with the full path of the folder you created above in Step 2 of this section.
|
||||
5. Click `Create`
|
||||
6. At the top of the page it should mention that `Release - X` has been created. Click on it.
|
||||
7. When ready to publish, hover over the `Publish Secured Share Environment` box and click the `Deploy` button that appears.
|
||||
8. You'll be prompted for a comment, but it's not necessary. Press 'Deploy'.
|
||||
9. It can take anywhere from 20 mins to 11+ hours for things to deploy and propagate. A deployment completion email is **not** sent.
|
||||
10. Once the "Wait For Publish Completed" stage is done view its logs.
|
||||
11. Click on the `Get Published Link Relationships` log. This will have a section that contains a relationship of file -> CDN URL.
|
||||
|
||||
### Prepare Razor language server URLs
|
||||
|
||||
You should now have 10 lines of text containing `razorlanguageserver` that are in the format:
|
||||
|
||||
```
|
||||
2023-06-29T01:16:17.9751735Z release\DDPublish\vscode-razor\7.0.0-preview.23328.2\RazorLanguageServer-linux-arm64-7.0.0-preview.23328.2.zip -> https://download.visualstudio.microsoft.com/download/pr/51d2bf3c-cb3c-4385-b59f-d4d6c9a96743/c74964f4e130b50f9aef47d430c34a97/razorlanguageserver-linux-arm64-7.0.0-preview.23328.2.zip
|
||||
2023-06-29T01:16:17.9757540Z release\DDPublish\vscode-razor\7.0.0-preview.23328.2\RazorLanguageServer-linux-musl-arm64-7.0.0-preview.23328.2.zip -> https://download.visualstudio.microsoft.com/download/pr/51d2bf3c-cb3c-4385-b59f-d4d6c9a96743/7ad5dd2c8780d3e4eaaafb5352a21afa/razorlanguageserver-linux-musl-arm64-7.0.0-preview.23328.2.zip
|
||||
2023-06-29T01:16:17.9763098Z release\DDPublish\vscode-razor\7.0.0-preview.23328.2\RazorLanguageServer-linux-musl-x64-7.0.0-preview.23328.2.zip -> https://download.visualstudio.microsoft.com/download/pr/51d2bf3c-cb3c-4385-b59f-d4d6c9a96743/c204acfa0fd9d0e06fbcc3aac3ba846e/razorlanguageserver-linux-musl-x64-7.0.0-preview.23328.2.zip
|
||||
2023-06-29T01:16:17.9768735Z release\DDPublish\vscode-razor\7.0.0-preview.23328.2\RazorLanguageServer-linux-x64-7.0.0-preview.23328.2.zip -> https://download.visualstudio.microsoft.com/download/pr/51d2bf3c-cb3c-4385-b59f-d4d6c9a96743/68986857aef04be58efab25ffd338a93/razorlanguageserver-linux-x64-7.0.0-preview.23328.2.zip
|
||||
2023-06-29T01:16:17.9774462Z release\DDPublish\vscode-razor\7.0.0-preview.23328.2\RazorLanguageServer-osx-arm64-7.0.0-preview.23328.2.zip -> https://download.visualstudio.microsoft.com/download/pr/51d2bf3c-cb3c-4385-b59f-d4d6c9a96743/a31700a64049f7c770a525662ef74f3c/razorlanguageserver-osx-arm64-7.0.0-preview.23328.2.zip
|
||||
2023-06-29T01:16:17.9780249Z release\DDPublish\vscode-razor\7.0.0-preview.23328.2\RazorLanguageServer-osx-x64-7.0.0-preview.23328.2.zip -> https://download.visualstudio.microsoft.com/download/pr/51d2bf3c-cb3c-4385-b59f-d4d6c9a96743/d7017a3e07d15f057353ab21b8710714/razorlanguageserver-osx-x64-7.0.0-preview.23328.2.zip
|
||||
2023-06-29T01:16:17.9786564Z release\DDPublish\vscode-razor\7.0.0-preview.23328.2\RazorLanguageServer-PlatformAgnostic-7.0.0-preview.23328.2.zip -> https://download.visualstudio.microsoft.com/download/pr/51d2bf3c-cb3c-4385-b59f-d4d6c9a96743/fca9e77ad09cc54b115bfb8b5e6aaf66/razorlanguageserver-platformagnostic-7.0.0-preview.23328.2.zip
|
||||
2023-06-29T01:16:17.9792213Z release\DDPublish\vscode-razor\7.0.0-preview.23328.2\RazorLanguageServer-win-arm64-7.0.0-preview.23328.2.zip -> https://download.visualstudio.microsoft.com/download/pr/51d2bf3c-cb3c-4385-b59f-d4d6c9a96743/b2aa92ccbdf03761b6783bf123bfbe22/razorlanguageserver-win-arm64-7.0.0-preview.23328.2.zip
|
||||
2023-06-29T01:16:17.9797904Z release\DDPublish\vscode-razor\7.0.0-preview.23328.2\RazorLanguageServer-win-x64-7.0.0-preview.23328.2.zip -> https://download.visualstudio.microsoft.com/download/pr/51d2bf3c-cb3c-4385-b59f-d4d6c9a96743/3b7fc7c2f06e48d78bec2125adcc41aa/razorlanguageserver-win-x64-7.0.0-preview.23328.2.zip
|
||||
```
|
||||
|
||||
You need to put that in your text editor of choice, remove everything but the `https://` URLs, add a comma to the end of every line, then collapse the whole thing down to one line. ie:
|
||||
|
||||
`https://download.visualstudio.microsoft.com/<snip%gt;razorlanguageserver-win-arm64.zip,https://download.visualstudio.microsoft.com/<snip%gt;razorlanguageserver-win-x64.zip`
|
||||
4. Get the version from any nupkg, such as `9.0.0-preview.24311'. They should all be the same version number
|
||||
|
||||
### Update vscode-csharp
|
||||
|
||||
1. Fork the [C# extension repo](https://github.com/dotnet/vscode-csharp) and then clone your fork.
|
||||
- If you already have the repo cloned, ensure that you `git clean -xdf` prior to doing any changes.
|
||||
2. Create a new branch off of `main` unless told otherwise.
|
||||
3. Open the `launch.json` file.
|
||||
4. Find the "Update razor package dependencies" task.
|
||||
5. Paste your list of URLs into the `NEW_DEPS_URLS` environment variable
|
||||
6. Paste the version of the packages into the `NEW_DEPS_VERSION` environment variable
|
||||
7. Run the task
|
||||
8. It takes a while to run, as it has to download and compute hashes for each file, but when finished it will have changed the package.json file.
|
||||
9. Repeat the steps in the previous section and this section, but for Razor DevKit telemetry. The CDN URLs should instead look something like:
|
||||
```
|
||||
2023-06-29T01:16:17.9751735Z release\DDPublish\vscode-razor\7.0.0-preview.23328.2\DevKitTelemetry-linux-arm64-7.0.0-preview.23328.2.zip -> https://download.visualstudio.microsoft.com/download/pr/51d2bf3c-cb3c-4385-b59f-d4d6c9a96743/c74964f4e130b50f9aef47d430c34a97/devkittelemetry-linux-arm64-7.0.0-preview.23328.2.zip
|
||||
```
|
||||
and the task mentioned in the previous section (step 4) is instead "Update razor telemetry package dependencies".
|
||||
|
||||
10. Update `CHANGELOG.md` with the changes from these updates.
|
||||
11. Commit all files, push your branch, and create a PR.
|
||||
3. Open the `package.json` file.
|
||||
4. Find the "defaults.razor" property.
|
||||
5. Update the value of that property to the version you found in the CI build
|
||||
6. Run `npm i' to install tools needed locally
|
||||
7. Run `npx gulp updateRazorDependencies` to download the nuget packages for all platforms and make sure they are available in the downstream nuget feed.
|
||||
- This is the step that will fail if you do not have the correct dependencies. Likely you'll get a 401 from the nuget command trying to pull the packages from upstream.
|
||||
8. Update `CHANGELOG.md` with the changes from these updates.
|
||||
9. Commit all files, push your branch, and create a PR.
|
||||
|
||||
## Testing
|
||||
|
||||
To validate your changes locally, after updating the package.json, make sure you run `gulp installDependencies`, and then run the "Launch Extension" task.
|
||||
To validate your changes locally, after updating the package.json, make sure you run `npx gulp installDependencies`, and then run the "Launch Extension" task.
|
||||
|
|
Загрузка…
Ссылка в новой задаче