Use pipeline artifacts instead of build artifacts (#32139)

This commit is contained in:
David Federman 2024-04-01 10:29:45 -07:00 committed by GitHub
parent 6333e3157e
commit bb5fd4970a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 15 deletions

View File

@ -308,9 +308,7 @@ steps:
contents: '$(BuildPlatform)/$(BuildConfiguration)/**/*'
targetFolder: '$(Build.ArtifactStagingDirectory)\$(BuildPlatform)\$(BuildConfiguration)'
- task: PublishBuildArtifacts@1
- publish: $(Build.ArtifactStagingDirectory)\$(BuildPlatform)\$(BuildConfiguration)
displayName: Publish Build Artifacts
artifact: build-$(BuildPlatform)-$(BuildConfiguration)
condition: and(succeeded(), ne(variables['BuildPlatform'],'arm64'))
inputs:
pathToPublish: '$(Build.ArtifactStagingDirectory)\$(BuildPlatform)\$(BuildConfiguration)'
artifactName: build-$(BuildPlatform)-$(BuildConfiguration)

View File

@ -20,11 +20,9 @@ jobs:
clean: true
fetchTags: false
- task: DownloadPipelineArtifact@2
- download: current
displayName: Download artifacts
inputs:
artifact: build-${{ parameters.platform }}-${{ parameters.configuration }}
path: $(Build.ArtifactStagingDirectory)
artifact: build-${{ parameters.platform }}-${{ parameters.configuration }}
- task: UseDotNet@2
displayName: 'Use .NET 6 SDK'
@ -59,7 +57,7 @@ jobs:
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
testSelector: 'testAssemblies'
searchFolder: '$(Build.ArtifactStagingDirectory)'
searchFolder: '$(Pipeline.Workspace)\build-${{ parameters.platform }}-${{ parameters.configuration }}'
vstestLocationMethod: 'location' # otherwise fails to find vstest.console.exe
#vstestLocation: '$(Agent.ToolsDirectory)\VsTest\**\${{ parameters.platform }}\tools\net462\Common7\IDE\Extensions\TestPlatform'
vstestLocation: '$(Agent.ToolsDirectory)\VsTest\17.10.0-preview-24080-01\x64\tools\net462\Common7\IDE\Extensions\TestPlatform'

View File

@ -43,10 +43,6 @@ steps:
- powershell: 'tar czf LocOutput.tar.gz LocOutput'
displayName: 'PowerShell Script'
- task: PublishBuildArtifacts@1
- publish: LocOutput.tar.gz
displayName: 'Publish Artifact: LocOutput'
inputs:
PathtoPublish: LocOutput.tar.gz
ArtifactName: LocOutput
artifact: LocOutput