-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to 1ES-hosted Ubuntu 22.04 in many places
- Loading branch information
Konrad Jamrozik
committed
Dec 21, 2022
1 parent
da27ddb
commit 1007c9c
Showing
41 changed files
with
185 additions
and
181 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,76 @@ | ||
pr: none | ||
|
||
trigger: none | ||
|
||
parameters: | ||
- name: Reviews | ||
type: string | ||
default: '[{"ReviewID":"<reviewid>","RevisionID":"<revisionId>","SourceRepoName":"<RepoName>","FileName":"<fileName>","SourceBranchName":"<SourceBranchName>"}]' | ||
- name: APIViewURL | ||
type: string | ||
default: 'https://apiview.dev' | ||
|
||
pool: | ||
name: azsdk-pool-mms-ubuntu-2004-general | ||
vmImage: MMSUbuntu20.04 | ||
|
||
variables: | ||
NodeVersion: '16.x' | ||
|
||
jobs: | ||
- job: CreateSwaggerReviewCodeFile | ||
displayName: 'Create Swagger API review token file' | ||
|
||
variables: | ||
- template: /eng/pipelines/templates/variables/globals.yml | ||
|
||
steps: | ||
- task: NodeTool@0 | ||
inputs: | ||
versionSpec: $(NodeVersion) | ||
displayName: "Use Node $(NodeVersion)" | ||
|
||
- pwsh: | | ||
$reviews = "${{ parameters.Reviews }}" | ||
Write-Host "Reviews: $($reviews)" | ||
echo "##vso[task.setvariable variable=Reviews]$reviews" | ||
displayName: "Setup Reviews Variable" | ||
condition: eq(variables['Reviews'], '') | ||
- pwsh: | | ||
$url = "${{parameters.APIViewURL}}" | ||
echo "##vso[task.setvariable variable=APIViewURL]$url" | ||
displayName: "Setup APIViewURL Variable" | ||
condition: eq(variables['APIViewURL'], '') | ||
- pwsh: | | ||
npm install -g @cadl-lang/compiler@0.37.0 | ||
npm install -g @azure-tools/cadl-apiview@0.3.0 | ||
npm list -g | ||
displayName: "Install npm packages" | ||
- task: Powershell@2 | ||
displayName: 'Generate APIView Token files' | ||
inputs: | ||
pwsh: true | ||
filePath: $(Build.SourcesDirectory)/eng/scripts/Create-Apiview-Token-Cadl.ps1 | ||
arguments: > | ||
-Reviews "$(Reviews)" | ||
-OutputDir "$(Build.ArtifactStagingDirectory)" | ||
-WorkingDir "$(Pipeline.Workspace)" | ||
-GitPat "$(github-access-token)" | ||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
pathtoPublish: '$(Build.ArtifactStagingDirectory)' | ||
artifactName: 'apiview' | ||
|
||
- task: Powershell@2 | ||
displayName: 'Send Request to APIView to Update Token files' | ||
condition: succeededOrFailed() | ||
inputs: | ||
pwsh: true | ||
filePath: $(Build.SourcesDirectory)/eng/scripts/Apiview-Update-Generated-Review.ps1 | ||
arguments: > | ||
-BuildId $(Build.BuildId) | ||
-ApiviewUpdateUrl "$(APIViewURL)/review/UpdateApiReview" | ||
pr: none | ||
|
||
trigger: none | ||
|
||
parameters: | ||
- name: Reviews | ||
type: string | ||
default: '[{"ReviewID":"<reviewid>","RevisionID":"<revisionId>","SourceRepoName":"<RepoName>","FileName":"<fileName>","SourceBranchName":"<SourceBranchName>"}]' | ||
- name: APIViewURL | ||
type: string | ||
default: 'https://apiview.dev' | ||
|
||
pool: | ||
name: azsdk-pool-mms-ubuntu-2204-general | ||
vmImage: MMSUbuntu22.04 | ||
|
||
variables: | ||
NodeVersion: '16.x' | ||
|
||
jobs: | ||
- job: CreateSwaggerReviewCodeFile | ||
displayName: 'Create Swagger API review token file' | ||
|
||
variables: | ||
- template: /eng/pipelines/templates/variables/globals.yml | ||
|
||
steps: | ||
- task: NodeTool@0 | ||
inputs: | ||
versionSpec: $(NodeVersion) | ||
displayName: "Use Node $(NodeVersion)" | ||
|
||
- pwsh: | | ||
$reviews = "${{ parameters.Reviews }}" | ||
Write-Host "Reviews: $($reviews)" | ||
echo "##vso[task.setvariable variable=Reviews]$reviews" | ||
displayName: "Setup Reviews Variable" | ||
condition: eq(variables['Reviews'], '') | ||
- pwsh: | | ||
$url = "${{parameters.APIViewURL}}" | ||
echo "##vso[task.setvariable variable=APIViewURL]$url" | ||
displayName: "Setup APIViewURL Variable" | ||
condition: eq(variables['APIViewURL'], '') | ||
- pwsh: | | ||
npm install -g @cadl-lang/compiler@0.37.0 | ||
npm install -g @azure-tools/cadl-apiview@0.3.0 | ||
npm list -g | ||
displayName: "Install npm packages" | ||
- task: Powershell@2 | ||
displayName: 'Generate APIView Token files' | ||
inputs: | ||
pwsh: true | ||
filePath: $(Build.SourcesDirectory)/eng/scripts/Create-Apiview-Token-Cadl.ps1 | ||
arguments: > | ||
-Reviews "$(Reviews)" | ||
-OutputDir "$(Build.ArtifactStagingDirectory)" | ||
-WorkingDir "$(Pipeline.Workspace)" | ||
-GitPat "$(github-access-token)" | ||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
pathtoPublish: '$(Build.ArtifactStagingDirectory)' | ||
artifactName: 'apiview' | ||
|
||
- task: Powershell@2 | ||
displayName: 'Send Request to APIView to Update Token files' | ||
condition: succeededOrFailed() | ||
inputs: | ||
pwsh: true | ||
filePath: $(Build.SourcesDirectory)/eng/scripts/Apiview-Update-Generated-Review.ps1 | ||
arguments: > | ||
-BuildId $(Build.BuildId) | ||
-ApiviewUpdateUrl "$(APIViewURL)/review/UpdateApiReview" |
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
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
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
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
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
Oops, something went wrong.