I am trying to specify "Build pipeline" value in download build artifacts task as variable value like "$(Pipeline)".
But the classic editor does not allow to do so.
Is there anyway to achieve this?
Look like you can't use a variable in this input when you use the Classic Editor, but you can use a variable if you use a YAML pipeline:
variables:
buildName: TestBuild
steps:
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'specific'
project: 'xxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx'
pipeline: '$(buildName)'
buildVersionToDownload: 'latest'
downloadType: 'single'
downloadPath: '$(System.ArtifactsDirectory)'
artifactName: test
If you still want to use the Classic Editor you can "hack" the system by export the build to json:
Open the json and replace there the value with a variable, then import the build:
Results: