...

Text file src/github.com/Azure/azure-sdk-for-go/eng/common/pipelines/templates/steps/publish-blobs.yml

Documentation: github.com/Azure/azure-sdk-for-go/eng/common/pipelines/templates/steps

     1parameters:
     2  FolderForUpload: ''
     3  BlobSASKey: ''
     4  TargetLanguage: ''
     5  BlobName: ''
     6  ScriptPath: ''
     7  ArtifactLocation: ''
     8  RepoId: $(Build.Repository.Name)
     9
    10steps:
    11- template: /eng/common/pipelines/templates/steps/set-default-branch.yml
    12- pwsh: |
    13    if (!(Test-Path '$(Build.BinariesDirectory)/azcopy/azcopy_windows_amd64_*/azcopy.exe')) {
    14      Invoke-WebRequest -MaximumRetryCount 10 -Uri "https://aka.ms/downloadazcopy-v10-windows" -OutFile "azcopy.zip" | Wait-Process;
    15      Expand-Archive -Path "azcopy.zip" -DestinationPath "$(Build.BinariesDirectory)/azcopy/" -Force
    16    }
    17  workingDirectory: $(Build.BinariesDirectory)
    18  displayName: Download and Extract azcopy Zip
    19
    20- task: Powershell@2
    21  inputs:
    22    filePath: ${{ parameters.ScriptPath }}
    23    arguments: >
    24      -AzCopy $(Resolve-Path "$(Build.BinariesDirectory)/azcopy/azcopy_windows_amd64_*/azcopy.exe")[0]
    25      -DocLocation "${{ parameters.FolderForUpload }}"
    26      -SASKey "${{ parameters.BlobSASKey }}"
    27      -BlobName "${{ parameters.BlobName }}"
    28      -PublicArtifactLocation "${{ parameters.ArtifactLocation }}"
    29      -RepoReplaceRegex "(https://github.com/${{ parameters.RepoId }}/(?:blob|tree)/)$(DefaultBranch)"
    30    pwsh: true
    31    workingDirectory: $(Pipeline.Workspace)
    32  displayName: Copy Docs to Blob
    33  continueOnError: false

View as plain text