Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions eng/pipelines/templates/steps/apiview-review-gen.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameters:
- name: Reviews
type: string
default: ''
default: ''
- name: APIViewURL
type: string
default: ''
Expand All @@ -16,19 +16,24 @@ parameters:
default: ''

steps:
- task: Powershell@2
- task: AzurePowerShell@5
displayName: 'Generate APIView Token files'
continueOnError: false
inputs:
pwsh: true
filePath: $(Build.SourcesDirectory)/eng/scripts/Create-Apiview-Token-Files.ps1
arguments: >
azureSubscription: 'Azure SDK Engineering System'
ScriptType: 'FilePath'
ScriptPath: $(Build.SourcesDirectory)/eng/scripts/Create-Apiview-Token-Files.ps1
ScriptArguments: >
-ReviewDetailsJson "${{ parameters.Reviews }}"
-StagingPath "$(Build.ArtifactStagingDirectory)"
-WorkingDir "$(Pipeline.Workspace)"
-StorageBaseUrl "${{ parameters.StorageContainerUrl }}"
-ApiviewGenScript "${{ parameters.ApiviewGenScript }}"
-ContainerSas "$(apiview-originals-sas)"
-ParserPath "${{ parameters.ParserPath }}"
azurePowerShellVersion: latestVersion
pwsh: true
env:
AZCOPY_AUTO_LOGIN_TYPE: 'PSCRED'

- task: PublishBuildArtifacts@1
inputs:
Expand Down
4 changes: 1 addition & 3 deletions eng/scripts/Create-Apiview-Token-Files.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ param (
[Parameter(Mandatory = $true)]
[string]$StorageBaseUrl,
[Parameter(Mandatory = $true)]
[string]$ContainerSas,
[Parameter(Mandatory = $true)]
[string]$ApiviewGenScript,
[string]$ParserPath = ""
)
Expand All @@ -28,7 +26,7 @@ if ($reviews -ne $null)

$pkgWorkingDir = Join-Path -Path $WorkingDir $r.ReviewID | Join-Path -ChildPath $r.RevisionID
$codeDir = New-Item -Path $pkgWorkingDir -ItemType Directory
$sourcePath = $StorageBaseUrl + "/" + $r.FileID + "?"+ $ContainerSas
$sourcePath = $StorageBaseUrl + "/" + $r.FileID
Write-Host "Copying $($sourcePath)"
azcopy cp "$sourcePath" $codeDir/$($r.FileName) --recursive=true

Expand Down