-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Descend from alps (typespec apiview) (#31656)
* typespec apiview & get changed filse * file checkpoint * revert change * temp save * initial * testing * telem aroudn impacted typespec * fix get impacted typespec * change swagger into typespec * resource provider * out null * new item force * telem artifacts dir * telem * telem * Fix file path for artifacts * Fix file path for artifacts * Fix file path for artifacts * Syntax * Syntax * shorten dir path * cleanup * readme variables rename * pr udpate: function name chanage + remove tspconfig as changed file * Update eng/scripts/Create-APIView.ps1 Co-authored-by: Mike Harder <mharder@microsoft.com> * add testing to contoso manager * targetting staging * adding scenario for new project without baseline * npm ci at earlier stage * syntax * fix baseline path * Add trailing newline * Update eng/pipelines/typespec-apiview.yml Co-authored-by: Ben Broderick Phillips <ben@benbp.net> * spelling * Update eng/scripts/Create-APIView.ps1 Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com> * remove get ipmacted typespec * error check * add ignore core * spelling * try finally for git checkout * print out npx command * Update eng/pipelines/typespec-apiview.yml * comment * Update specification/contosowidgetmanager/Contoso.Management/employee.tsp * in case typespec folder is empty * test * remove test * create typeSpecAPIViewArtifactsDirectory * test * remove test * Update eng/scripts/Get-TypeSpec-Folders.ps1 * test * remove test * include all pr as trigger * test * remove test --------- Co-authored-by: Mike Harder <mharder@microsoft.com> Co-authored-by: Ben Broderick Phillips <ben@benbp.net> Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
- Loading branch information
1 parent
686e46e
commit faebe07
Showing
4 changed files
with
214 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
parameters: | ||
- name: APIViewArtifactsDirectoryName | ||
type: string | ||
default: 'TypespecAPIViewArtifacts' | ||
- name: APIViewArtifactsName | ||
type: string | ||
default: 'typeSpecAPIViewArtifacts' | ||
- name: APIViewAPIUri | ||
type: string | ||
default: 'https://apiview.dev/PullRequest/DetectAPIChanges' | ||
# Please use 'https://apiviewstagingtest.com/PullRequest/DetectAPIChanges' for testing purposes | ||
|
||
jobs: | ||
- job: | ||
pool: | ||
name: azsdk-pool-mms-ubuntu-2204-general | ||
vmImage: ubuntu-22.04 | ||
|
||
steps: | ||
- checkout: self | ||
fetchDepth: 0 | ||
|
||
- template: /eng/pipelines/templates/steps/npm-install.yml | ||
|
||
- pwsh: | | ||
. $(Build.SourcesDirectory)/eng/scripts/Create-APIView.ps1 | ||
New-TypeSpecAPIViewTokens ` | ||
-TempDirectory "$(Agent.TempDirectory)" ` | ||
-ArtifactsStagingDirectory "$(Build.ArtifactStagingDirectory)" ` | ||
-APIViewArtifactsDirectoryName "${{ parameters.APIViewArtifactsDirectoryName }}" | ||
displayName: Generate TypeSpec APIView Tokens | ||
- task: PublishPipelineArtifact@1 | ||
inputs: | ||
targetPath: '$(Build.ArtifactStagingDirectory)/${{ parameters.APIViewArtifactsDirectoryName }}' | ||
artifactName: '${{ parameters.APIViewArtifactsName }}' | ||
publishLocation: 'pipeline' | ||
displayName: 'Publish TypeSpec APIView Artifacts' | ||
condition: and(succeeded(), ne(variables['Agent.JobStatus'], 'SucceededWithIssues')) | ||
|
||
- pwsh: | | ||
. $(Build.SourcesDirectory)/eng/scripts/Create-APIView.ps1 | ||
New-RestSpecsAPIViewReviews ` | ||
-ArtiFactsStagingDirectory $(Build.ArtifactStagingDirectory) ` | ||
-APIViewArtifactsDirectoryName ${{ parameters.APIViewArtifactsDirectoryName }} ` | ||
-APIViewArtifactsName ${{ parameters.APIViewArtifactsName }} ` | ||
-APIViewUri ${{ parameters.APIViewAPIUri }} ` | ||
-BuildId $(Build.BuildId) ` | ||
-RepoName $(Build.Repository.Name) ` | ||
-PullRequestNumber $(System.PullRequest.PullRequestNumber)` | ||
-Language 'TypeSpec' ` | ||
-CommitSha $(Build.SourceVersion) | ||
displayName: Create TypeSpec APIView | ||
condition: and(succeeded(), ne(variables['Agent.JobStatus'], 'SucceededWithIssues')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters