Skip to content

Commit

Permalink
typespec repository - Upload Manifest file to the new storage accou…
Browse files Browse the repository at this point in the history
…nt (#5336)

In the `cadl-ranch` repository, during the publish process, the CI
publishes the manifest file to the `azuresdkcadlranch` storage account.
You can find the code
[here](https://github.com/Azure/cadl-ranch/blob/main/.azure-pipelines/publish.yml#L35)

With the new Spec Dashboard, the `typespec` repository CI has to publish
the manifest file to the `typespec` storage account. I have tested this
code in CI in my branch. You can find the link
[here](https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4401569&view=logs&j=feeac6a1-95f5-5e4f-b973-2aeaa4cef844).

Please review and approve the PR. Thanks
  • Loading branch information
sarangan12 authored Dec 13, 2024
1 parent b1476de commit 6f6ee2a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
30 changes: 30 additions & 0 deletions eng/tsp-core/pipelines/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,33 @@ extends:
displayName: "Build"
- script: docker push $(imageName) --all-tags
displayName: "Push"

- stage: publish_manifest
displayName: Manifest
dependsOn: build
jobs:
- job: publish_manifest
displayName: Publish Manifest
pool:
name: $(WINDOWSPOOL)
image: $(WINDOWSVMIMAGE)
os: windows
variables:
TYPESPEC_SKIP_DOCUSAURUS_BUILD: true # Disable docusaurus build
steps:
- template: /eng/tsp-core/pipelines/templates/install.yml
- template: /eng/tsp-core/pipelines/templates/build.yml

- script: pnpm run validate-scenarios --debug
displayName: Validate Scenarios

- script: pnpm run validate-mock-apis --debug
displayName: Validate mock apis

- task: AzureCLI@2
displayName: Upload scenario manifest
inputs:
azureSubscription: "TypeSpec Storage"
scriptType: "bash"
scriptLocation: "inlineScript"
inlineScript: "pnpm upload-manifest"
3 changes: 3 additions & 0 deletions packages/spec-dashboard/src/apis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ export async function getCoverageSummaries(): Promise<CoverageSummary[]> {
(manifest: ScenarioManifest) => manifest.setName !== "@azure-tools/azure-http-specs",
)[0];
for (const key in generatorReports["standard"]) {
if (!(generatorReports["standard"] as any)[key]) {
continue;
}
(generatorReports["standard"] as any)[key] = {
...(generatorReports["standard"] as any)[key][0],
generatorMetadata: (generatorReports["standard"] as any)[key]["generatorMetadata"],
Expand Down

0 comments on commit 6f6ee2a

Please sign in to comment.