We have an Azure pipeline (YAML) which runs on demand and will create a zipped artifact which is then executed in a release pipeline.
This is the YAML file, this process works as expected:
variables:
solution: '**/SmokeTests.sln'
vmImageWn: 'windows-latest'
artifactName: 'smoke'
stages:
- stage: SmokeTestsBuild
displayName: Fast Smoke Test Build
jobs:
- job: SmokeBuild
pool:
name: Azure Pipelines
vmImage: '$(vmImageWn)'
demands: msbuild
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
displayName: 'Smoke Restore'
inputs:
restoreSolution: '$(solution)'
- task: DotNetCoreCLI@2
inputs:
command: 'publish'
publishWebProjects: false
projects: '**/*.csproj'
arguments: '-o $(Build.ArtifactStagingDirectory)'
zipAfterPublish: true
modifyOutputPath: true
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: '$(artifactName)'
The release pipeline which runs weekly is then able to locate and use this artifact to run the smoke tests, as shown here:



steps:
- task: ExtractFiles@1
displayName: 'Extract Smoke Test files '
inputs:
archiveFilePatterns: '$(System.DefaultWorkingDirectory)/_Build Smoke Tests/smoke/SmokeTests.zip'
destinationFolder: '$(System.ArtifactsDirectory)\smoke'
overwriteExistingFiles: true
This all works as expected but I am now looking at converting the release pipeline to a YAML based pipeline but where I am struggling is how do I associate the pre-built artifact into the new some tests YAML file?
Any help please?